HIOManager
-
class
HIOManager HIOManger manages subclassed instances of
HInputHandlerandHOutputHandler. It maps handlers to operations based on registered associations and/or requested file extensions. It is created on demand by HDB.Index
Methods
CleanCallbacks()CreateConnector()FreeConnector()GetCurrentHIOManager()GetFileOutputResultString()GetInputHandler()GetInputHandler()GetInputHandlerTypes()GetOutputHandler()GetOutputHandler()GetOutputHandlerTypes()HIOManager()RecordInputHandler()RecordOutputHandler()RegisterConnector()RegisterHandlers()RegisterInputHandler()RegisterOutputHandler()SetModuleDirectory()~HIOManager()
Variables
Methods
-
HIOManager::HIOManager()
-
virtual
HIOManager::~HIOManager() virtual
-
virtual HInputHandler *
HIOManager::RegisterInputHandler(char const *file_type, HInputHandler *handler) virtual
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.
-
virtual HOutputHandler *
HIOManager::RegisterOutputHandler(char const *file_type, HOutputHandler *handler) virtual
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.
-
virtual HIOConnector *
HIOManager::RegisterConnector(char const *file_type, HIO_CREATE_FREE_FUNCTION Create, HIO_FREE_CONNECTOR_FUNCTION Free) virtual
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.
-
virtual HInputHandler *
HIOManager::GetInputHandler(char const *file_type) virtual
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: <br /> <br /> <table class=”table_style1” style=”margin-left:auto;margin-right:auto;”> <tr> <th>File Type String </th> <th>Import Module </th> </tr> <tr> <td><strong>”dwg”</strong> </td> <td>HIO_DWG </td> </tr> <tr> <td><strong>”dxf”</strong> </td> <td>HIO_DWG </td> </tr> <tr> <td><strong>”dwg_with_prc”</strong> </td> <td>HIO_Exchange </td> </tr> <tr> <td><strong>”dxf_with_prc”</strong> </td> <td>HIO_Exchange </td> </tr> </table>
Parameters
file_type: The extension to lookup handler for example: “jpg”. See information on special cases below.Returns
TheHInputHandlerregistered for specified file type or 0 if none is registered.
-
HInputHandler *
HIOManager::GetInputHandler(__wchar_t const *file_type)
-
virtual HOutputHandler *
HIOManager::GetOutputHandler(char const *file_type) virtual
Parameters
file_type: The extension to lookup handler for example: “jpg”Returns
TheHOutputHandlerregistered for specified file type or 0 if none is registered.
-
virtual HOutputHandler *
HIOManager::GetOutputHandler(__wchar_t const *file_type) virtual
-
virtual void
HIOManager::RegisterHandlers() virtual
This method registers default file handlers. This called by HDB when it creates a
HIOManager. To avoid the default handlers being set, pass your ownHIOManagerby calling HDB::SetHIOManager().
-
virtual char const *
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”.
-
virtual char const *
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”.
-
virtual HIOConnector *
HIOManager::CreateConnector(char const *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
AnHIOConnectorregistered for specified file type or 0 if none.
-
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 theHIOConnectorobject you wan to free from a given type.
-
void
HIOManager::CleanCallbacks() This method requests that any callbacks registered on handlers be cleaned (when the manager would othewise be deleted)
-
void
HIOManager::SetModuleDirectory(char const *module_directory) Set the directory where the
HIOManagerwill look for dynamically loaded HInputHandlers and HOutputHandlers. This has to be set before calling RegisterHandlers.Parameters
module_directory: The directory where theHIOManagerwill look for HIOs.
-
static HIOManager *
HIOManager::GetCurrentHIOManager() static
This method gets the current
HIOManager. It will create on if none exists.Returns
The current manager from HDB.
-
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.
-
void
HIOManager::RecordOutputHandler(HOutputHandler *handler) private
-
void
HIOManager::RecordInputHandler(HInputHandler *handler) private
Variables
-
struct vhash_s *
HIOManager::input_handlers protected
struct vhash_sA hash of HInputHandlers.
-
struct vhash_s *
HIOManager::output_handlers protected
struct vhash_sA hash of HOutputHandlers.
-
struct vhash_s *
HIOManager::connector_procs protected
struct vhash_sA hash of
HIOConnectorCreate/Free functions.
-
struct vlist_s *
HIOManager::owned_input_handlers protected
struct vlist_sA list of default HInputHandlers created by the manager.
-
struct vlist_s *
HIOManager::owned_output_handlers protected
struct vlist_sA list of default HOutputHandlers created by the manager.
-
struct vlist_s *
HIOManager::loaded_input_handlers protected
struct vlist_sA list of dynamically loaded HInputHandlers libraries.
-
struct vlist_s *
HIOManager::loaded_output_handlers protected
struct vlist_sA list of dynamically loaded HOutputHandlers libraries.
-
struct vhash_s *
HIOManager::created_connectors protected
struct vhash_sA list of created HIOConnectors.
-
char *
HIOManager::m_input_types protected
char
-
int
HIOManager::m_input_types_allocated protected
int
-
char *
HIOManager::m_output_types protected
char
-
int
HIOManager::m_output_types_allocated protected
int
-
char const *
HIOManager::m_module_directory protected
char const