The HObjectManager class keeps track of generic MVO objects. More...

#include <HEventManager.h>

Public Member Functions

HObjectAddHObject (HObject *hobject)
 
HObjectGetHObject (const char *name)
 
 HObjectManager ()
 
HObjectRemoveHObject (const char *name)
 

Static Public Member Functions

static void FileLoadHObjectCheck (HC_KEY segkey)
 
static HC_KEY FindHObjectSegment (HC_KEY segkey, char *res=0, char *ores=0)
 
static void SetHObjectInfo (const char *objectinfo)
 
static void SetHObjectSegment (const char *objecttype)
 

Protected Attributes

struct vhash_s * m_pObjectHash
 

Static Protected Attributes

static long object_segment_count
 

Detailed Description

The HObjectManager class keeps track of generic MVO objects.

By registering with the HObjectManager, a class derived from HObject can store persistent data and receive events.

Constructor & Destructor Documentation

◆ HObjectManager()

HObjectManager::HObjectManager ( )

Constructs an HObjectManager object.

Member Function Documentation

◆ AddHObject()

HObject* HObjectManager::AddHObject ( HObject hobject)

This method adds a new object to the object list.

Parameters
hobjectA pointer to the HObject to add.
Returns
A pointer to the HObject that was replaced by the passed object if there was an object with the same name already or null if there was no object with the same name already in the list.

◆ FileLoadHObjectCheck()

static void HObjectManager::FileLoadHObjectCheck ( HC_KEY  segkey)
static

This method is called when a file finishes loading. This function checks whether there are any object segments.

Parameters
segkeyThe segment to search from.

◆ FindHObjectSegment()

static HC_KEY HObjectManager::FindHObjectSegment ( HC_KEY  segkey,
char *  res = 0,
char *  ores = 0 
)
static

Given a segment key, this methods finds the next object segment that this segment is contained in.

Parameters
segkeyThe segment to search from.
resIf non-zero, returns name of object.
oresIf non-zero, returns object information.
Returns
The segment key corresponding to object segment or invalid key.

◆ GetHObject()

HObject* HObjectManager::GetHObject ( const char *  name)

This method retrieves an object from object list based on object name.

Parameters
nameThe name of the object to be retrieved.
Returns
A pointer to the retrieved HObject or null if none was found.

◆ RemoveHObject()

HObject* HObjectManager::RemoveHObject ( const char *  name)

This method removes an object from the object list.

Parameters
nameThe name of the object to be removed.
Returns
A pointer to the removed object or null if none was found.

◆ SetHObjectInfo()

static void HObjectManager::SetHObjectInfo ( const char *  objectinfo)
static

The method declares the currently open segment an object segment, associates an object name with it if it doesn't have one and set the object info.

Parameters
objectinfoA pointer to the infodata for object.

◆ SetHObjectSegment()

static void HObjectManager::SetHObjectSegment ( const char *  objecttype)
static

This method declares the currently open segment an object segment and associates an object name with it.

Parameters
objecttypeThe name which you want to label the object as.

Member Data Documentation

◆ m_pObjectHash

struct vhash_s* HObjectManager::m_pObjectHash
protected

Object Hash


The documentation for this class was generated from the following file: