HInputHandler an abstract base class for model and image input. More...
#include <HIOManager.h>
Public Member Functions | |
virtual HFileInputResult | FileInputByKey (const char *filename, HC_KEY key, HInputHandlerOptions *options) |
virtual HFileInputResult | FileInputByKey (const __wchar_t *filename, HC_KEY key, HInputHandlerOptions *options) |
virtual HFileInputResult | FileInputByKey (const unsigned short *filename, HC_KEY key, HInputHandlerOptions *options) |
virtual HFileInputResult | FileInputToImageKey (const char *filename, HC_KEY *image_key, HC_KEY segment_key, HInputHandlerOptions *options) |
virtual HFileInputResult | FileInputToImageKey (const __wchar_t *filename, HC_KEY *image_key, HC_KEY segment_key, HInputHandlerOptions *options) |
virtual HFileInputResult | FileInputToImageKey (const unsigned short *filename, HC_KEY *image_key, HC_KEY segment_key, HInputHandlerOptions *options) |
const __wchar_t * | GetInputInformation () |
virtual const char * | GetInputName ()=0 |
unsigned long | GetInputOps () |
float | GetInputPercentProgress () |
const __wchar_t * | GetInputProgress () |
virtual HInputHandlerStyle | GetInputStyle ()=0 |
virtual const char * | GetInputTypesString ()=0 |
HInputHandler () | |
virtual void | RegisterInputHandlerTypes ()=0 |
void | ReportInputInformation (const char *information) |
This posts information to the information queue. | |
void | ReportInputInformation (const __wchar_t *information) |
void | ReportInputPercentProgress (float percent_progress) |
This posts the current percent progress should be between 0.0 and 1.0. | |
void | ReportInputProgress (const char *progress) |
This posts the current progress message. | |
void | ReportInputProgress (const __wchar_t *progress) |
HIONoticeCallback * | SetInputInformationNoticeCallback (HIONoticeCallback *notice_callback) |
HIOPercentNoticeCallback * | SetInputPercentProgressNoticeCallback (HIOPercentNoticeCallback *percent_notice_callback) |
HIONoticeCallback * | SetInputProgressNoticeCallback (HIONoticeCallback *notice_callback) |
void | SetModuleDirectory (const char *module_directory) |
void | SetModuleDirectory (const __wchar_t *module_directory) |
Protected Member Functions | |
void | SetFinishedInput () |
void | SetInputOps (unsigned long ops) |
This sets the HInputOp. | |
void | SetStartingInput (const char *filename) |
void | SetStartingInput (const __wchar_t *filename=0) |
Protected Attributes | |
unsigned long | m_InputOps |
This is the HInputOp set for a subclassed instance. | |
__wchar_t * | m_module_directory |
Detailed Description
HInputHandler an abstract base class for model and image input.
HInputHandler is an abstract base class that performs model and image file input. HIOManager::RegisterInputHandler is used to register an input handler for a file extension type with the HIOManager. To make a new input handler, create a child class that inherits from this class and implements the abstract interfaces.
Constructor & Destructor Documentation
◆ HInputHandler()
HInputHandler::HInputHandler | ( | ) |
For the constructor in any child class, note it must class must call SetInputOps() with the subclassed HInputHandler instance type.
For example, the following line of code can be used to specify a class supporting the image input:
Member Function Documentation
◆ FileInputByKey() [1/2]
|
virtual |
This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.
- Parameters
-
filename The name of the file to load. key The HOOPS segment key to load model data into. options An options class containing any needed extra information for the operation.
- Returns
- The #HFileInputResult result of the input operation.
Reimplemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, HIOUtilityStl, HIOUtilityDGN, HIOUtilityExchange, HIOUtilityHMF, HIOUtilityHsf, HIOUtilityDwfImport, HIOUtilityIV, hio_dwg, HIOUtilityOOC, and HIOUtilitySKP.
◆ FileInputByKey() [2/2]
|
virtual |
This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.
- Parameters
-
filename The UNICODE name of the file to load. key The HOOPS segment key to load model data into. options An options class containing any needed extra information for the operation.
- Returns
- The #HFileInputResult result of the input operation.
Reimplemented in HIOUtilityPublish, HIOUtilityPly, HIOUtilityPointCloud, HIOUtilityObj, HIOUtilityDGN, HIOUtilityStl, HIOUtilityExchange, HIOUtilityHMF, HIOUtilityHsf, HIOUtilityIV, HIOUtilitySKP, and hio_dwg.
◆ FileInputToImageKey() [1/2]
|
virtual |
This method loads image data from a given file to a given HOOPS image key. Note that this must be implemented in a sub-classed HInputHandler instance handling Images.
- Parameters
-
filename The name of the file to load. image_key The pointer to a HOOPS key that will be filled in with a HOOPS image key. segment_key The HOOPS segment key to create the image_key in ie. the working segment. options An options class containing any needed extra information for operation.
- Returns
- The HFileInputResult result of the input operation.
Reimplemented in HIOUtilityLeadTools, and HIOUtilityMagick.
◆ FileInputToImageKey() [2/2]
|
virtual |
This method loads image data from a given file to a given HOOPS image key. Note that this must be implemented in a sub-classed HInputHandler instance handling Images.
- Parameters
-
filename The UNICODE name of the file to load. image_key The pointer to a HOOPS key that will be filled in with a HOOPS image key. segment_key The HOOPS segment key to create the image_key in – i.e., the working segment. options An options class containing any needed extra information for operation.
- Returns
- The HFileInputResult result of the input operation.
Reimplemented in HIOUtilityMagick.
◆ GetInputInformation()
const __wchar_t* HInputHandler::GetInputInformation | ( | ) |
If used this will return the oldest information messages posted
- Returns
- The oldest information posted and 0 if none is available.
◆ GetInputName()
|
pure virtual |
- Returns
- A character pointer denoting the name of the input handler.
Implemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, hio_dwg, HIOUtilityDGN, HIOUtilityOOC, HIOUtilityExchange, HIOUtilityDwfImport, HIOUtilityHMF, HIOUtilityStl, HIOUtilityIV, HIOUtilityMagick, HIOUtilityHsf, and HIOUtilitySKP.
◆ GetInputOps()
|
inline |
- Returns
- The HInputOp which can be one of the following: HInputOpNone, HInputOpFileInputByKey or HInputOpFileInputToImageKey.
◆ GetInputPercentProgress()
float HInputHandler::GetInputPercentProgress | ( | ) |
If used this will return the last progress percent posted
- Returns
- The last progress posted or 0.0 if none is available.
◆ GetInputProgress()
const __wchar_t* HInputHandler::GetInputProgress | ( | ) |
If used this will return the last progress messages posted
- Returns
- The last progress posted and 0 if none is available.
◆ GetInputStyle()
|
pure virtual |
This abstract method returns the HInputHandlerStyle the HInputHandler.
For example, the following line of code can be used for an HInputHandler that handles models:
{return HInputHandlerStyleModel;}
Implemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, hio_dwg, HIOUtilityLeadTools, HIOUtilityDGN, HIOUtilityStl, HIOUtilityExchange, HIOUtilityOOC, HIOUtilityHMF, HIOUtilityHsf, HIOUtilityDwfImport, HIOUtilityIV, HIOUtilityMagick, and HIOUtilitySKP.
◆ GetInputTypesString()
|
pure virtual |
This method must be implemented in a subclassed HInputHandler.
- Returns
- The extension type or types that are handled by this HInputHandler.
Examples:
The following line of code can be used to specify the stl extension:
{return "stl";};
The following line of code can be used to specify that the jpg, bmp and gif extension are handled:
{return "jpg;bmp;gif";};
Implemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, HIOUtilityLeadTools, hio_dwg, HIOUtilityDGN, HIOUtilityOOC, HIOUtilityHMF, HIOUtilityStl, HIOUtilityExchange, HIOUtilityMagick, HIOUtilityDwfImport, HIOUtilityHsf, HIOUtilityIV, and HIOUtilitySKP.
◆ RegisterInputHandlerTypes()
|
pure virtual |
This abstract function must register extension types to be handled by subclassed HInputHandler instance.
For example, the following line of code can be used to specify a class that will handle files with "stl" extensions:
Implemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, hio_dwg, HIOUtilityOOC, HIOUtilityDGN, HIOUtilityHMF, HIOUtilityStl, HIOUtilityExchange, HIOUtilityMagick, HIOUtilityHsf, HIOUtilityLeadTools, HIOUtilityDwfImport, HIOUtilityIV, and HIOUtilitySKP.
◆ SetFinishedInput()
|
protected |
The three FileInput methods must call this after loading data if they work It sets the progress to "finished"
◆ SetInputInformationNoticeCallback()
HIONoticeCallback* HInputHandler::SetInputInformationNoticeCallback | ( | HIONoticeCallback * | notice_callback | ) |
If used this will call the notice function when information is posted It is the duty of the caller to delete the notice_callback object passing 0 to this function will unset the callback.
- Returns
- The last callback object set
◆ SetInputPercentProgressNoticeCallback()
HIOPercentNoticeCallback* HInputHandler::SetInputPercentProgressNoticeCallback | ( | HIOPercentNoticeCallback * | percent_notice_callback | ) |
If used this will call the notice function when percent progress is posted It is the duty of the caller to delete the notice_callback object passing 0 to this function will unset the callback.
- Returns
- The last callback object set
◆ SetInputProgressNoticeCallback()
HIONoticeCallback* HInputHandler::SetInputProgressNoticeCallback | ( | HIONoticeCallback * | notice_callback | ) |
If used this will call the notice function when progress is posted It is the duty of the caller to delete the notice_callback object passing 0 to this function will unset the callback.
- Returns
- The last callback object set
◆ SetStartingInput()
|
protected |
The three FileInput methods must call this before loading data It restarts the information logging and sets the progress to "starting"
The documentation for this class was generated from the following file: