Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10483


Ignore:
Timestamp:
May 25, 2015, 10:36:28 PM (9 years ago)
Author:
landauf
Message:

avoid dependency on IdentifierManager for as long as possible

Location:
code/branches/core7/src/libraries/core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/Core.cc

    r10480 r10483  
    135135        }
    136136
     137        // TODO: initialize Root-Context
     138        // TODO: initialize IdentifierManager here
    137139        // TODO: initialize ScopeManager here
    138140        // TODO: initialize CommandLineParser here
  • code/branches/core7/src/libraries/core/class/Identifier.cc

    r10482 r10483  
    5353    */
    5454    Identifier::Identifier(const std::string& name, Factory* factory, bool bLoadable)
    55         : classID_(IdentifierManager::getInstance().getUniqueClassId())
    5655    {
    5756        orxout(verbose, context::identifier) << "Create identifier for " << name << endl;
    5857
     58        static unsigned int classIDCounter = 0;
     59
     60        this->classID_ = classIDCounter++;
    5961        this->name_ = name;
    6062        this->factory_ = factory;
  • code/branches/core7/src/libraries/core/class/Identifier.h

    r10467 r10483  
    231231            Factory* factory_;                                             //!< The Factory, able to create new objects of the given class (if available)
    232232            uint32_t networkID_;                                           //!< The network ID to identify a class through the network
    233             const unsigned int classID_;                                   //!< Uniquely identifies a class (might not be the same as the networkID_)
     233            unsigned int classID_;                                         //!< Uniquely identifies a class (might not be the same as the networkID_)
    234234
    235235            bool bHasConfigValues_;                                        //!< True if this class has at least one assigned config value
  • code/branches/core7/src/libraries/core/class/IdentifierManager.cc

    r10481 r10483  
    5353    {
    5454        this->hierarchyCreatingCounter_s = 0;
    55         this->classIDCounter_s = 0;
    5655        this->recordTraceForIdentifier_ = NULL;
    5756    }
  • code/branches/core7/src/libraries/core/class/IdentifierManager.h

    r10481 r10483  
    5151            void addIdentifier(Identifier* identifier);
    5252            void removeIdentifier(Identifier* identifier);
    53 
    54             unsigned int getUniqueClassId()
    55                 { return this->classIDCounter_s++; }
    5653
    5754
     
    110107
    111108            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)
    112             unsigned int classIDCounter_s;                          //!< counter for the unique classIDs
    113109
    114110            /// 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
Note: See TracChangeset for help on using the changeset viewer.