|
| ClassIdentifier (const std::string &name, Factory *factory, bool bLoadable) |
|
| ~ClassIdentifier () |
|
virtual bool | canDynamicCastObjectToIdentifierClass (Identifiable *object) const override |
|
virtual void | destroyObjects () override |
| Destroy all objects of this class (must be Listable). More...
|
|
virtual const std::type_info & | getTypeInfo () override |
| Returns the type_info of the class as it is returned by typeid(T) More...
|
|
bool | initializeObject (T *object) |
| Adds an object of the given type to the ObjectList. More...
|
|
virtual void | updateConfigValues (bool updateChildren=true) const override |
| Updates the config-values of all existing objects of this class by calling their setConfigValues() function. More...
|
|
| Identifier (const std::string &name, Factory *factory, bool bLoadable) |
| Constructor: No factory, no object created, new ObjectList and a unique networkID. More...
|
|
| Identifier (const Identifier &)=delete |
|
virtual | ~Identifier () |
| Destructor: Deletes the list containing the children. More...
|
|
void | addConfigValueContainer (const std::string &varname, ConfigValueContainer *container) |
| Adds the ConfigValueContainer of a variable, given by the string of its name. More...
|
|
void | addXMLPortObjectContainer (const std::string §ionname, XMLPortObjectContainer *container) |
| Adds a new XMLPortObjectContainer that attaches an object to this class. More...
|
|
void | addXMLPortParamContainer (const std::string ¶mname, XMLPortParamContainer *container) |
| Adds a new XMLPortParamContainer that loads a parameter of this class. More...
|
|
Identifiable * | fabricate (Context *context) |
| Creates an object of the type the Identifier belongs to. More...
|
|
void | finishInitialization () |
| Finishes the initialization of this Identifier after creating the class hierarchy by wiring the (direct) parent/child references correctly. More...
|
|
const std::set< const Identifier * > & | getChildren () const |
| Returns the children of the class the Identifier belongs to. More...
|
|
ORX_FORCEINLINE unsigned int | getClassID () const |
| Returns the unique ID of the class. More...
|
|
ConfigValueContainer * | getConfigValueContainer (const std::string &varname) |
| Returns the ConfigValueContainer of a variable, given by the string of its name. More...
|
|
const std::set< const Identifier * > & | getDirectChildren () const |
| Returns the direct children the class the Identifier belongs to. More...
|
|
const std::list< const Identifier * > & | getDirectParents () const |
| Returns the direct parents of the class the Identifier belongs to. More...
|
|
const std::string & | getName () const |
| Returns the name of the class the Identifier belongs to. More...
|
|
uint32_t | getNetworkID () const |
| Returns the network ID to identify a class through the network. More...
|
|
const std::list< const Identifier * > & | getParents () const |
| Returns the parents of the class the Identifier belongs to. More...
|
|
XMLPortObjectContainer * | getXMLPortObjectContainer (const std::string §ionname) |
| Returns a XMLPortObjectContainer that attaches an object to this class. More...
|
|
const std::map< std::string, XMLPortObjectContainer * > & | getXMLPortObjectMap () const |
| Returns the map that stores all XMLPort objects. More...
|
|
XMLPortParamContainer * | getXMLPortParamContainer (const std::string ¶mname) |
| Returns a XMLPortParamContainer that loads a parameter of this class. More...
|
|
const std::map< std::string, XMLPortParamContainer * > & | getXMLPortParamMap () const |
| Returns the map that stores all XMLPort params. More...
|
|
bool | hasConfigValues () const |
| Returns true if this class has at least one config value. More...
|
|
bool | hasFactory () const |
| Returns true if the Identifier has a Factory. More...
|
|
Identifier & | inheritsFrom (InheritsFrom *directParent) |
| Used to define the direct parents of an Identifier of an abstract class. More...
|
|
void | initializeParents (const std::list< const Identifier * > &initializationTrace) |
| Initializes the parents of this Identifier while creating the class hierarchy. More...
|
|
bool | isA (const Identifier *identifier) const |
| Returns true, if the Identifier is at least of the given type. More...
|
|
bool | isChildOf (const Identifier *identifier) const |
| Returns true, if the assigned identifier is a child of the given identifier. More...
|
|
bool | isDirectChildOf (const Identifier *identifier) const |
| Returns true, if the assigned identifier is a direct child of the given identifier. More...
|
|
bool | isDirectParentOf (const Identifier *identifier) const |
| Returns true, if the assigned identifier is a direct parent of the given identifier. More...
|
|
bool | isExactlyA (const Identifier *identifier) const |
| Returns true, if the Identifier is exactly of the given type. More...
|
|
bool | isInitialized () const |
| Returns true if the Identifier was completely initialized. More...
|
|
bool | isLoadable () const |
| Returns true if the class can be loaded through XML. More...
|
|
bool | isParentOf (const Identifier *identifier) const |
| Returns true, if the assigned identifier is a parent of the given identifier. More...
|
|
bool | isVirtualBase () const |
| Returns true if child classes should inherit virtually from this class. More...
|
|
Identifier & | operator= (const Identifier &)=delete |
|
void | reset () |
| Resets all information about the class hierarchy. More...
|
|
void | setNetworkID (uint32_t id) |
| Sets the network ID to a new value and changes the entry in the ID-Identifier-map. More...
|
|
void | setVirtualBase (bool bIsVirtualBase) |
| Defines if child classes should inherit virtually from this class. More...
|
|
| Destroyable () |
| Constructor: Sets the default values. More...
|
|
virtual | ~Destroyable () |
| Destructor: Notifies all DestructionListener (for example weak pointers) that this object is being deleted. More...
|
|
void | destroy () |
| Deletes the object if no strong pointers point to this object. More...
|
|
void | destroyLater () |
| Works like destroy() but doesn't destroy the object until the current tick has ended. More...
|
|
unsigned int | getReferenceCount () const |
| Returns the number of strong pointers that point to this object. More...
|
|
template<class T>
class orxonox::ClassIdentifier< T >
The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables the Identifier cannot have.
ClassIdentifier is a Singleton, which means that only one ClassIdentifier for a given type T exists. This makes it possible to store information about a class, sharing them with all objects of that class without defining static variables in every class.
To be really sure that not more than exactly one object exists (even with libraries), ClassIdentifiers are stored in a static map in Identifier.