Collaboration diagram for CLocal:
Public Member Functions | |
void | Construct () |
The Construct function sets up the internal structure of the CLocal object. | |
void | Destruct () |
The Destruct function properly de-allocates and cleans up the internal structure of a CLocal. | |
void | AddTypedDataAndLength (unsigned long type, unsigned long length, const void *data) |
The AddTypedDataAndLength attaches data to the CLocal object. | |
__int8 * | GetDataByType (unsigned long type) const |
GetDataByType returns a pointer to data attached to a CLocal. | |
Public Attributes | |
CThingArray | localrefs |
references to CThings that are associated with this local | |
PointerArray | datumrefs |
references to data that may be associated with this object -- see data format for more | |
CThing * | container |
the owner, may be null, indicates that the CLocal is a member of another rebi | |
CThingArray | destobjects |
A list of all objects that locals of this rebi are tied to. | |
LongArray | localtierefs |
A list of all the names (as string indices) of the locals that are tied. | |
LongArray | desttierefs |
A list of all the names (as string indices) of the locals in the destination rebi that are tied. |
Not all CThing objects have a CLocal associated with them, only the ones that represent instances of rebis do. A CLocal may only be attached to a single CThing at a time.
|
The AddTypedDataAndLength attaches data to the CLocal object. This function is used primarily internally, it is usually best to use AddData instead. If the CLocal already has data attached of the same type the old data is removed and replaced with the new data. The data that is attached is a copy of the data that you pass. Any alterations to this data after it has been added will not affect the data that is attached. Likewise if your data pointer was dynamically allocated it is safe (and probably neccessary) to free it.
|
|
The Construct function sets up the internal structure of the CLocal object. If you create a CLocal though a call to malloc or new you must call its construct function after creating it. The Construct function is properly used by any functions in this API that returns a new CLocal.
|
|
The Destruct function properly de-allocates and cleans up the internal structure of a CLocal. If you are manually destroying a CLocal by any method you must call Destruct on it before doing so. Failure to call Destruct will cause memory leaks.
|
|
GetDataByType returns a pointer to data attached to a CLocal. This function is used primarily internally, it is usually best to use GetData instead. If the type of data requested cannot be found NULL is returned. The pointer returned is to the data itsself and not to a copy. Modifying this data will affect the attached data. Freeing the returned pointer is an error. If you are unsure how long the attached data is you can use GetDataLength to find out.
|