Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HOutputHandler Class Reference

HOutputHandler an abstract base class for model and image output. More...

#include <HIOManager.h>

Inheritance diagram for HOutputHandler:

HIOUtilityCGM HIOUtilityDwfExport HIOUtilityExchange HIOUtilityHMF HIOUtilityHPGL2 HIOUtilityHsf HIOUtilityHTML HIOUtilityLeadTools HIOUtilityMagick HIOUtilityObj HIOUtilityPDF HIOUtilityPly HIOUtilityPostscript HIOUtilityPublish HIOUtilityStl HIOUtilityTiff HIOUtilityU3D HIOUtilityWhip2D

List of all members.

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)
HIONoticeCallbackSetOutputInformationNoticeCallback (HIONoticeCallback *notice_callback)
HIOPercentNoticeCallbackSetOutputPercentProgressNoticeCallback (HIOPercentNoticeCallback *percent_notice_callback)
HIONoticeCallbackSetOutputProgressNoticeCallback (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.


Detailed Description

HOutputHandler an abstract base class for model and image output.

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.


Constructor & Destructor Documentation

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:


Member Function Documentation

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.

Parameters:
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.
Returns:
The HFileOutputResult result of the output 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.

Parameters:
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.
Returns:
The HFileOutputResult result of the output 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.

Parameters:
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.
Returns:
The HFileOutputResult result of the output operation.

Reimplemented in HIOUtilityLeadTools, HIOUtilityMagick, and HIOUtilityTiff.

Referenced by HIOUtilityTiff::FileOutputFromImageKey().

virtual const char* HOutputHandler::GetOutputDefaultHSRA (  )  [virtual]

Returns:
A default HSRA for HOutputHandler instance if needed.
For example: the following line of code might be used for an output handler needing painters:
 {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

Returns:
The oldest information posted and 0 if none is available.

virtual const char* HOutputHandler::GetOutputName (  )  [pure virtual]

unsigned long HOutputHandler::GetOutputOps (  )  [inline]

Returns:
The HOutputOp which specifies what kind of output this handlers works with. It can be HOutputOpNone, HOutputOpFileOutputByKey or HOutputOpFileOutputFromImageKey.

float HOutputHandler::GetOutputPercentProgress (  ) 

If used this will return the last progress percent posted

Returns:
The last progress posted or 0.0 if none is available.

const char* HOutputHandler::GetOutputProgress (  ) 

If used this will return the last progress messages posted

Returns:
The last progress posted and 0 if none is available.

virtual HOutputHandlerStyle HOutputHandler::GetOutputStyle (  )  [pure virtual]

Returns:
The HOutputHandlerStyle that this instance will use. It can be HOutputHandlerStyleModel for geometry data, HOutputHandlerStyleImage for images, HOutputHandlerStyleHardcopy for hardcopy or HOutputHandlerStyleHTML for MVO style html page.
For example: the following code can be used for an HOutputHandler that outputs model:
 {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

Returns:
The extension type or types that can be handled by this HOutputHandler.
For example: the following line of code can be use to specify the stl extenstion:
 {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.

Returns:
The last callback object set

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.

Returns:
The last callback object set

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.

Returns:
The last callback object set

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"


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