Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HObjectManager Class Reference

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

#include <HEventManager.h>

List of all members.

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 (  ) 

Constructs an HObjectManager object.


Member Function Documentation

HObject* HObjectManager::AddHObject ( HObject hobject  ) 

This method adds a new object to the object list.

Parameters:
hobject A 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.

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:
segkey The segment to search from.

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:
segkey The segment to search from.
res If non-zero, returns name of object.
ores If non-zero, returns object information.
Returns:
The segment key corresponding to object segment or invalid key.

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

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

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

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

This method removes an object from the object list.

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

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:
objectinfo A pointer to the infodata for object.

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:
objecttype The name which you want to label the object as.


Member Data Documentation

struct vhash_s* HObjectManager::m_pObjectHash [read, protected]

Object Hash


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