HObjectManager
-
class
HObjectManager The
HObjectManagerclass keeps track of generic MVO objects.By registering with the
HObjectManager, a class derived fromHObjectcan store persistent data and receive events.
Methods
-
HObjectManager::HObjectManager() Constructs an
HObjectManagerobject.
-
virtual
HObjectManager::~HObjectManager() virtual
-
HObject *
HObjectManager::AddHObject(HObject *hobject) This method adds a new object to the object list.
Parameters
hobject: A pointer to theHObjectto add.Returns
A pointer to theHObjectthat 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.
-
HObject *
HObjectManager::RemoveHObject(char const *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.
-
HObject *
HObjectManager::GetHObject(char const *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 retrievedHObjector null if none was found.
-
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.
-
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 void
HObjectManager::SetHObjectSegment(char const *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.
-
static void
HObjectManager::SetHObjectInfo(char const *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.
Variables
-
struct vhash_s *
HObjectManager::m_pObjectHash protected
struct vhash_sObject Hash
-
long
HObjectManager::object_segment_count protected static
long