libUTL++
|
Store information about a class. More...
#include <RunTimeClass.h>
Public Member Functions | |
RunTimeClass (const RunTimeClass *baseClass) | |
Constructor. More... | |
RunTimeClass (const RunTimeClass &runTimeClass) | |
Copy constructor. More... | |
virtual Object * | create () const |
Create a new instance of this class. More... | |
bool | _isA (const RunTimeClass *rtc) const |
Determine whether thisClass.isA(givenClass). More... | |
const RunTimeClass * | baseClass () const |
Get the base class. More... | |
const char * | name () const |
Get the name. More... | |
virtual const char * | vname () const |
Get the name. More... | |
virtual size_t | size () const |
Get the size of this class (as in sizeof()). More... | |
Static Public Member Functions | |
static void | printClassNames () |
Print class names. More... | |
static void | add (RunTimeClass *rtc) |
Add a class to the repository of known classes. More... | |
static const RunTimeClass * | find (const char *className) |
Find the RunTimeClass by the given name. More... | |
Store information about a class.
RunTimeClass is the basis of a very limited reflection capability in UTL++. For each utl::Object-derived class, there is an instance of a RunTimeClass-derived type.
Definition at line 23 of file RunTimeClass.h.
|
inline |
Constructor.
baseClass | base class of this class |
Definition at line 30 of file RunTimeClass.h.
|
inline |
Copy constructor.
runTimeClass | RunTimeClass to copy |
Definition at line 40 of file RunTimeClass.h.
|
static |
Print class names.
|
static |
Add a class to the repository of known classes.
Only a concrete class may be added or found. You should not need to call this method manually.
rtc | RunTimeClass to add |
|
inlinevirtual |
Create a new instance of this class.
Reimplemented in utl::TConcreteRunTimeClass< T >.
Definition at line 71 of file RunTimeClass.h.
References ABORT.
|
static |
Find the RunTimeClass by the given name.
className | name of class to find |
bool utl::RunTimeClass::_isA | ( | const RunTimeClass * | rtc | ) | const |
Determine whether thisClass.isA(givenClass).
rtc | RunTimeClass to compare against |
|
inline |
Get the base class.
Definition at line 93 of file RunTimeClass.h.
|
inline |
Get the name.
Definition at line 100 of file RunTimeClass.h.
|
inlinevirtual |
Get the name.
Reimplemented in utl::TRunTimeClass< T >.
Definition at line 107 of file RunTimeClass.h.
References ABORT.
|
inlinevirtual |
Get the size of this class (as in sizeof()).
Reimplemented in utl::TRunTimeClass< T >.
Definition at line 115 of file RunTimeClass.h.
References ABORT.