= Identifier = == Description == The [wiki:Identifier] is a construct to identify the class of an object. All classes derived from OrxonoxClass have an Identifier, representing the class in the running game. The Identifier additionally stores all objects of its class in a [wiki:ObjectList list], knows the name of the class, can have a [wiki:ClassFactory], knows all parents and children, stores [wiki:ConfigValueContainer config-values] and shell-functions and provides several other functionalities. A new class that wants an Identifier must use a macro (!RegisterObject(classname) or !RegisterRootObject(interfacename)) from [wiki:CoreIncludes]. Read the related Wiki-page for more informations. [wiki:Identifier Identifiers] can be compared by using functions like isA(...) or isChildOf(...) to retrieve informations about the class-hierarchy. You can't create an Identifier directly, because it's an abstract class. There only exist [wiki:ClassIdentifier ClassIdentifiers], but you can't create them too, because they have private constructors. Identifiers are created by [wiki:IdentifierDistributor], a helper class to warrant the uniqueness of an Identifier for a class. The [wiki:SubclassIdentifier] is a class, that can store and act like an Identifier, but has a given base-class. Read the related Wiki-page for more informations. == Functions == * '''Comparison''': * ''myidentifier'''''->isA('''''other''''')''': Compares the Identifier (''myidentifier'') with another Identifier (''other''). If ''myidentifier'' represents exactly the same or an inheriting class, the function returns true. * ''myidentifier'''''->isExactlyA('''''other''''')''': If ''myidentifier'' and ''other'' represent both the same class, the function returns true. * ''myidentifier'''''->isChildOf('''''other''''')''': If the class represented by ''myidentifier'' is a child of the class represented by ''other'', the function returns true. * ''myidentifier'''''->isDirectChildOf('''''other''''')''': Like isChildOf(...), but the class represented by ''myidentifier'' must be inherited directly without other classes between (class ''myidentifierclass'' : public ''otherclass''). * ''myidentifier'''''->isParentOf('''''other''''')''': If the class represented by ''myidentifier'' is a parent of the class represented by ''other'', meaning the other class is a child, the function returns true. * ''myidentifier'''''->isDirectParentOf('''''other''''')''': Like isParentOf(...), but the class represented by ''myidentifier'' must be a direct parent without other classes between (class ''otherclass'' : public ''myidentifierclass''). * '''Fabricate''': * fabricate() returns a new object of the class represented by the Identifier (see [wiki:ClassFactory]). * '''Name''': * getName() returns the name of the represented class. * '''Class-hierarchy''': You can retrieve lists and iterators (begin and end) of: * '''parents''': getParents(), getParentsBegin(), getParentsEnd() * '''directParents''': getDirectParents(), getDirectParentsBegin(), getDirectParentsEnd() * '''children''': getChildren(), getChildrenBegin(), getChildrenEnd() * '''directChildren''': getDirectChildren(), getDirectChildrenBegin(), getDirectChildrenEnd() == Examples == == Networking == == Technical informations ==