HDB

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.

Methods

HDB::HDB()
virtual HDB::~HDB()

virtual

virtual void HDB::Init()

virtual

Init() initializes the HOOPS attributes for driver type and unsets the default HOOPS alias”?Picture”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().

static HDB *HDB::GetHDB()

static

Returns

A pointer to the HDB object.
static void HDB::IncrementInstanceCount()

static

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

static void HDB::DecrementInstanceCount()

static

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

static void HDB::SetInstanceBase(char const *s)

static

This method sets the base name for driver instances.

static char const *HDB::GetInstanceBase()

static

Returns

The base name for driver instances.
static void HDB::SetDriverType(char const *s)

static

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

static char const *HDB::GetDriverType()

static

Returns

The base driver type for the driver instances.
static bool HDB::GetCleanInclude()

static

Returns

True if global includes should be moved to model specific includes during reading.
static void HDB::SetCleanInclude(bool value)

static

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 int HDB::GetInstanceCount()

static

Returns

An integer denoting the number of instances of a driver.
static int HDB::GetUniqueID()

static

Returns

An integer that will be unique during the runtime of the application.
static void HDB::SetInstanceCount(int count)

static

This method sets the number of instances of a driver.

Parameters

count: The number of driver instances.
static HImManager *HDB::GetHImManager()

static

Returns

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

static

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 *HDB::GetHIOManager()

static

Returns

A pointer to the current HIOManager object (the input/output manager). This method creates one if none exists.
static HIOManager *HDB::SetHIOManager(HIOManager *manager)

static

This method replaces the input/output manager.

Parameters

manager: A pointer to an HIOManager object.

Returns

A pointer to the replaced HIOManager.
static HMaterialLibrary *HDB::GetMaterialLibrary()

static

Returns

A pointer to the current HMaterialLibrary object (which manages materials resources from disk). Return value is NULL if none exists.
static void HDB::SetMaterialLibrary(HMaterialLibrary *library)

static

Returns

Sets the pointer to the material library.
static HTManager *HDB::GetHTManager()

static

Returns

A pointer to the current HTManager object (the timer manager). This method creates one if none exists.
static HTManager *HDB::SetHTManager(HTManager *manager)

static

This method replaces the timer manager.

Parameters

manager: A pointer to an HTManager object.

Returns

A pointer to the replaced HTManager.
static HC_KEY HDB::GetUniqueIncludeKey()

static

Returns

A key to a unique Include Library segment.
static unsigned long HDB::GetNextCookie()

static

Returns

A globally unique identifier.
static void HDB::ReportError(char const *message, int severity = 1, int category = 0, int specific = 0)

static

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 HDB::EnableErrorManager()

static

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

static void HDB::DisableErrorManager()

static

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

static void HDB::SetOwnsSystem(bool owns)

static

static bool HDB::GetOwnsSystem()

static

static void HDB::SetIsolatedDrivers(bool isolated)

static

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

static bool HDB::GetIsolatedDrivers()

static

Returns

True if isolated driver is set
static void HDB::SetRetainIOManager(bool retain)

static

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 bool HDB::GetRetainIOManager()

static

Returns

True if Retain IO Manager is set
static void HDB::ReleaseIOManager()

static

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

static void HDB::Lock()

static

static void HDB::UnLock()

static

static bool HDB::GetPublishExchangeLicenseSet()

static

static void HDB::SetPublishExchangeLicenseSet(bool isSet)

static

static bool HDB::GetPublishInitialized()

static

static void HDB::SetPublishInitialized(bool initialized)

static

static void HDB::SetModuleDirectory(char const *module_directory)

static

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

Variables

HDB *HDB::m_pHDB

private static

void *HDB::m_Mutex

private static

void
int HDB::m_InstanceCount

private static

int

The number of driver instances.

int HDB::m_nextUID

private static

int

A number that will be unique each time its accessed.

char *HDB::m_pInstanceBase

private static

char

The base name for the driver instances.

char *HDB::m_pDriverType

private static

char

The base driver type for the driver instances.

bool HDB::m_bCleanInclude

private static

bool

move global includes to model specific include segments

bool HDB::m_bUsingErrorManager

private static

bool

are we using the error manager

bool HDB::m_bOwnsSystem

private static

bool

do we own the system

bool HDB::m_bIsolatedDrivers

private static

bool
bool HDB::m_bRetainIOManager

private static

bool
HImManager *HDB::m_pHImManager

private static

HIOManager *HDB::m_pHIOManager

private static

HIOManager
HMaterialLibrary *HDB::m_pHMaterialLibrary

private static

HTManager *HDB::m_pHTManager

private static

unsigned long HDB::include_counter

private static

unsigned long
unsigned long HDB::next_cookie

private static

unsigned long

the next identifier to be used when GetNextCookie is called

bool HDB::m_bPublishExchangeLicenseSet

private static

bool
bool HDB::m_bPublishInitialized

private static

bool
char *HDB::m_module_directory

private static

char