# HDB

## Functions

| `HDB`
| `~HDB`
void | `Init`
HDB * | `GetHDB`
void | `IncrementInstanceCount`
void | `DecrementInstanceCount`
void | `SetInstanceBase`
char const * | `GetInstanceBase`
void | `SetDriverType`
char const * | `GetDriverType`
bool | `GetCleanInclude`
void | `SetCleanInclude`
int | `GetInstanceCount`
int | `GetUniqueID`
void | `SetInstanceCount`
HImManager * | `GetHImManager`
HImManager * | `SetHImManager`
HIOManager * | `GetHIOManager`
HIOManager * | `SetHIOManager`
HMaterialLibrary * | `GetMaterialLibrary`
void | `SetMaterialLibrary`
HTManager * | `GetHTManager`
HTManager * | `SetHTManager`
HC_KEY | `GetUniqueIncludeKey`
unsigned long | `GetNextCookie`
void | `ReportError`
void | `EnableErrorManager`
void | `DisableErrorManager`
void | `SetOwnsSystem`
bool | `GetOwnsSystem`
void | `SetIsolatedDrivers`
bool | `GetIsolatedDrivers`
void | `SetRetainIOManager`
bool | `GetRetainIOManager`
void | `ReleaseIOManager`
void | `Lock`
void | `UnLock`
bool | `GetPublishExchangeLicenseSet`
void | `SetPublishExchangeLicenseSet`
bool | `GetPublishInitialized`
void | `SetPublishInitialized`
void | `SetModuleDirectory`

## Detailed Description

class `HDB`

  The HDB class serves as a wrapper/utility class to manage an instance of the HOOPS/3dGS scene-graph.

  HDB Stores the information of how many and which type of HOOPS driver instances the associated object HBaseView creates.

  Public Functions

  `HDB`()
  virtual `~HDB`()
  virtual void `Init`()

    Init() initializes the HOOPS attributes for driver type and unsets the default HOOPS alias&#8212;“?Picture”&#8212;for the root segment of the given driver. The function also sets up a default color map and registers the HOOPS I.M. callbacks that are listed in HDB::RegisterHoopsIMCallbacks().

  Public Static Functions

  static HDB *`GetHDB`()

    Returns: | A pointer to the HDB object.

  static void `IncrementInstanceCount`()

    This method augments the number of instances of a driver by one.

  static void `DecrementInstanceCount`()

    This method decrements the number of instances of a driver by one.

  static void `SetInstanceBase`(char const *s)

    This method sets the base name for driver instances.

  static char const *`GetInstanceBase`()

    Returns: | The base name for driver instances.

  static void `SetDriverType`(char const *s)

    This method sets the base driver type for the driver instances.

  static char const *`GetDriverType`()

    Returns: | The base driver type for the driver instances.

  static inline bool `GetCleanInclude`()

    Returns: | True if global includes should be moved to model specific includes during reading.

  static inline void `SetCleanInclude`(bool value)

    This method determines whether global includes should be moved to model specific includes during reading.

    Parameters: | value – Pass true to have global includes move to model specific includes during reading or false to keep the includes.

  static inline int `GetInstanceCount`()

    Returns: | An integer denoting the number of instances of a driver.

  static inline int `GetUniqueID`()

    Returns: | An integer that will be unique during the runtime of the application.

  static inline void `SetInstanceCount`(int count)

    This method sets the number of instances of a driver.

    Parameters: | count – The number of driver instances.

  static HImManager *`GetHImManager`()

    Returns: | A pointer to the current HImManager object (the HOOPS/3dGS I.M. manager). This method creates one if none exists.

  static HImManager *`SetHImManager`(HImManager *manager)

    This method replaces the HOOPS/3dGS I.M. manager.

    Parameters: | manager – A pointer to an HImManager object.
    Returns: | A pointer to the replaced HImManager.

  static HIOManager *`GetHIOManager`()

    Returns: | A pointer to the current HIOManager object (the input/output manager). This method creates one if none exists.

  static HIOManager *`SetHIOManager`(HIOManager *manager)

    This method replaces the input/output manager.

    Parameters: | manager – A pointer to an HIOManager object.
    Returns: | A pointer to the replaced HIOManager.

  static HMaterialLibrary *`GetMaterialLibrary`()

    Returns: | A pointer to the current HMaterialLibrary object (which manages materials resources from disk). Return value is NULL if none exists.

  static void `SetMaterialLibrary`(HMaterialLibrary *library)

    Returns: | Sets the pointer to the material library.

  static HTManager *`GetHTManager`()

    Returns: | A pointer to the current HTManager object (the timer manager). This method creates one if none exists.

  static HTManager *`SetHTManager`(HTManager *manager)

    This method replaces the timer manager.

    Parameters: | manager – A pointer to an HTManager object.
    Returns: | A pointer to the replaced HTManager.

  static HC_KEY `GetUniqueIncludeKey`()

    Returns: | A key to a unique Include Library segment.

  static inline unsigned long `GetNextCookie`()

    Returns: | A globally unique identifier.

  static void `ReportError`(char const *message, int severity = 1, int category = 0, int specific = 0)

    This method generates a HOOPS error. Using this method, allows the error to go through HOOPS so that it will be intercepted by whatever error handlers the app might have registered, and will use the reporting mechanism appropriate to the specific platform.

    Parameters: | message – The text to be posted. severity – If the value is 0, the message is informational. If the value is 1, the message is a warning. If the value is 2, then the message is an error. If the value is 3 or greater, the error is fatal. category – The category that this error falls under as described in #HC_Define_Error_Handler. specific – The specific error under the category as described in #HC_Define_Error_Handler.

  static void `EnableErrorManager`()

    This method initializes the error manager and puts it in use.

  static void `DisableErrorManager`()

    This method cleans up the error manager and then disables it.

  static inline void `SetOwnsSystem`(bool owns)
  static inline bool `GetOwnsSystem`()
  static inline void `SetIsolatedDrivers`(bool isolated)

    Sets the “isolated” driver option. Allows a driver to be spawned on a separate thread. Used for background printing or multiple views.

  static inline bool `GetIsolatedDrivers`()

    Returns: | True if isolated driver is set

  static inline void `SetRetainIOManager`(bool retain)

    Determines whether the IO Manager is retained when an HDB is deleted. Normally it is not retained, but if a program needs to create and destroy multiple HDBs, and also uses HIO modules like DWG that can only be loaded once per process, it will need to activate retaining (and manually request the release)

  static inline bool `GetRetainIOManager`()

    Returns: | True if Retain IO Manager is set

  static void `ReleaseIOManager`()

    Turns off the retain state and requests the immediate release of the IO Manager if there are no active GDNs.

  static void `Lock`()
  static void `UnLock`()
  static inline bool `GetPublishExchangeLicenseSet`()
  static void `SetPublishExchangeLicenseSet`(bool isSet)
  static inline bool `GetPublishInitialized`()
  static void `SetPublishInitialized`(bool initialized)
  static void `SetModuleDirectory`(char const *module_directory)

    Set the directory where the module is located. This is used to find the location of the module’s resources. Useful for Java application where the available location return the VM location and not the module location. Has to be set before the first call to HDB::GetHIOManager() or it will throw.

    Parameters: | module_directory – The directory where the module is located

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