Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CThing Class Reference

The CThing class represents a single rebi in the Centum virtual machine. More...

Collaboration diagram for CThing:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void Construct (CProcessData *owner)
 The Construct function sets up the internal structure of the CThing object.
void Destruct ()
 The Destruct function properly de-allocates and cleans up the internal structure of a CThing.

Public Attributes

long refcount
 the number of references to this rebi instance
unsigned long flags
 flags for this rebi
CDefinitiondef
 the definiton associated with the CThing, always valid and non-null
CLocallocal
 the local instance associated with the thing, may be null for rebi that are not instances
CProcessDataownerprocess
 the process this CThing belongs to, is always valid and non-null
HANDLE mutex
 the unique mutex for this CThing
CThingArray pointedto
 a list of pointers of CThings that reference this one, used for garbage collection

Detailed Description

The CThing class represents a single rebi in the Centum virtual machine.

The CThing itself only keeps track of garbage collection infromation, and special flags. All other data is stored inside the CDefinition and possibly inside a CLocal if it is an instance. CThings each have an internal mutec that should be acquired before using their member variables.


Member Function Documentation

void CThing::Construct CProcessData owner  ) 
 

The Construct function sets up the internal structure of the CThing object.

If you create a CDefinition 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 CThing.

See also:
CThing::Destruct()

void CThing::Destruct  ) 
 

The Destruct function properly de-allocates and cleans up the internal structure of a CThing.

If you are manually destroying a CThing by any method you must call Destruct on it before doing so. Failure to call Destruct will cause memory leaks.

See also:
CThing::Construct()


The documentation for this class was generated from the following files:
Generated on Sat Apr 16 16:31:09 2005 for Centum API by  doxygen 1.4.2