HInputHandler
-
class
HInputHandler HInputHandleran abstract base class for model and image input.HInputHandleris an abstract base class that performs model and image file input.HIOManager::RegisterInputHandleris used to register an input handler for a file extension type with theHIOManager. To make a new input handler, create a child class that inherits from this class and implements the abstract interfaces.Index
Methods
FileInputByKey()FileInputByKey()FileInputByKey()FileInputToImageKey()FileInputToImageKey()FileInputToImageKey()GetInputInformation()GetInputName()GetInputOps()GetInputPercentProgress()GetInputProgress()GetInputStyle()GetInputTypesString()HInputHandler()RegisterInputHandlerTypes()ReportInputInformation()ReportInputInformation()ReportInputPercentProgress()ReportInputProgress()ReportInputProgress()SetFinishedInput()SetInputInformationNoticeCallback()SetInputOps()SetInputPercentProgressNoticeCallback()SetInputProgressNoticeCallback()SetModuleDirectory()SetModuleDirectory()SetStartingInput()SetStartingInput()~HInputHandler()
Variables
Methods
-
HInputHandler::HInputHandler() For the constructor in any child class, note it must class must call
SetInputOps()with the subclassedHInputHandlerinstance type.{SetInputOps(HInputOpFileInputToImageKey);};
For example, the following line of code can be used to specify a class supporting the image input:
-
virtual
HInputHandler::~HInputHandler() virtual
-
unsigned long
HInputHandler::GetInputOps() Returns
The HInputOp which can be one of the following:HInputOpNone,HInputOpFileInputByKeyorHInputOpFileInputToImageKey.
-
virtual char const *
HInputHandler::GetInputName() = 0 virtual
Returns
A character pointer denoting the name of the input handler.
-
virtual void
HInputHandler::RegisterInputHandlerTypes() = 0 virtual
This abstract function must register extension types to be handled by subclassed
HInputHandlerinstance.{HIORegisterInputType("stl",this);};
For example, the following line of code can be used to specify a class that will handle files with “stl” extensions:
-
virtual HInputHandlerStyle
HInputHandler::GetInputStyle() = 0 virtual
This abstract method returns the
HInputHandlerStyletheHInputHandler.{return HInputHandlerStyleModel;}
For example, the following line of code can be used for an
HInputHandlerthat handles models:
-
virtual HFileInputResult
HInputHandler::FileInputByKey(char const *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
HInputHandlerinstance 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.
-
virtual HFileInputResult
HInputHandler::FileInputByKey(__wchar_t const *filename, HC_KEY key, HInputHandlerOptions *options) virtual
-
virtual HFileInputResult
HInputHandler::FileInputByKey(unsigned short const *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
HInputHandlerinstance 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.
-
virtual HFileInputResult
HInputHandler::FileInputToImageKey(char const *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
HInputHandlerinstance 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.
-
virtual HFileInputResult
HInputHandler::FileInputToImageKey(__wchar_t const *filename, HC_KEY *image_key, HC_KEY segment_key, HInputHandlerOptions *options) virtual
-
virtual HFileInputResult
HInputHandler::FileInputToImageKey(unsigned short const *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
HInputHandlerinstance 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.
-
virtual char const *
HInputHandler::GetInputTypesString() = 0 virtual
This method must be implemented in a subclassed
HInputHandler. Examples:{return "stl";};
The following line of code can be used to specify the stl extension:
{return "jpg;bmp;gif";};
The following line of code can be used to specify that the jpg, bmp and gif extension are handled:
Returns
The extension type or types that are handled by thisHInputHandler.
-
__wchar_t const *
HInputHandler::GetInputProgress() If used this will return the last progress messages posted
Returns
The last progress posted and 0 if none is available.
-
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.
-
__wchar_t const *
HInputHandler::GetInputInformation() If used this will return the oldest information messages posted
Returns
The oldest information posted and 0 if none is available.
-
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
-
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::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
-
void
HInputHandler::ReportInputProgress(char const *progress) This posts the current progress message.
-
void
HInputHandler::ReportInputProgress(__wchar_t const *progress)
-
void
HInputHandler::ReportInputPercentProgress(float percent_progress) This posts the current percent progress should be between 0.0 and 1.0.
-
void
HInputHandler::ReportInputInformation(char const *information) This posts information to the information queue.
-
void
HInputHandler::ReportInputInformation(__wchar_t const *information)
-
void
HInputHandler::SetModuleDirectory(char const *module_directory)
-
void
HInputHandler::SetModuleDirectory(__wchar_t const *module_directory)
-
void
HInputHandler::SetStartingInput(char const *filename) protected
The three FileInput methods must call this before loading data It restarts the information logging and sets the progress to “starting”
-
void
HInputHandler::SetStartingInput(__wchar_t const *filename = 0) protected
-
void
HInputHandler::SetFinishedInput() protected
The three FileInput methods must call this after loading data if they work It sets the progress to “finished”
-
void
HInputHandler::SetInputOps(unsigned long ops) protected
This sets the HInputOp.
Variables
-
unsigned long
HInputHandler::m_InputOps protected
unsigned longThis is the HInputOp set for a subclassed instance.
-
__wchar_t *
HInputHandler::m_module_directory protected
__wchar_t
-
__wchar_t *
HInputHandler::m_progress private
__wchar_t
-
float
HInputHandler::m_percent_progress1 private
float
-
float
HInputHandler::m_percent_progress2 private
float
-
__wchar_t *
HInputHandler::m_information private
__wchar_t
-
struct vlist_s *
HInputHandler::m_information_list private
struct vlist_s
-
HIONoticeCallback *
HInputHandler::m_progress_callback private
-
HIONoticeCallback *
HInputHandler::m_information_callback private
-
HIOPercentNoticeCallback *
HInputHandler::m_percent_progress_callback private