#include <HIOManager.h>
Public Member Functions | |
virtual HFileOutputResult | FileOutputByKey (const unsigned short *filename, HC_KEY key, HOutputHandlerOptions *options) |
virtual HFileOutputResult | FileOutputByKey (const __wchar_t *filename, HC_KEY key, HOutputHandlerOptions *options) |
virtual HFileOutputResult | FileOutputByKey (const char *filename, HC_KEY key, HOutputHandlerOptions *options) |
virtual HFileOutputResult | FileOutputFromImageKey (const __wchar_t *filename, HC_KEY image_key, HOutputHandlerOptions *options) |
virtual HFileOutputResult | FileOutputFromImageKey (const char *filename, HC_KEY image_key, HOutputHandlerOptions *options) |
virtual const char * | GetOutputDefaultHSRA () |
const __wchar_t * | GetOutputInformation () |
virtual const char * | GetOutputName ()=0 |
unsigned long | GetOutputOps () |
float | GetOutputPercentProgress () |
const char * | GetOutputProgress () |
virtual HOutputHandlerStyle | GetOutputStyle ()=0 |
virtual const char * | GetOutputTypesString ()=0 |
HOutputHandler () | |
virtual void | RegisterOutputHandlerTypes ()=0 |
void | ReportOutputInformation (const char *information) |
This posts information to the information queue. | |
void | ReportOutputPercentProgress (float percent_progress) |
This posts the current percent progress message should be between 0.0 and 1.0. | |
void | ReportOutputProgress (const char *progress) |
This posts the current progress message. | |
void | SetModuleDirectory (const __wchar_t *module_directory) |
void | SetModuleDirectory (const char *module_directory) |
HIONoticeCallback * | SetOutputInformationNoticeCallback (HIONoticeCallback *notice_callback) |
HIOPercentNoticeCallback * | SetOutputPercentProgressNoticeCallback (HIOPercentNoticeCallback *percent_notice_callback) |
HIONoticeCallback * | SetOutputProgressNoticeCallback (HIONoticeCallback *notice_callback) |
Protected Member Functions | |
void | SetFinishedOutput () |
void | SetOutputOps (unsigned long ops) |
This sets the HOutputOp. | |
void | SetStartingOutput () |
Protected Attributes | |
char * | m_module_directory |
unsigned long | m_OutputOps |
This is the HOutputOp set for a subclassed instance. |
HInputHandler is an abstract base class that performs model, image, hardcopy and html file output. HIOManager::RegisterOutputHandler is used to register an output handler for a file extension type with the HIOManager. To make a new output handler, create a child class that inherits from this class and implements the abstract interfaces.
HOutputHandler::HOutputHandler | ( | ) |
For the constructor in any child class, note it must class must call SetOutputOps() with the subclassed HOutputHandler instance type.
For example, the following line of code can be used to specify a class supporting the image output:
virtual HFileOutputResult HOutputHandler::FileOutputByKey | ( | const unsigned short * | filename, | |
HC_KEY | key, | |||
HOutputHandlerOptions * | options | |||
) | [virtual] |
This method writes model data from a given HOOPS key to a given output file. Note that this must be implimented in a subclassed HOutputHandler instance handling models.
filename | The wide character name of the file to output. | |
key | The HOOPS segment key to get output model data from. | |
options | The options class containing any needed extra information for the operation. |
Reimplemented in HIOUtilityHMF, HIOUtilityPostscript, HIOUtilityHPGL2, HIOUtilityCGM, HIOUtilityHsf, HIOUtilityHTML, HIOUtilityObj, HIOUtilityPly, HIOUtilityStl, HIOUtilityDwfExport, HIOUtilityWhip2D, HIOUtilityPublish, HIOUtilityExchange, and HIOUtilityU3D.
virtual HFileOutputResult HOutputHandler::FileOutputByKey | ( | const char * | filename, | |
HC_KEY | key, | |||
HOutputHandlerOptions * | options | |||
) | [virtual] |
This method writes model data from a given HOOPS key to a given output file. Note that this must be implimented in a subclassed HOutputHandler instance handling models.
filename | The name of the file to output. | |
key | The HOOPS segment key to output model data from. | |
options | The options class containing any needed extra information for the operation. |
Reimplemented in HIOUtilityHMF, HIOUtilityPostscript, HIOUtilityHPGL2, HIOUtilityCGM, HIOUtilityHsf, HIOUtilityHTML, HIOUtilityObj, HIOUtilityPDF, HIOUtilityPly, HIOUtilityStl, HIOUtilityPublish, HIOUtilityExchange, and HIOUtilityU3D.
Referenced by HIOUtilityU3D::FileOutputByKey(), HIOUtilityStl::FileOutputByKey(), HIOUtilityPublish::FileOutputByKey(), HIOUtilityPly::FileOutputByKey(), HIOUtilityPDF::FileOutputByKey(), HIOUtilityObj::FileOutputByKey(), HIOUtilityHTML::FileOutputByKey(), HIOUtilityHsf::FileOutputByKey(), HIOUtilityCGM::FileOutputByKey(), HIOUtilityHPGL2::FileOutputByKey(), HIOUtilityPostscript::FileOutputByKey(), HIOUtilityHMF::FileOutputByKey(), HIOUtilityExchange::FileOutputByKey(), HIOUtilityWhip2D::FileOutputByKey(), and HIOUtilityDwfExport::FileOutputByKey().
virtual HFileOutputResult HOutputHandler::FileOutputFromImageKey | ( | const char * | filename, | |
HC_KEY | image_key, | |||
HOutputHandlerOptions * | options | |||
) | [virtual] |
This method writes image data from a given HOOPS key to a given output file. Note that this must be implimented in a subclassed HOutputHandler instance handling images. This must be implemented in a subclassed HOutputHandler instance handling images.
filename | The name of the file to output. | |
image_key | The HOOPS image key to get output image data from. | |
options | The options class containing any needed extra information for the operation. |
Reimplemented in HIOUtilityLeadTools, HIOUtilityMagick, and HIOUtilityTiff.
Referenced by HIOUtilityTiff::FileOutputFromImageKey().
virtual const char* HOutputHandler::GetOutputDefaultHSRA | ( | ) | [virtual] |
{return "painters";};
Reimplemented in HIOUtilityPostscript, HIOUtilityHPGL2, HIOUtilityCGM, HIOUtilityPDF, and HIOUtilityWhip2D.
const __wchar_t* HOutputHandler::GetOutputInformation | ( | ) |
If used this will return the oldest information messages posted
virtual const char* HOutputHandler::GetOutputName | ( | ) | [pure virtual] |
Implemented in HIOUtilityHMF, HIOUtilityPostscript, HIOUtilityHPGL2, HIOUtilityCGM, HIOUtilityHsf, HIOUtilityHTML, HIOUtilityMagick, HIOUtilityObj, HIOUtilityPDF, HIOUtilityPly, HIOUtilityStl, HIOUtilityTiff, HIOUtilityDwfExport, HIOUtilityWhip2D, HIOUtilityPublish, HIOUtilityExchange, and HIOUtilityU3D.
unsigned long HOutputHandler::GetOutputOps | ( | ) | [inline] |
float HOutputHandler::GetOutputPercentProgress | ( | ) |
If used this will return the last progress percent posted
const char* HOutputHandler::GetOutputProgress | ( | ) |
If used this will return the last progress messages posted
virtual HOutputHandlerStyle HOutputHandler::GetOutputStyle | ( | ) | [pure virtual] |
{return HOutputHandlerStyleModel;}
Implemented in HIOUtilityHMF, HIOUtilityPostscript, HIOUtilityHPGL2, HIOUtilityCGM, HIOUtilityHsf, HIOUtilityHTML, HIOUtilityLeadTools, HIOUtilityMagick, HIOUtilityObj, HIOUtilityPDF, HIOUtilityPly, HIOUtilityStl, HIOUtilityTiff, HIOUtilityDwfExport, HIOUtilityWhip2D, HIOUtilityPublish, HIOUtilityExchange, and HIOUtilityU3D.
virtual const char* HOutputHandler::GetOutputTypesString | ( | ) | [pure virtual] |
This must be implemented in a subclassed HOutputHandler
{return "stl";};
The following line of code can be used to specify that jpg, bmp and gif extension are handled:
{return "jpg;bmp;gif";};
Implemented in HIOUtilityHMF, HIOUtilityPostscript, HIOUtilityHPGL2, HIOUtilityCGM, HIOUtilityHsf, HIOUtilityHTML, HIOUtilityLeadTools, HIOUtilityMagick, HIOUtilityObj, HIOUtilityPDF, HIOUtilityPly, HIOUtilityStl, HIOUtilityTiff, HIOUtilityDwfExport, HIOUtilityWhip2D, HIOUtilityPublish, HIOUtilityExchange, and HIOUtilityU3D.
virtual void HOutputHandler::RegisterOutputHandlerTypes | ( | ) | [pure virtual] |
This abstract function must register extension types to be handled by subclassed HOutputHandler instance.
For example, the following lines of code can be used to specify a class that will handle files with "tiff" and "tif" extensions:
{HIORegisterOutputType("tif",this); HIORegisterOutputType("tiff",this);};
Implemented in HIOUtilityHMF, HIOUtilityPostscript, HIOUtilityHPGL2, HIOUtilityCGM, HIOUtilityHsf, HIOUtilityHTML, HIOUtilityLeadTools, HIOUtilityMagick, HIOUtilityObj, HIOUtilityPDF, HIOUtilityPly, HIOUtilityStl, HIOUtilityTiff, HIOUtilityDwfExport, HIOUtilityWhip2D, HIOUtilityPublish, HIOUtilityExchange, and HIOUtilityU3D.
void HOutputHandler::SetFinishedOutput | ( | ) | [protected] |
The three FileOutput methods must call this after loading data if they work It sets the progress to "finished"
HIONoticeCallback* HOutputHandler::SetOutputInformationNoticeCallback | ( | 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* HOutputHandler::SetOutputPercentProgressNoticeCallback | ( | HIOPercentNoticeCallback * | percent_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.
HIONoticeCallback* HOutputHandler::SetOutputProgressNoticeCallback | ( | 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 HOutputHandler::SetStartingOutput | ( | ) | [protected] |
The three FileOutput methods must call this before loading data It restarts the information logging and sets the progress to "starting"