#include <src/core/OrxonoxClass.h>
Public Member Functions | |
void | createParents () |
Creates the parents-list. | |
Identifier * | getIdentifier () const |
Returns the Identifier of the object. | |
MetaObjectList & | getMetaList () |
Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. | |
std::set< const Identifier * > * | getParents () const |
Returns the list of all parents of the object. | |
bool | isA (const OrxonoxClass *object) |
Returns true if the objects class is of the given type or a derivative. | |
template<class B> | |
bool | isA (const SubclassIdentifier< B > identifier) |
Returns true if the objects class is of the given type or a derivative. | |
template<class B> | |
bool | isA (const SubclassIdentifier< B > *identifier) |
Returns true if the objects class is of the given type or a derivative. | |
bool | isA (const Identifier *identifier) |
Returns true if the objects class is of the given type or a derivative. | |
bool | isChildOf (const OrxonoxClass *object) |
Returns true if the objects class is a child of the given type. | |
template<class B> | |
bool | isChildOf (const SubclassIdentifier< B > identifier) |
Returns true if the objects class is a child of the given type. | |
template<class B> | |
bool | isChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the objects class is a child of the given type. | |
bool | isChildOf (const Identifier *identifier) |
Returns true if the objects class is a child of the given type. | |
bool | isDirectChildOf (const OrxonoxClass *object) |
Returns true if the objects class is a direct child of the given type. | |
template<class B> | |
bool | isDirectChildOf (const SubclassIdentifier< B > identifier) |
Returns true if the objects class is a direct child of the given type. | |
template<class B> | |
bool | isDirectChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the objects class is a direct child of the given type. | |
bool | isDirectChildOf (const Identifier *identifier) |
Returns true if the objects class is a direct child of the given type. | |
bool | isDirectParentOf (const OrxonoxClass *object) |
Returns true if the objects class is a direct child of the given type. | |
template<class B> | |
bool | isDirectParentOf (const SubclassIdentifier< B > identifier) |
Returns true if the objects class is a direct parent of the given type. | |
template<class B> | |
bool | isDirectParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the objects class is a direct parent of the given type. | |
bool | isDirectParentOf (const Identifier *identifier) |
Returns true if the objects class is a direct parent of the given type. | |
bool | isExactlyA (const OrxonoxClass *object) |
Returns true if the objects class is exactly of the given type. | |
template<class B> | |
bool | isExactlyA (const SubclassIdentifier< B > identifier) |
Returns true if the objects class is exactly of the given type. | |
template<class B> | |
bool | isExactlyA (const SubclassIdentifier< B > *identifier) |
Returns true if the objects class is exactly of the given type. | |
bool | isExactlyA (const Identifier *identifier) |
Returns true if the objects class is exactly of the given type. | |
bool | isParentOf (const OrxonoxClass *object) |
Returns true if the objects class is a parent of the given type. | |
template<class B> | |
bool | isParentOf (const SubclassIdentifier< B > identifier) |
Returns true if the objects class is a parent of the given type. | |
template<class B> | |
bool | isParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the objects class is a parent of the given type. | |
bool | isParentOf (const Identifier *identifier) |
Returns true if the objects class is a parent of the given type. | |
OrxonoxClass () | |
Constructor: Sets the default values. | |
void | setConfigValues () |
Function to collect the SetConfigValue-macro calls. | |
void | setIdentifier (Identifier *identifier) |
Sets the Identifier of the object. Used by the RegisterObject-macro. | |
virtual | ~OrxonoxClass () |
Destructor: Deletes, if existing, the list of the parents. | |
Private Attributes | |
Identifier * | identifier_ |
The Identifier of the object. | |
MetaObjectList * | metaList_ |
MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in. | |
std::set< const Identifier * > * | parents_ |
List of all parents of the object. |
The BaseObject and Interfaces are derived with 'virtual public OrxonoxClass' from OrxonoxClass. OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the MetaObjectList.
orxonox::OrxonoxClass::OrxonoxClass | ( | ) |
orxonox::OrxonoxClass::~OrxonoxClass | ( | ) | [virtual] |
void orxonox::OrxonoxClass::createParents | ( | ) | [inline] |
Creates the parents-list.
Identifier* orxonox::OrxonoxClass::getIdentifier | ( | ) | const [inline] |
Returns the Identifier of the object.
Referenced by orxonox::BaseObject::addEventContainer(), orxonox::DistanceTrigger::addTargets(), orxonox::BaseObject::addTemplate(), orxonox::Synchronisable::getData(), orxonox::BaseObject::getMainState(), isA(), isChildOf(), isDirectChildOf(), isDirectParentOf(), isExactlyA(), isParentOf(), orxonox::Level::setGametypeString(), orxonox::BaseObject::setMainState(), and orxonox::BaseObject::XMLPort().
MetaObjectList& orxonox::OrxonoxClass::getMetaList | ( | ) | [inline] |
Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in.
std::set<const Identifier*>* orxonox::OrxonoxClass::getParents | ( | ) | const [inline] |
Returns the list of all parents of the object.
bool orxonox::OrxonoxClass::isA | ( | const OrxonoxClass * | object | ) |
Returns true if the objects class is of the given type or a derivative.
References getIdentifier(), and orxonox::Identifier::isA().
bool orxonox::OrxonoxClass::isA | ( | const SubclassIdentifier< B > | identifier | ) | [inline] |
Returns true if the objects class is of the given type or a derivative.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isA().
bool orxonox::OrxonoxClass::isA | ( | const SubclassIdentifier< B > * | identifier | ) | [inline] |
Returns true if the objects class is of the given type or a derivative.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isA().
bool orxonox::OrxonoxClass::isA | ( | const Identifier * | identifier | ) |
Returns true if the objects class is of the given type or a derivative.
References getIdentifier(), and orxonox::Identifier::isA().
Referenced by orxonox::PickupCollection::add(), orxonox::Template::applyOn(), orxonox::PongCenterpoint::checkGametype(), orxonox::EventContainer::process(), orxonox::Pong::spawnPlayer(), and orxonox::GametypeStatus::tick().
bool orxonox::OrxonoxClass::isChildOf | ( | const OrxonoxClass * | object | ) |
Returns true if the objects class is a child of the given type.
References getIdentifier(), and orxonox::Identifier::isChildOf().
bool orxonox::OrxonoxClass::isChildOf | ( | const SubclassIdentifier< B > | identifier | ) | [inline] |
Returns true if the objects class is a child of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isChildOf().
bool orxonox::OrxonoxClass::isChildOf | ( | const SubclassIdentifier< B > * | identifier | ) | [inline] |
Returns true if the objects class is a child of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isChildOf().
bool orxonox::OrxonoxClass::isChildOf | ( | const Identifier * | identifier | ) |
Returns true if the objects class is a child of the given type.
References getIdentifier(), and orxonox::Identifier::isChildOf().
bool orxonox::OrxonoxClass::isDirectChildOf | ( | const OrxonoxClass * | object | ) |
Returns true if the objects class is a direct child of the given type.
References getIdentifier(), and orxonox::Identifier::isDirectChildOf().
bool orxonox::OrxonoxClass::isDirectChildOf | ( | const SubclassIdentifier< B > | identifier | ) | [inline] |
Returns true if the objects class is a direct child of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isDirectChildOf().
bool orxonox::OrxonoxClass::isDirectChildOf | ( | const SubclassIdentifier< B > * | identifier | ) | [inline] |
Returns true if the objects class is a direct child of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isDirectChildOf().
bool orxonox::OrxonoxClass::isDirectChildOf | ( | const Identifier * | identifier | ) |
Returns true if the objects class is a direct child of the given type.
References getIdentifier(), and orxonox::Identifier::isDirectChildOf().
bool orxonox::OrxonoxClass::isDirectParentOf | ( | const OrxonoxClass * | object | ) |
Returns true if the objects class is a direct child of the given type.
References getIdentifier(), and orxonox::Identifier::isDirectParentOf().
bool orxonox::OrxonoxClass::isDirectParentOf | ( | const SubclassIdentifier< B > | identifier | ) | [inline] |
Returns true if the objects class is a direct parent of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isDirectParentOf().
bool orxonox::OrxonoxClass::isDirectParentOf | ( | const SubclassIdentifier< B > * | identifier | ) | [inline] |
Returns true if the objects class is a direct parent of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isDirectParentOf().
bool orxonox::OrxonoxClass::isDirectParentOf | ( | const Identifier * | identifier | ) |
Returns true if the objects class is a direct parent of the given type.
References getIdentifier(), and orxonox::Identifier::isDirectParentOf().
bool orxonox::OrxonoxClass::isExactlyA | ( | const OrxonoxClass * | object | ) |
Returns true if the objects class is exactly of the given type.
References getIdentifier(), and orxonox::Identifier::isExactlyA().
bool orxonox::OrxonoxClass::isExactlyA | ( | const SubclassIdentifier< B > | identifier | ) | [inline] |
Returns true if the objects class is exactly of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isExactlyA().
bool orxonox::OrxonoxClass::isExactlyA | ( | const SubclassIdentifier< B > * | identifier | ) | [inline] |
Returns true if the objects class is exactly of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isExactlyA().
bool orxonox::OrxonoxClass::isExactlyA | ( | const Identifier * | identifier | ) |
Returns true if the objects class is exactly of the given type.
References getIdentifier(), and orxonox::Identifier::isExactlyA().
bool orxonox::OrxonoxClass::isParentOf | ( | const OrxonoxClass * | object | ) |
Returns true if the objects class is a parent of the given type.
References getIdentifier(), and orxonox::Identifier::isParentOf().
bool orxonox::OrxonoxClass::isParentOf | ( | const SubclassIdentifier< B > | identifier | ) | [inline] |
Returns true if the objects class is a parent of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isParentOf().
bool orxonox::OrxonoxClass::isParentOf | ( | const SubclassIdentifier< B > * | identifier | ) | [inline] |
Returns true if the objects class is a parent of the given type.
References orxonox::SubclassIdentifier< T >::getIdentifier(), getIdentifier(), and orxonox::Identifier::isParentOf().
bool orxonox::OrxonoxClass::isParentOf | ( | const Identifier * | identifier | ) |
Returns true if the objects class is a parent of the given type.
References getIdentifier(), and orxonox::Identifier::isParentOf().
void orxonox::OrxonoxClass::setConfigValues | ( | ) | [inline] |
Function to collect the SetConfigValue-macro calls.
Reimplemented in orxonox::CoreConfiguration, orxonox::GameConfiguration, orxonox::InputBuffer, orxonox::InputManager, orxonox::KeyBinder, orxonox::Shell, orxonox::TrafficControl, orxonox::GSGraphics, orxonox::GSLevel, orxonox::GraphicsManager, orxonox::LevelManager, orxonox::PongAI, orxonox::Gametype, orxonox::TeamDeathmatch, orxonox::UnderAttack, orxonox::Bot, orxonox::HumanPlayer, orxonox::Engine, orxonox::Test, orxonox::Projectile, orxonox::Camera, orxonox::ControllableEntity, orxonox::SpaceShip, orxonox::Spectator, orxonox::InGameConsole, orxonox::ChatOverlay, orxonox::Stats, and orxonox::SoundMainMenu.
void orxonox::OrxonoxClass::setIdentifier | ( | Identifier * | identifier | ) | [inline] |
Sets the Identifier of the object. Used by the RegisterObject-macro.
Identifier* orxonox::OrxonoxClass::identifier_ [private] |
MetaObjectList* orxonox::OrxonoxClass::metaList_ [private] |
MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in.
Referenced by OrxonoxClass(), and ~OrxonoxClass().
std::set<const Identifier*>* orxonox::OrxonoxClass::parents_ [private] |