# HInputHandler

## Functions

| `HInputHandler`
| `~HInputHandler`
unsigned long | `GetInputOps`
char const * | `GetInputName`
void | `RegisterInputHandlerTypes`
`HInputHandlerStyle` | `GetInputStyle`
HFileIOResult | `FileInputByKey`
HFileIOResult | `FileInputByKey`
HFileIOResult | `FileInputByKey`
HFileIOResult | `FileInputToImageKey`
HFileIOResult | `FileInputToImageKey`
HFileIOResult | `FileInputToImageKey`
char const * | `GetInputTypesString`
__wchar_t const * | `GetInputProgress`
float | `GetInputPercentProgress`
__wchar_t const * | `GetInputInformation`
HIONoticeCallback * | `SetInputProgressNoticeCallback`
HIOPercentNoticeCallback * | `SetInputPercentProgressNoticeCallback`
HIONoticeCallback * | `SetInputInformationNoticeCallback`
void | `ReportInputProgress`
void | `ReportInputProgress`
void | `ReportInputPercentProgress`
void | `ReportInputInformation`
void | `ReportInputInformation`
void | `SetModuleDirectory`
void | `SetModuleDirectory`

## Detailed Description

class `HInputHandler`

  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.

  Subclassed by HIOUtilityDGN, HIOUtilityExchange, HIOUtilitySKP

  Public Functions

  `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 `~HInputHandler`()
  inline unsigned long `GetInputOps`()

    Returns: | The HInputOp which can be one of the following: HInputOpNone, HInputOpFileInputByKey or HInputOpFileInputToImageKey.

  virtual char const *`GetInputName`() = 0

    Returns: | A character pointer denoting the name of the input handler.

  virtual void `RegisterInputHandlerTypes`() = 0

    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:

  virtual HInputHandlerStyle `GetInputStyle`() = 0

    This abstract method returns the HInputHandlerStyle the HInputHandler.

    For example, the following line of code can be used for an HInputHandler that handles models:

  virtual HFileIOResult `FileInputByKey`(char const *filename, HC_KEY key, HInputHandlerOptions *options)

    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: | 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 HFileIOResult `FileInputByKey`(__wchar_t const *filename, HC_KEY key, HInputHandlerOptions *options)
  virtual HFileIOResult `FileInputByKey`(unsigned short const *filename, HC_KEY key, HInputHandlerOptions *options)

    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: | 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 HFileIOResult `FileInputToImageKey`(char const *filename, HC_KEY *image_key, HC_KEY segment_key, HInputHandlerOptions *options)

    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: | 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 HFileIOResult `FileInputToImageKey`(__wchar_t const *filename, HC_KEY *image_key, HC_KEY segment_key, HInputHandlerOptions *options)
  virtual HFileIOResult `FileInputToImageKey`(unsigned short const *filename, HC_KEY *image_key, HC_KEY segment_key, HInputHandlerOptions *options)

    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: | 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 &#8212; 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 *`GetInputTypesString`() = 0

    This method must be implemented in a subclassed HInputHandler

    .

    Examples:

    The following line of code can be used to specify the stl extension:

    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 this HInputHandler.

  __wchar_t const *`GetInputProgress`()

    If used this will return the last progress messages posted

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

  float `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 *`GetInputInformation`()

    If used this will return the oldest information messages posted

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

  HIONoticeCallback *`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 *`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 *`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 `ReportInputProgress`(char const *progress)

    This posts the current progress message.

  void `ReportInputProgress`(__wchar_t const *progress)
  void `ReportInputPercentProgress`(float percent_progress)

    This posts the current percent progress should be between 0.0 and 1.0.

  void `ReportInputInformation`(char const *information)

    This posts information to the information queue.

  void `ReportInputInformation`(__wchar_t const *information)
  void `SetModuleDirectory`(char const *module_directory)
  void `SetModuleDirectory`(__wchar_t const *module_directory)

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize 3DF or choose a sample question below to start a conversation:

What is HOOPS Visualize 3DF?
What are the latest release notes for HOOPS Visualize 3DF?
How do I start evaluating HOOPS Visualize 3DF?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...