Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 696


Ignore:
Timestamp:
Dec 27, 2007, 4:59:55 AM (17 years ago)
Author:
landauf
Message:

IdentifierMap works now on tardis (this pre-main() stuff is s* and ! f* !)

Location:
code/branches/FICN
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/bin/ogre.cfg-init

    r412 r696  
    22
    33[OpenGL Rendering Subsystem]
    4 FSAA=4
     4FSAA=0
    55Full Screen=No
    66RTT Preferred Mode=PBuffer
    7 Video Mode=1280 x 1024
     7Video Mode=1024 x 768
  • code/branches/FICN/src/orxonox/core/Identifier.cc

    r691 r696  
    4040    int Identifier::hierarchyCreatingCounter_s = 0; // Set the static member variable hierarchyCreatingCounter_s to zero
    4141    unsigned int Identifier::classIDcounter_s = 0;  // Set the static member variable classIDcounter_s to zero
    42     std::map<std::string, Identifier*> Identifier::identifierMap_s;
    4342
    4443    /**
     
    115114
    116115    /**
     116        @returns a reference to the Identifier map, containing all Identifiers.
     117    */
     118    std::map<std::string, Identifier*>& Identifier::getIdentifierMap()
     119    {
     120        static std::map<std::string, Identifier*> identifierMapStaticReference = std::map<std::string, Identifier*>();
     121        return identifierMapStaticReference;
     122    }
     123
     124    /**
    117125        @returns true, if the Identifier is at least of the given type.
    118126        @param identifier The identifier to compare with
  • code/branches/FICN/src/orxonox/core/Identifier.h

    r694 r696  
    137137                { this->configValues_[varname] = container; }
    138138
     139            std::map<std::string, Identifier*>& getIdentifierMap();
     140
    139141        private:
    140142            Identifier();
     
    172174            unsigned int classID_;                                      //!< The network ID to identify a class through the network
    173175            std::map<std::string, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
    174             static std::map<std::string, Identifier*> identifierMap_s;  //!< A map, containing all existing ClassIdentifiers
    175176    };
    176177
     
    282283        {
    283284            this->name_ = name;
    284             this->identifierMap_s[name] = this;
     285            this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));
    285286            this->bSetName_ = true;
    286287        }
Note: See TracChangeset for help on using the changeset viewer.