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 |
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.
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:
virtual HFileInputResult HInputHandler::FileInputByKey | ( | const char * | filename, |
HC_KEY | key, | ||
HInputHandlerOptions * | options | ||
) | [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.
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. |
Reimplemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, HIOUtilityStl, HIOUtilityU3D, HIOUtilityDGN, HIOUtilityExchange, HIOUtilityHMF, HIOUtilityHsf, HIOUtilityDwfImport, HIOUtilityIV, hio_dwg, HIOUtilityOOC, and HIOUtilitySKP.
Referenced by HIOUtilityOOC::FileInputByKey(), HIOUtilityIV::FileInputByKey(), HIOUtilityDwfImport::FileInputByKey(), HIOUtilityHsf::FileInputByKey(), HIOUtilityHMF::FileInputByKey(), HIOUtilityExchange::FileInputByKey(), HIOUtilityU3D::FileInputByKey(), HIOUtilityStl::FileInputByKey(), HIOUtilityObj::FileInputByKey(), HIOUtilityPly::FileInputByKey(), HIOUtilityPointCloud::FileInputByKey(), and HIOUtilityPublish::FileInputByKey().
virtual HFileInputResult HInputHandler::FileInputByKey | ( | const unsigned short * | filename, |
HC_KEY | key, | ||
HInputHandlerOptions * | options | ||
) | [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.
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. |
Reimplemented in HIOUtilityPublish, HIOUtilityPly, HIOUtilityPointCloud, HIOUtilityObj, HIOUtilityDGN, HIOUtilityStl, HIOUtilityU3D, HIOUtilityExchange, HIOUtilityHMF, HIOUtilityHsf, HIOUtilityIV, HIOUtilitySKP, and hio_dwg.
virtual HFileInputResult HInputHandler::FileInputToImageKey | ( | const char * | filename, |
HC_KEY * | image_key, | ||
HC_KEY | segment_key, | ||
HInputHandlerOptions * | options | ||
) | [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.
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 infromation for operation. |
Reimplemented in HIOUtilityLeadTools, and HIOUtilityMagick.
virtual HFileInputResult HInputHandler::FileInputToImageKey | ( | const unsigned short * | filename, |
HC_KEY * | image_key, | ||
HC_KEY | segment_key, | ||
HInputHandlerOptions * | options | ||
) | [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.
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 ie. the working segment. |
options | An options class containing any needed extra infromation for operation. |
Reimplemented in HIOUtilityMagick.
const __wchar_t* HInputHandler::GetInputInformation | ( | ) |
If used this will return the oldest information messages posted
virtual const char* HInputHandler::GetInputName | ( | ) | [pure virtual] |
Implemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, hio_dwg, HIOUtilityDGN, HIOUtilityOOC, HIOUtilityU3D, HIOUtilityExchange, HIOUtilityDwfImport, HIOUtilityHMF, HIOUtilityStl, HIOUtilityIV, HIOUtilityMagick, HIOUtilityHsf, and HIOUtilitySKP.
unsigned long HInputHandler::GetInputOps | ( | ) | [inline] |
float HInputHandler::GetInputPercentProgress | ( | ) |
If used this will return the last progress percent posted
const __wchar_t* HInputHandler::GetInputProgress | ( | ) |
If used this will return the last progress messages posted
virtual HInputHandlerStyle HInputHandler::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, HIOUtilityU3D, HIOUtilityStl, HIOUtilityExchange, HIOUtilityOOC, HIOUtilityHMF, HIOUtilityHsf, HIOUtilityDwfImport, HIOUtilityIV, HIOUtilityMagick, and HIOUtilitySKP.
virtual const char* HInputHandler::GetInputTypesString | ( | ) | [pure virtual] |
This method must be implemented in a subclassed 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, HIOUtilityU3D, HIOUtilityDGN, HIOUtilityOOC, HIOUtilityHMF, HIOUtilityStl, HIOUtilityExchange, HIOUtilityMagick, HIOUtilityDwfImport, HIOUtilityHsf, HIOUtilityIV, and HIOUtilitySKP.
virtual void HInputHandler::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:
{HIORegisterInputType("stl",this);};
Implemented in HIOUtilityPublish, HIOUtilityPointCloud, HIOUtilityPly, HIOUtilityObj, hio_dwg, HIOUtilityOOC, HIOUtilityU3D, HIOUtilityDGN, HIOUtilityHMF, HIOUtilityStl, HIOUtilityExchange, HIOUtilityMagick, HIOUtilityHsf, HIOUtilityLeadTools, HIOUtilityDwfImport, HIOUtilityIV, and HIOUtilitySKP.
void HInputHandler::SetFinishedInput | ( | ) | [protected] |
The three FileInput methods must call this after loading data if they work It sets the progress to "finished"
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.
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.
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.
void HInputHandler::SetStartingInput | ( | const char * | filename | ) | [protected] |
The three FileInput methods must call this before loading data It restarts the information logging and sets the progress to "starting"