Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HInputHandler Class Reference

HInputHandler an abstract base class for model and image input. More...

#include <HIOManager.h>

List of all members.

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)
HIONoticeCallbackSetInputInformationNoticeCallback (HIONoticeCallback *notice_callback)
HIOPercentNoticeCallbackSetInputPercentProgressNoticeCallback (HIOPercentNoticeCallback *percent_notice_callback)
HIONoticeCallbackSetInputProgressNoticeCallback (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 ( )

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

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.

Parameters:
filenameThe name of the file to load.
keyThe HOOPS segment key to load model data into.
optionsAn 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, HIOUtilityDWG, HIOUtilitySKP, HIOUtilityU3D, HIOUtilityDGN, HIOUtilityExchange, HIOUtilityHMF, HIOUtilityPrc, HIOUtilityHsf, HIOUtilityIV, HIOUtilityDwfImport, and HIOUtilityOOC.

Referenced by HIOUtilityDwfImport::FileInputByKey(), HIOUtilityIV::FileInputByKey(), HIOUtilityHsf::FileInputByKey(), HIOUtilityPrc::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.

Parameters:
filenameThe UNICODE name of the file to load.
keyThe HOOPS segment key to load model data into.
optionsAn options class containing any needed extra information for the operation.
Returns:
The #HFileInputResult result of the input operation.

Reimplemented in HIOUtilityPublish, HIOUtilityPly, HIOUtilityPointCloud, HIOUtilityObj, HIOUtilityDWG, HIOUtilitySKP, HIOUtilityStl, HIOUtilityDGN, HIOUtilityU3D, HIOUtilityExchange, HIOUtilityHMF, HIOUtilityPrc, HIOUtilityHsf, and HIOUtilityIV.

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.

Parameters:
filenameThe name of the file to load.
image_keyThe pointer to a HOOPS key that will be filled in with a HOOPS image key.
segment_keyThe HOOPS segment key to create the image_key in ie. the working segment.
optionsAn options class containing any needed extra infromation for operation.
Returns:
The HFileInputResult result of the input operation.

Reimplemented in HIOUtilityLeadTools, HIOUtilityGif, and HIOUtilityMagick.

Referenced by HIOUtilityGif::FileInputToImageKey().

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.

Parameters:
filenameThe UNICODE name of the file to load.
image_keyThe pointer to a HOOPS key that will be filled in with a HOOPS image key.
segment_keyThe HOOPS segment key to create the image_key in ie. the working segment.
optionsAn options class containing any needed extra infromation for operation.
Returns:
The HFileInputResult result of the input operation.

Reimplemented in HIOUtilityGif, and HIOUtilityMagick.

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.
virtual const char* HInputHandler::GetInputName ( ) [pure virtual]
unsigned long HInputHandler::GetInputOps ( ) [inline]
Returns:
The HInputOp which can be one of the following: HInputOpNone, HInputOpFileInputByKey or HInputOpFileInputToImageKey.
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.
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.
virtual HInputHandlerStyle HInputHandler::GetInputStyle ( ) [pure virtual]
virtual const char* HInputHandler::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, HIOUtilitySKP, HIOUtilityDWG, HIOUtilityU3D, HIOUtilityDGN, HIOUtilityHMF, HIOUtilityOOC, HIOUtilityStl, HIOUtilityPrc, HIOUtilityExchange, HIOUtilityDwfImport, HIOUtilityMagick, HIOUtilityGif, HIOUtilityHsf, and HIOUtilityIV.

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, HIOUtilitySKP, HIOUtilityOOC, HIOUtilityDWG, HIOUtilityU3D, HIOUtilityHMF, HIOUtilityDGN, HIOUtilityStl, HIOUtilityPrc, HIOUtilityExchange, HIOUtilityHsf, HIOUtilityGif, HIOUtilityMagick, HIOUtilityLeadTools, HIOUtilityIV, and HIOUtilityDwfImport.

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.

Returns:
The last callback object set
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
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
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"


The documentation for this class was generated from the following file: