CC_CLASSINIT Class Reference

This type is important because it is used to build up the runtime class information used by CCObject and CCRuntimeClass. What happens is that any class declared as dynamic has a static instance of an object of this type. This static object is declared by the CC_IMPLEMENT_{DYNAMIC,DYNCREATE} macro. Declaring this object as static means that its constructor is called at program startup (very early on in the initialisation. The constructor is the important part - the object is declared passing in a pointer to the runtime class object (CCRuntimeClass) associated with the class in question. The CC_CLASSINIT then adds this object to the list of classes maintained and used by the CCRuntimeClass class. More...

#include <ccobject.h>

List of all members.

Public Member Functions

 CC_CLASSINIT (CCRuntimeClass *pNewClass)
 This constructor adds a given class (which should be derived from CCObject) to the list of classes that support dynamic classing/creation.


Detailed Description

This type is important because it is used to build up the runtime class information used by CCObject and CCRuntimeClass. What happens is that any class declared as dynamic has a static instance of an object of this type. This static object is declared by the CC_IMPLEMENT_{DYNAMIC,DYNCREATE} macro. Declaring this object as static means that its constructor is called at program startup (very early on in the initialisation. The constructor is the important part - the object is declared passing in a pointer to the runtime class object (CCRuntimeClass) associated with the class in question. The CC_CLASSINIT then adds this object to the list of classes maintained and used by the CCRuntimeClass class.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/7/93
See also:
CCObject; CCRuntimeClass

Definition at line 632 of file ccobject.h.


Constructor & Destructor Documentation

CC_CLASSINIT::CC_CLASSINIT CCRuntimeClass pNewClass  ) 
 

This constructor adds a given class (which should be derived from CCObject) to the list of classes that support dynamic classing/creation.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/7/93
Parameters:
pNewClass - pointer to the CCRuntimeClass object associated with the class [INPUTS] that is to be registered.
- [OUTPUTS]
Returns:
-
Do not use this directly - use the CC_DECLARE/IMPLEMENT macros instead.
Returns:
Errors: -
See also:
CCObject; CCRuntimeClass; CCObject::GetRuntimeClass; CCObject::IsKindOf; CC_RUNTIME_CLASS; CC_DECLARE_DYNAMIC; CC_IMPLEMENT_DYNAMIC; CC_DECLARE_DYNCREATE; CC_IMPLEMENT_DYNCREATE; CC_CLASS_MEMDUMP; CC_DECLARE_MEMDUMP; CC_IMPLEMENT_MEMDUMP

Definition at line 1099 of file ccobject.cpp.

01100 {
01101     // Make sure it hasn't been added already
01102     ENSURE( pNewClass->m_pNextClass == NULL, 
01103             "CC_CLASSINIT::CC_CLASSINIT: pNewClass has been added already!");
01104     
01105     // Insert the object at the head of the list used by CCRuntimeClass.
01106     pNewClass->m_pNextClass = CCRuntimeClass::pFirstClass;
01107     CCRuntimeClass::pFirstClass = pNewClass;
01108 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:58 2007 for Camelot by  doxygen 1.4.4