= !ClassIdentifier =
[[TracNav(TracNav/TOC_Development)]]
----
{{{
#!html
}}}
'''Important: The [wiki:ClassIdentifier] is derived from [wiki:Identifier]. Read the related Wiki-page to learn about all inherited features and functions.'''
* '''Go to the [wiki:Identifier]'''
{{{
#!html
}}}
----
== Description ==
The !ClassIdentifier is a [wiki:template] and a [wiki:singleton], derived from [wiki:Identifier], with two important tasks:
* Doing some class-specific stuff
* Fast and easy link to the Identifier of a class
== Uniqueness ==
Specially the second point is of major importance: !ClassIdentifier is a singleton, meaning there's only one instance of !ClassIdentifier for every T. This allows you to get the Identifier of any class by calling !ClassIdentifier::getIdentifier():
{{{
Identifier* identifier = ClassIdentifier::getIdentifier();
}}}
This is in fact just what the Class(classname) macro in [wiki:CoreIncludes] does.
To assure uniqueness even in different libraries, a !ClassIdentifier has to register in a map. If the Identifier for a specific class already exists, the second !ClassIdentifier will just refer to the first one.