|
Orxonox
0.0.5 Codename: Arcturus
|
Definition of SubclassIdentifier. More...
Go to the source code of this file.
Classes | |
| class | orxonox::SubclassIdentifier< T > |
| The SubclassIdentifier acts almost like an Identifier, but has some prerequisites. More... | |
Namespaces | |
| orxonox | |
| Die Wagnis Klasse hat die folgenden Aufgaben: | |
Definition of SubclassIdentifier.
SubclassIdentifier is a separated class, acting like an Identifier, but has a given class. You can only assign Identifiers of exactly the given class or of a derivative to a SubclassIdentifier.
Example:
You can assign an Identifier either through the constructor or by using the assignment operator=:
The operator-> is overloaded an returns the assigned Identifier. That way you can just call functions of the assigned Identifier by using ->function():
There are two possibilities to create an object out of a SubclassIdentifier: Either you just use the fabricate() function of the assigned Identifier through the overloaded operator->, which returns a OrxonoxClass* pointer, or you use the function of SubclassIdentifier, this time by using operator., which returns a BaseClass* pointer (BaseClass is the baseclass specified by the template argument):
1.8.11