|
Nebula
|
#include <rtti.h>
Nebula's runtime type information for one class.
Every class derived from Core::RefCounted should use the macros __DeclareClass and __ImplementClass to properly initialize the runtime type information for the class. This will also automatically register the class with the Core::Factory object to implement object construction from class name string or fourcc code.
Public Types | |
| typedef void *(* | Creator) () |
| define a creation callback function prototype | |
| typedef void *(* | ArrayCreator) (SizeT) |
Public Member Functions | |
| Rtti (const char *className, Util::FourCC fcc, Creator creatorFunc, ArrayCreator arrayCreatorFunc, const Core::Rtti *parentClass, SizeT instSize) | |
| constructor | |
| Rtti (const char *className, Creator creatorFunc, ArrayCreator arrayCreatorFunc, const Core::Rtti *parentClass, SizeT instSize) | |
| legacy constructor without FourCC for Mangalore compatibility | |
| bool | operator== (const Rtti &rhs) const |
| equality operator | |
| bool | operator!= (const Rtti &rhs) const |
| inequality operator | |
| const Util::String & | GetName () const |
| get class name | |
| Util::FourCC | GetFourCC () const |
| get four character code of class | |
| const Core::Rtti * | GetParent () const |
| get pointer to parent class | |
| SizeT | GetInstanceSize () const |
| get instance size in bytes | |
| void * | Create () const |
| create an object of this class | |
| void * | CreateArray (SizeT num) const |
| create an array of objects of this class | |
| bool | IsDerivedFrom (const Rtti &other) const |
| return true if this rtti is equal or derived from to other rtti | |
| bool | IsDerivedFrom (const Util::String &otherClassName) const |
| return true if this rtti is equal or derived from to other rtti, by string | |
| bool | IsDerivedFrom (const Util::FourCC &otherClassFourCC) const |
| return true if this rtti is equal or derived from to other rtti, by fourcc | |
| void * | AllocInstanceMemory () |
| allocate instance memory block (called by class new operator) | |
| void * | AllocInstanceMemoryArray (size_t num) |
| allocate instance memory array block (called by class new operator) | |
| void | FreeInstanceMemory (void *ptr) |
| free instance memory block (called by class delete operator) | |
Private Member Functions | |
| void | Construct (const char *className, Util::FourCC fcc, Creator creatorFunc, ArrayCreator arrayCreatorFunc, const Core::Rtti *parentClass, SizeT instSize) |
| constructor method, called from the various constructors | |
Private Attributes | |
| Util::String | name |
| const Core::Rtti * | parent |
| Util::FourCC | fourCC |
| SizeT | instanceSize |
| Creator | creator |
| ArrayCreator | arrayCreator |
| typedef void *(* Core::Rtti::ArrayCreator) (SizeT) |
| typedef void *(* Core::Rtti::Creator) () |
define a creation callback function prototype
| Core::Rtti::Rtti | ( | const char * | className, |
| Util::FourCC | fcc, | ||
| Creator | creatorFunc, | ||
| ArrayCreator | arrayCreatorFunc, | ||
| const Core::Rtti * | parentClass, | ||
| SizeT | instSize ) |
constructor
| Core::Rtti::Rtti | ( | const char * | className, |
| Creator | creatorFunc, | ||
| ArrayCreator | arrayCreatorFunc, | ||
| const Core::Rtti * | parentClass, | ||
| SizeT | instSize ) |
legacy constructor without FourCC for Mangalore compatibility
| void * Core::Rtti::AllocInstanceMemory | ( | ) |
allocate instance memory block (called by class new operator)
| void * Core::Rtti::AllocInstanceMemoryArray | ( | size_t | num | ) |
allocate instance memory array block (called by class new operator)
|
private |
constructor method, called from the various constructors
| void * Core::Rtti::Create | ( | ) | const |
create an object of this class
| void * Core::Rtti::CreateArray | ( | SizeT | num | ) | const |
create an array of objects of this class
| void Core::Rtti::FreeInstanceMemory | ( | void * | ptr | ) |
free instance memory block (called by class delete operator)
|
inline |
get four character code of class
|
inline |
get instance size in bytes
|
inline |
get class name
|
inline |
get pointer to parent class
| bool Core::Rtti::IsDerivedFrom | ( | const Rtti & | other | ) | const |
return true if this rtti is equal or derived from to other rtti
| bool Core::Rtti::IsDerivedFrom | ( | const Util::FourCC & | otherClassFourCC | ) | const |
return true if this rtti is equal or derived from to other rtti, by fourcc
| bool Core::Rtti::IsDerivedFrom | ( | const Util::String & | otherClassName | ) | const |
return true if this rtti is equal or derived from to other rtti, by string
|
inline |
inequality operator
|
inline |
equality operator
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |