Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/class/IdentifierManager.h

    r10624 r11071  
    3737#include "core/CorePrereqs.h"
    3838
     39#include <typeindex>
    3940#include <map>
     41#include <unordered_map>
    4042#include <set>
    4143#include <list>
     
    5254        public:
    5355            IdentifierManager();
    54             ~IdentifierManager() {}
     56            ~IdentifierManager() = default;
    5557
    5658            void addIdentifier(Identifier* identifier);
     
    9395
    9496        private:
    95             IdentifierManager(const IdentifierManager&); // not implemented
     97            // non-copyable:
     98            IdentifierManager(const IdentifierManager&) = delete;
     99            IdentifierManager& operator=(const IdentifierManager&) = delete;
    96100
    97101            /// Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
     
    102106                { hierarchyCreatingCounter_s--; }
    103107
    104             std::set<Identifier*> identifiers_;                              //!< All identifiers. This is only used internally.
    105             std::map<std::string, Identifier*> identifierByString_;          //!< Map that stores all Identifiers with their names.
    106             std::map<std::string, Identifier*> identifierByLowercaseString_; //!< Map that stores all Identifiers with their names in lowercase.
    107             std::map<uint32_t, Identifier*> identifierByNetworkId_;          //!< Returns the map that stores all Identifiers with their network IDs.
     108            std::set<Identifier*> identifiers_;                                      //!< All identifiers. This is only used internally.
     109            std::unordered_map<std::type_index, Identifier*> identifierByTypeIndex_; //!< Map that stores all Identifiers with their type_index.
     110            std::map<std::string, Identifier*> identifierByString_;                  //!< Map that stores all Identifiers with their names.
     111            std::map<std::string, Identifier*> identifierByLowercaseString_;         //!< Map that stores all Identifiers with their names in lowercase.
     112            std::map<uint32_t, Identifier*> identifierByNetworkId_;                  //!< Returns the map that stores all Identifiers with their network IDs.
    108113
    109114            int hierarchyCreatingCounter_s;                         //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
     
    111116            /// Used while creating the object hierarchy to keep track of the identifiers of a newly created object (and all other objects that get created as
    112117            /// a consequence of this, e.g. nested member objects).
    113             std::map<Identifiable*, std::list<const Identifier*> > identifierTraceOfNewObject_;
     118            std::map<Identifiable*, std::list<const Identifier*>> identifierTraceOfNewObject_;
    114119            Identifier* recordTraceForIdentifier_; //!< The identifier for which we want to record the trace of identifiers during object creation. If null, no trace is recorded.
    115120
Note: See TracChangeset for help on using the changeset viewer.