#include <HIOManager.h>
HIOManger manages subclassed instances of HInputHandler and HOutputHandler. It maps handlers to operations based on registered associations and/or requested file extensions. It is created on demand by HDB.
◆ CleanCallbacks()
void HIOManager::CleanCallbacks |
( |
| ) |
|
This method requests that any callbacks registered on handlers be cleaned (when the manager would othewise be deleted)
◆ CreateConnector()
virtual HIOConnector* HIOManager::CreateConnector |
( |
const char * |
file_type | ) |
|
|
virtual |
This method creates a new connector for the given type and returns a pointer to it.
- Parameters
-
file_type | The extension to lookup handler for example: "jpg". |
- Returns
- An HIOConnector registered for specified file type or 0 if none.
◆ FreeConnector()
virtual void HIOManager::FreeConnector |
( |
HIOConnector * |
old_connector | ) |
|
|
virtual |
This method frees a connector for the file type associated with it.
- Parameters
-
old_connector | A pointer to the HIOConnector object you wan to free from a given type. |
◆ GetCurrentHIOManager()
static HIOManager* HIOManager::GetCurrentHIOManager |
( |
| ) |
|
|
static |
This method gets the current HIOManager. It will create on if none exists.
- Returns
- The current manager from HDB.
◆ GetFileOutputResultString()
static void HIOManager::GetFileOutputResultString |
( |
HFileOutputResult |
result, |
|
|
char * |
result_str |
|
) |
| |
|
static |
This method gets a string representation of the HFileOutputResults.
- Parameters
-
result | The HFileOutputResult that you want to get a string representation of. |
result_str | Returns the string representation of the result. |
◆ GetInputHandler()
virtual HInputHandler* HIOManager::GetInputHandler |
( |
const char * |
file_type | ) |
|
|
virtual |
- Parameters
-
file_type | The extension to lookup handler for example: "jpg". See information on special cases below. |
- Returns
- The HInputHandler registered for specified file type or 0 if none is registered.
Special Cases
Because DWG files can be imported via both HIO_DWG and HIO_Exchange, two special cases exist for the file_type parameter to tell Visualize which module to use for the import:
File Type String
|
Import Module
|
"dwg"
|
HIO_DWG
|
"dxf"
|
HIO_DWG
|
"dwg_with_prc"
|
HIO_Exchange
|
"dxf_with_prc"
|
HIO_Exchange
|
◆ GetInputHandlerTypes()
virtual const char* HIOManager::GetInputHandlerTypes |
( |
| ) |
|
|
virtual |
- Returns
- The list of all extensions registered with input handlers. You can part this string to create a file type list for input file dialogs. The string's format looks like "jpg;gif;tiff".
◆ GetOutputHandler()
virtual HOutputHandler* HIOManager::GetOutputHandler |
( |
const char * |
file_type | ) |
|
|
virtual |
◆ GetOutputHandlerTypes()
virtual const char* HIOManager::GetOutputHandlerTypes |
( |
| ) |
|
|
virtual |
- Returns
- The list of all extensions registered with output handlers. You can parse this string to create a file type list for output file dialogs. The string's format looks like "jpg;gif;tiff".
◆ RegisterConnector()
This method associates a specified file type with an HIOConnector. If another another connector already exists for the file type, this method replaces it with the given connector.
- Parameters
-
file_type | The file extension this connector is for. |
Create | A pointer to the desired Create method. |
Free | A pointer to the desired Free method |
- Returns
- A pointer to old connector for the file extension.
◆ RegisterHandlers()
virtual void HIOManager::RegisterHandlers |
( |
| ) |
|
|
virtual |
◆ RegisterInputHandler()
This method associates a specified file type with an input handler. If another input handler already exists for the file type, this method replaces it with the given handler.
- Parameters
-
file_type | The file extension this to associate with the given handler. |
handler | The handler for specified extension file_type. This may be 0 to clear extension handler. |
- Returns
- A pointer to old handler for the file extension.
◆ RegisterOutputHandler()
This method associates a specified file type with an output handler. If another output handler already exists for the file type, this method replaces it with the given handler.
- Parameters
-
file_type | The file extension this to associate with the given handler. |
handler | The handler for specified extension file_type. This may be 0 to clear extension handler. |
- Returns
- A pointer to old handler for the file extension.
The documentation for this class was generated from the following file: