Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
CoreClassInfo Class Reference

Public Member Functions

 CoreClassInfo (const char *class_name, const CoreClassInfo *base_class_info=nullptr)
 
 ~CoreClassInfo ()
 Destructor.
 
 CoreClassInfo (const CoreClassInfo &)=delete
 
 CoreClassInfo (CoreClassInfo &&)=delete
 
CoreClassInfooperator= (const CoreClassInfo &)=delete
 
CoreClassInfooperator= (CoreClassInfo &&)=delete
 
bool operator== (const CoreClassInfo &info) const
 Equality operator.
 
bool operator!= (const CoreClassInfo &info) const
 Inequality operator.
 
const char * get_name () const
 Get the name of the class.
 
const unsigned long & get_id () const
 Get the unique ID of the class.
 
const unsigned int & get_index () const
 
const CoreClassInfoget_base_class_info () const
 Returns the parent class. Returns nullptr if this is a base class.
 
const CoreVector
< CoreClassInfo * > & 
get_children_info () const
 Get the list of classes inheriting form this one.
 
bool is_base_class () const
 Returns whether this class is a base class or not.
 
bool is_kindof (const CoreClassInfo &cinfo) const
 Checks if this class is or inherit from cinfo.
 

Static Public Member Functions

static CoreClassInfois_class_exists (const CoreString &class_name)
 Alias for get_class.
 
static CoreClassInfois_class_exists (const char *class_name)
 Alias for get_class.
 
static CoreClassInfoget_class (const CoreString &class_name)
 
static CoreClassInfonew_class (const char *class_name, const CoreClassInfo *base_class_info=nullptr)
 
static void get_classes (CoreArray< CoreString > &classes)
 
static void get_classes (CoreArray< CoreClassInfo * > &classes)
 
static CoreClassInfoget_class_by_index (const unsigned int &index)
 Get a class info by index.
 
static unsigned int get_class_count ()
 Get the number of registered classees.
 
static const char * generate_template_container_name (const char *class_name, unsigned int index)
 

Detailed Description

Class information for RTTI.

See Also
CoreClassInfo RTTI Macros

Constructor & Destructor Documentation

CoreClassInfo::CoreClassInfo ( const char *  class_name,
const CoreClassInfo base_class_info = nullptr 
)
explicit

Constructor.

Parameters
class_nameName of the class
base_class_infoPointer to the CoreClassInfo instance we're inheriting from, nullptr if we're a base class.

Member Function Documentation

CoreClassInfo * CoreClassInfo::get_class ( const CoreString class_name)
static

Get a CoreClassInfo by name.

Parameters
class_nameThe name of the class.
Returns
The CoreClassInfo, or nullptr if no class matched class_name
void CoreClassInfo::get_classes ( CoreArray< CoreString > &  classes)
static

Get the names of the registered classes.

Parameters
classesThe result.
void CoreClassInfo::get_classes ( CoreArray< CoreClassInfo * > &  classes)
static

Get the registered classes.

Parameters
classesThe result.
const unsigned int & CoreClassInfo::get_index ( ) const
inline

Get the index of the class.

See Also
get_class_by_index
CoreClassInfo * CoreClassInfo::new_class ( const char *  class_name,
const CoreClassInfo base_class_info = nullptr 
)
static

Create a new class, or return existing ones. Log an error and return nullptr if we found an existing class but the base_class_info didn't match.

Parameters
class_nameName of the class
base_class_infoThe class we're inheriting from, nullptr if we're a base class.
Returns
The newly created class, or the existing one, or nullptr in case of errors.