#include <BaseClass.h>
Class hierarchy reflection base class. More...
Class hierarchy reflection base class.
This class provides information on the class and parent classes of components. It is created by using the SOFA_CLASS macro on each new class declaration. All classes deriving from Base should use the SOFA_CLASS macro within their declaration.
Public Attributes | |
std::string | namespaceName |
std::string | typeName |
std::string | className |
std::string | templateName |
std::string | shortName |
helper::vector< const BaseClass * > | parents |
Public Member Functions | |
bool | hasParent (const BaseClass *c) const |
returns true iff c is a parent class of this More... | |
bool | hasParent (const std::string &parentClassName) const |
returns true iff a parent class of this is named parentClassName More... | |
bool | operator== (const BaseClass &c) const |
bool | operator!= (const BaseClass &c) const |
virtual void * | dynamicCast (Base *obj) const =0 |
virtual bool | isInstance (Base *obj) const =0 |
Static Public Member Functions | |
static std::string | decodeFullName (const std::type_info &t) |
static std::string | decodeTypeName (const std::type_info &t) |
Helper method to decode the type name to a more readable form if possible. More... | |
static std::string | decodeClassName (const std::type_info &t) |
Helper method to extract the class name (removing namespaces and templates) More... | |
static std::string | decodeNamespaceName (const std::type_info &t) |
Helper method to extract the namespace (removing class name and templates) More... | |
static std::string | decodeTemplateName (const std::type_info &t) |
Helper method to extract the template name (removing namespaces and class name) More... | |
template<class T > | |
static std::string | defaultTypeName (const T *=nullptr) |
Helper method to get the type name. More... | |
Protected Member Functions | |
BaseClass () | |
virtual | ~BaseClass () |
std::string sofa::core::objectmodel::BaseClass::className |
std::string sofa::core::objectmodel::BaseClass::namespaceName |
helper::vector<const BaseClass*> sofa::core::objectmodel::BaseClass::parents |
std::string sofa::core::objectmodel::BaseClass::shortName |
std::string sofa::core::objectmodel::BaseClass::templateName |
std::string sofa::core::objectmodel::BaseClass::typeName |
|
protected |
|
protectedvirtual |
|
static |
Helper method to extract the class name (removing namespaces and templates)
|
static |
DEPRECATED ////////////////////////////////////////////////// Helper method to decode the type name
|
static |
Helper method to extract the namespace (removing class name and templates)
|
static |
Helper method to extract the template name (removing namespaces and class name)
|
static |
Helper method to decode the type name to a more readable form if possible.
|
inlinestatic |
Helper method to get the type name.
|
pure virtual |
returns true iff c is a parent class of this
|
inline |
returns true iff a parent class of this is named parentClassName