Changes between Version 1 and Version 2 of code/doc/Factory
- Timestamp:
- Feb 26, 2008, 6:14:02 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/doc/Factory
v1 v2 3 3 == Description == 4 4 5 The [wiki:Factory] is a singletonthat maps [wiki:Identifier Identifiers] with their name and their network ID. The [wiki:Factory] is used by the !CreateFactory(classname) macro (include [wiki:CoreIncludes CoreIncludes.h] to use it) to add new entries and by the ID("classname") and ID(network ID) macros (include [wiki:CoreIncludes CoreIncludes.h] to use them) to retrieve an [wiki:Identifier] with a given classname or a given network ID respectively. The ID macro is an abbreviation of the static function Factory::getIdentifier(...). The [wiki:Factory] also handles the change of a network ID to avoid conflicts with ambiguous map-entries.5 The [wiki:Factory] is a [wiki:singleton] that maps [wiki:Identifier Identifiers] with their name and their network ID. The [wiki:Factory] is used by the !CreateFactory(classname) macro (include [wiki:CoreIncludes CoreIncludes.h] to use it) to add new entries and by the ID("classname") and ID(network ID) macros (include [wiki:CoreIncludes CoreIncludes.h] to use them) to retrieve an [wiki:Identifier] with a given classname or a given network ID respectively. The ID macro is an abbreviation of the static function Factory::getIdentifier(...). The [wiki:Factory] also handles the change of a network ID to avoid conflicts with ambiguous map-entries. 6 6 7 7 Because the [wiki:Factory] knows all Identifiers with a [wiki:ClassFactory], it provides functions to get the map-iterators to iterate through all stored Identifiers.