HObjectManager

Functions

HObjectManager

~HObjectManager

HObject *

AddHObject

HObject *

RemoveHObject

HObject *

GetHObject

HC_KEY

FindHObjectSegment

void

FileLoadHObjectCheck

void

SetHObjectSegment

void

SetHObjectInfo

Detailed Description

class HObjectManager

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.

Public Functions

HObjectManager()

Constructs an HObjectManager object.

virtual ~HObjectManager()
HObject *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.

HObject *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 *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 retrieved HObject or null if none was found.

Public Static Functions

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

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 FileLoadHObjectCheck(HC_KEY segkey)

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 SetHObjectSegment(char const *objecttype)

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 SetHObjectInfo(char const *objectinfo)

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.