Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Attributes | Friends | List of all members
orxonox::Identifiable Class Reference

Identifiable is needed to create the class-hierarchy at startup and to store the Identifier. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/class/Identifiable.h>

Inheritance diagram for orxonox::Identifiable:
orxonox::Listable orxonox::BaseSound orxonox::ChatListener orxonox::ClientConnectionListener orxonox::Configurable orxonox::Context orxonox::DevModeListener orxonox::JoyStickQuantityListener orxonox::NetworkChatListener orxonox::TimeFactorListener orxonox::Timer orxonox::UpdateListener orxonox::ViewportEventListener orxonox::WindowEventListener orxonox::XMLNameListener

Public Member Functions

 Identifiable ()
 Constructor: Sets the default values. More...
 
virtual ~Identifiable ()
 
ORX_FORCEINLINE voidgetDerivedPointer (unsigned int classID)
 Returns a valid pointer of any derived type that is registered in the class hierarchy. More...
 
template<class T >
ORX_FORCEINLINE T * getDerivedPointer (unsigned int classID)
 Version of getDerivedPointer with template. More...
 
template<class T >
ORX_FORCEINLINE const T * getDerivedPointer (unsigned int classID) const
 Const version of getDerivedPointer with template. More...
 
IdentifiergetIdentifier () const
 Returns the Identifier of the object. More...
 
bool isA (const Identifier *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
template<class B >
bool isA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isA (const Identifiable *object)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isChildOf (const Identifier *identifier)
 Returns true if the object's class is a child of the given type. More...
 
template<class B >
bool isChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a child of the given type. More...
 
bool isChildOf (const Identifiable *object)
 Returns true if the object's class is a child of the given type. More...
 
bool isDirectChildOf (const Identifier *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
template<class B >
bool isDirectChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectChildOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectParentOf (const Identifier *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
template<class B >
bool isDirectParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
bool isDirectParentOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isExactlyA (const Identifier *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
template<class B >
bool isExactlyA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
bool isExactlyA (const Identifiable *object)
 Returns true if the object's class is exactly of the given type. More...
 
bool isParentOf (const Identifier *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
template<class B >
bool isParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
bool isParentOf (const Identifiable *object)
 Returns true if the object's class is a parent of the given type. More...
 

Private Attributes

Identifieridentifier_
 The Identifier of the object. More...
 
std::vector< std::pair< unsigned int, void * > > objectPointers_
 'Fast map' that holds this-pointers of all derived types More...
 

Friends

template<class T >
class ClassIdentifier
 

Detailed Description

Identifiable is needed to create the class-hierarchy at startup and to store the Identifier.

Constructor & Destructor Documentation

orxonox::Identifiable::Identifiable ( )

Constructor: Sets the default values.

virtual orxonox::Identifiable::~Identifiable ( )
inlinevirtual

Member Function Documentation

ORX_FORCEINLINE void* orxonox::Identifiable::getDerivedPointer ( unsigned int  classID)
inline

Returns a valid pointer of any derived type that is registered in the class hierarchy.

Returns
Returns nullptr if the no pointer was found.
template<class T >
ORX_FORCEINLINE T* orxonox::Identifiable::getDerivedPointer ( unsigned int  classID)
inline

Version of getDerivedPointer with template.

template<class T >
ORX_FORCEINLINE const T* orxonox::Identifiable::getDerivedPointer ( unsigned int  classID) const
inline

Const version of getDerivedPointer with template.

Identifier* orxonox::Identifiable::getIdentifier ( ) const
inline

Returns the Identifier of the object.

bool orxonox::Identifiable::isA ( const Identifier identifier)

Returns true if the object's class is of the given type or a derivative.

template<class B >
bool orxonox::Identifiable::isA ( const SubclassIdentifier< B > *  identifier)
inline

Returns true if the object's class is of the given type or a derivative.

bool orxonox::Identifiable::isA ( const Identifiable object)

Returns true if the object's class is of the given type or a derivative.

bool orxonox::Identifiable::isChildOf ( const Identifier identifier)

Returns true if the object's class is a child of the given type.

template<class B >
bool orxonox::Identifiable::isChildOf ( const SubclassIdentifier< B > *  identifier)
inline

Returns true if the object's class is a child of the given type.

bool orxonox::Identifiable::isChildOf ( const Identifiable object)

Returns true if the object's class is a child of the given type.

bool orxonox::Identifiable::isDirectChildOf ( const Identifier identifier)

Returns true if the object's class is a direct child of the given type.

template<class B >
bool orxonox::Identifiable::isDirectChildOf ( const SubclassIdentifier< B > *  identifier)
inline

Returns true if the object's class is a direct child of the given type.

bool orxonox::Identifiable::isDirectChildOf ( const Identifiable object)

Returns true if the object's class is a direct child of the given type.

bool orxonox::Identifiable::isDirectParentOf ( const Identifier identifier)

Returns true if the object's class is a direct parent of the given type.

template<class B >
bool orxonox::Identifiable::isDirectParentOf ( const SubclassIdentifier< B > *  identifier)
inline

Returns true if the object's class is a direct parent of the given type.

bool orxonox::Identifiable::isDirectParentOf ( const Identifiable object)

Returns true if the object's class is a direct child of the given type.

bool orxonox::Identifiable::isExactlyA ( const Identifier identifier)

Returns true if the object's class is exactly of the given type.

template<class B >
bool orxonox::Identifiable::isExactlyA ( const SubclassIdentifier< B > *  identifier)
inline

Returns true if the object's class is exactly of the given type.

bool orxonox::Identifiable::isExactlyA ( const Identifiable object)

Returns true if the object's class is exactly of the given type.

bool orxonox::Identifiable::isParentOf ( const Identifier identifier)

Returns true if the object's class is a parent of the given type.

template<class B >
bool orxonox::Identifiable::isParentOf ( const SubclassIdentifier< B > *  identifier)
inline

Returns true if the object's class is a parent of the given type.

bool orxonox::Identifiable::isParentOf ( const Identifiable object)

Returns true if the object's class is a parent of the given type.

Friends And Related Function Documentation

template<class T >
friend class ClassIdentifier
friend

Member Data Documentation

Identifier* orxonox::Identifiable::identifier_
private

The Identifier of the object.

std::vector<std::pair<unsigned int, void*> > orxonox::Identifiable::objectPointers_
private

'Fast map' that holds this-pointers of all derived types


The documentation for this class was generated from the following files: