SOFA API  c3aa7d31
Open source framework for multi-physics simuation
sofa::core::objectmodel::BaseClass Class Referenceabstract

#include <BaseClass.h>

Class hierarchy reflection base class. More...

Inheritance diagram for sofa::core::objectmodel::BaseClass:

Detailed Description

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
 
type::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 BasedynamicCast (Base *obj) const =0
 
virtual bool isInstance (Base *obj) const =0
 

Protected Member Functions

 BaseClass ()
 
virtual ~BaseClass ()
 

Attribute details

◆ className

std::string sofa::core::objectmodel::BaseClass::className

◆ namespaceName

std::string sofa::core::objectmodel::BaseClass::namespaceName

◆ parents

type::vector<const BaseClass*> sofa::core::objectmodel::BaseClass::parents

◆ shortName

std::string sofa::core::objectmodel::BaseClass::shortName

◆ templateName

std::string sofa::core::objectmodel::BaseClass::templateName

◆ typeName

std::string sofa::core::objectmodel::BaseClass::typeName

Constructor details

◆ BaseClass()

sofa::core::objectmodel::BaseClass::BaseClass ( )
protected

◆ ~BaseClass()

sofa::core::objectmodel::BaseClass::~BaseClass ( )
protectedvirtual

Function details

◆ dynamicCast()

virtual Base* sofa::core::objectmodel::BaseClass::dynamicCast ( Base obj) const
pure virtual

◆ hasParent() [1/2]

bool sofa::core::objectmodel::BaseClass::hasParent ( const BaseClass c) const
inline

returns true iff c is a parent class of this

◆ hasParent() [2/2]

bool sofa::core::objectmodel::BaseClass::hasParent ( const std::string &  parentClassName) const
inline

returns true iff a parent class of this is named parentClassName

◆ isInstance()

virtual bool sofa::core::objectmodel::BaseClass::isInstance ( Base obj) const
pure virtual

◆ operator!=()

bool sofa::core::objectmodel::BaseClass::operator!= ( const BaseClass c) const
inline

◆ operator==()

bool sofa::core::objectmodel::BaseClass::operator== ( const BaseClass c) const
inline