34 #ifndef _IdentifierManager_H__ 35 #define _IdentifierManager_H__ 41 #include <unordered_map> 65 void createClassHierarchy();
66 void verifyClassHierarchy(
const std::set<Identifier*>& initializedIdentifiers);
67 void destroyClassHierarchy();
73 {
return (hierarchyCreatingCounter_s > 0); }
82 Identifier* getIdentifierByTypeInfo(
const std::type_info& typeInfo);
84 void clearNetworkIDs();
88 {
return this->identifierByString_; }
91 {
return this->identifierByLowercaseString_; }
94 {
return this->identifierByNetworkId_; }
103 { hierarchyCreatingCounter_s++; }
106 { hierarchyCreatingCounter_s--; }
const std::map< std::string, Identifier * > & getIdentifierByLowercaseStringMap()
Returns the map that stores all Identifiers with their names in lowercase.
Definition: IdentifierManager.h:90
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
static IdentifierManager * singletonPtr_s
Definition: IdentifierManager.h:121
const std::map< std::string, Identifier * > & getIdentifierByStringMap()
Returns the map that stores all Identifiers with their names.
Definition: IdentifierManager.h:87
bool isCreatingHierarchy()
Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store t...
Definition: IdentifierManager.h:72
int hierarchyCreatingCounter_s
Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid...
Definition: IdentifierManager.h:114
Identifiable is needed to create the class-hierarchy at startup and to store the Identifier.
Definition: Identifiable.h:50
void startCreatingHierarchy()
Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents...
Definition: IdentifierManager.h:102
std::set< Identifier * > identifiers_
All identifiers. This is only used internally.
Definition: IdentifierManager.h:108
std::unordered_map< std::type_index, Identifier * > identifierByTypeIndex_
Map that stores all Identifiers with their type_index.
Definition: IdentifierManager.h:109
Base for singleton classes.
Definition: Singleton.h:114
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _CoreExport
Definition: CorePrereqs.h:61
The Identifier is used to identify the class of an object and to store information about the class...
Definition: Identifier.h:109
const std::map< uint32_t, Identifier * > & getIdentifierByNetworkIdMap()
Returns the map that stores all Identifiers with their IDs.
Definition: IdentifierManager.h:93
std::map< Identifiable *, std::list< const Identifier * > > identifierTraceOfNewObject_
Used while creating the object hierarchy to keep track of the identifiers of a newly created object (...
Definition: IdentifierManager.h:118
Definition of the Singleton template that is used as base class for classes that allow only one insta...
void stopCreatingHierarchy()
Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents...
Definition: IdentifierManager.h:105
std::map< std::string, Identifier * > identifierByLowercaseString_
Map that stores all Identifiers with their names in lowercase.
Definition: IdentifierManager.h:111
Identifier * recordTraceForIdentifier_
The identifier for which we want to record the trace of identifiers during object creation...
Definition: IdentifierManager.h:119
std::map< uint32_t, Identifier * > identifierByNetworkId_
Returns the map that stores all Identifiers with their network IDs.
Definition: IdentifierManager.h:112
Definition: IdentifierManager.h:50
std::map< std::string, Identifier * > identifierByString_
Map that stores all Identifiers with their names.
Definition: IdentifierManager.h:110