#include <OBTAbstractAttribute.h>
Public Member Functions | |
virtual | ~AbstractAttribute () |
const char * | getName () const |
virtual bool | isReadOnly () const =0 |
virtual const RTTI & | getOwnerRTTI () const =0 |
virtual const RTTI & | getRTTI () const |
Static Public Member Functions | |
static const RTTI & | getClassRTTI () |
Protected Member Functions | |
AbstractAttribute (const char *name) | |
Static Private Member Functions | |
static void | initRTTI () |
static void | destroyRTTI () |
Private Attributes | |
std::string | _name |
Attribute name. | |
Static Private Attributes | |
static RTTI * | _rtti |
RTTI information. |
Definition at line 20 of file OBTAbstractAttribute.h.
AbstractAttribute::~AbstractAttribute | ( | ) | [virtual] |
AbstractAttribute::AbstractAttribute | ( | const char * | name | ) | [protected] |
constructor
name | name of this attribute. |
Definition at line 13 of file OBTAbstractAttribute.cpp.
References _rtti, and initRTTI().
00014 : 00015 _name( name ) 00016 { 00017 // On the contrary to all other classes supporting RTTI, this class stores RTTI 00018 // information as a pointer. This is to avoid a dependency cycle, since RTTI.h 00019 // includes AbstractAttribute.h 00020 if ( _rtti == NULL ) 00021 { 00022 // creating the first instance, initialize the RTTI. 00023 initRTTI() ; 00024 } 00025 }
const char * OBT::AbstractAttribute::getName | ( | ) | const [inline] |
get the inspectable attribute name
Definition at line 93 of file OBTAbstractAttribute.h.
References _name.
00094 { 00095 return _name.c_str() ; 00096 }
virtual bool OBT::AbstractAttribute::isReadOnly | ( | ) | const [pure virtual] |
test if the attribute can be set
Implemented in OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >, OBT::TypedAttribute< TOwner, TAttribute >, OBT::PrimitiveAttribute< const TOwner, char *, 1135290523 >, OBT::PrimitiveAttribute< TOwner, short, 1933918052 >, OBT::PrimitiveAttribute< TOwner, unsigned short, 2009635584 >, OBT::PrimitiveAttribute< TOwner, unsigned int, 1543155168 >, OBT::PrimitiveAttribute< TOwner, unsigned long, 3266407847 >, OBT::PrimitiveAttribute< TOwner, bool, 1991421614 >, OBT::PrimitiveAttribute< TOwner, int, 2240172011 >, OBT::PrimitiveAttribute< TOwner, long, 1468120404 >, OBT::PrimitiveAttribute< TOwner, float, 1498253751 >, and OBT::PrimitiveAttribute< TOwner, double, 1608088171 >.
virtual const RTTI& OBT::AbstractAttribute::getOwnerRTTI | ( | ) | const [pure virtual] |
returns RTTI info associated with the owner of the attribute
Implemented in OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >, OBT::TypedAttribute< TOwner, TAttribute >, OBT::PrimitiveAttribute< const TOwner, char *, 1135290523 >, OBT::PrimitiveAttribute< TOwner, short, 1933918052 >, OBT::PrimitiveAttribute< TOwner, unsigned short, 2009635584 >, OBT::PrimitiveAttribute< TOwner, unsigned int, 1543155168 >, OBT::PrimitiveAttribute< TOwner, unsigned long, 3266407847 >, OBT::PrimitiveAttribute< TOwner, bool, 1991421614 >, OBT::PrimitiveAttribute< TOwner, int, 2240172011 >, OBT::PrimitiveAttribute< TOwner, long, 1468120404 >, OBT::PrimitiveAttribute< TOwner, float, 1498253751 >, and OBT::PrimitiveAttribute< TOwner, double, 1608088171 >.
const RTTI & AbstractAttribute::getRTTI | ( | ) | const [virtual] |
Returns RTTI info associated with this class instance
Reimplemented in OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >, OBT::TypedAttribute< TOwner, TAttribute >, OBT::PrimitiveAttribute< const TOwner, char *, 1135290523 >, OBT::PrimitiveAttribute< TOwner, short, 1933918052 >, OBT::PrimitiveAttribute< TOwner, unsigned short, 2009635584 >, OBT::PrimitiveAttribute< TOwner, unsigned int, 1543155168 >, OBT::PrimitiveAttribute< TOwner, unsigned long, 3266407847 >, OBT::PrimitiveAttribute< TOwner, bool, 1991421614 >, OBT::PrimitiveAttribute< TOwner, int, 2240172011 >, OBT::PrimitiveAttribute< TOwner, long, 1468120404 >, OBT::PrimitiveAttribute< TOwner, float, 1498253751 >, and OBT::PrimitiveAttribute< TOwner, double, 1608088171 >.
Definition at line 75 of file OBTAbstractAttribute.cpp.
References _rtti.
00076 { 00077 return *_rtti ; 00078 }
const RTTI & AbstractAttribute::getClassRTTI | ( | ) | [static] |
Returns RTTI info associated with this class type
Reimplemented in OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >, OBT::TypedAttribute< TOwner, TAttribute >, OBT::PrimitiveAttribute< const TOwner, char *, 1135290523 >, OBT::PrimitiveAttribute< TOwner, short, 1933918052 >, OBT::PrimitiveAttribute< TOwner, unsigned short, 2009635584 >, OBT::PrimitiveAttribute< TOwner, unsigned int, 1543155168 >, OBT::PrimitiveAttribute< TOwner, unsigned long, 3266407847 >, OBT::PrimitiveAttribute< TOwner, bool, 1991421614 >, OBT::PrimitiveAttribute< TOwner, int, 2240172011 >, OBT::PrimitiveAttribute< TOwner, long, 1468120404 >, OBT::PrimitiveAttribute< TOwner, float, 1498253751 >, and OBT::PrimitiveAttribute< TOwner, double, 1608088171 >.
Definition at line 60 of file OBTAbstractAttribute.cpp.
References _rtti, and initRTTI().
00061 { 00062 if ( _rtti == NULL ) 00063 { 00064 // First call to getClassRTTI and no instance has been created yet : 00065 // initialize RTTI. 00066 initRTTI() ; 00067 } 00068 return *_rtti ; 00069 }
void AbstractAttribute::initRTTI | ( | ) | [static, private] |
Initialize RTTI information for this class.
Called on creation of the first instance, or on the first call to the static member method getClassRTTI if no instance has been created yet.
Definition at line 38 of file OBTAbstractAttribute.cpp.
References _rtti, destroyRTTI(), and OBT_DBG_ASSERT.
Referenced by AbstractAttribute(), and getClassRTTI().
00039 { 00040 OBT_DBG_ASSERT( _rtti == NULL ) ; 00041 _rtti = new RTTI( 2353935542, typeid( AbstractAttribute ).name(), NULL, 0 ) ; 00042 // _rtti must be destroyed on application exit. 00043 std::atexit( destroyRTTI ) ; 00044 }
void AbstractAttribute::destroyRTTI | ( | ) | [static, private] |
Called on application exit to destroy _rtti
Definition at line 51 of file OBTAbstractAttribute.cpp.
References _rtti.
Referenced by initRTTI().
00052 { 00053 delete _rtti ; 00054 }
RTTI * AbstractAttribute::_rtti [static, private] |
RTTI information.
Reimplemented in OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >, OBT::PrimitiveAttribute< const TOwner, char *, 1135290523 >, OBT::PrimitiveAttribute< TOwner, short, 1933918052 >, OBT::PrimitiveAttribute< TOwner, unsigned short, 2009635584 >, OBT::PrimitiveAttribute< TOwner, unsigned int, 1543155168 >, OBT::PrimitiveAttribute< TOwner, unsigned long, 3266407847 >, OBT::PrimitiveAttribute< TOwner, bool, 1991421614 >, OBT::PrimitiveAttribute< TOwner, int, 2240172011 >, OBT::PrimitiveAttribute< TOwner, long, 1468120404 >, OBT::PrimitiveAttribute< TOwner, float, 1498253751 >, and OBT::PrimitiveAttribute< TOwner, double, 1608088171 >.
Definition at line 83 of file OBTAbstractAttribute.h.
Referenced by AbstractAttribute(), destroyRTTI(), getClassRTTI(), getRTTI(), and initRTTI().
std::string OBT::AbstractAttribute::_name [private] |