Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2008, 9:10:00 PM (16 years ago)
Author:
scheusso
Message:

made some adjustments mostly to the networkid (classid) in order to have it platform independent

Location:
code/branches/network64/src/core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network64/src/core/CoreIncludes.h

    r2171 r2309  
    4848#include "Functor.h"
    4949#include "util/Debug.h"
     50#include "util/Integers.h"
    5051
    5152
  • code/branches/network64/src/core/Factory.cc

    r2171 r2309  
    5858        @return The Identifier
    5959    */
    60     Identifier* Factory::getIdentifier(const unsigned int id)
     60    Identifier* Factory::getIdentifier(const uint32_t id)
    6161    {
    62         std::map<unsigned int, Identifier*>::const_iterator it = getFactoryPointer()->identifierNetworkIDMap_.find(id);
     62        std::map<uint32_t, Identifier*>::const_iterator it = getFactoryPointer()->identifierNetworkIDMap_.find(id);
    6363        if (it != getFactoryPointer()->identifierNetworkIDMap_.end())
    6464            return it->second;
     
    8585        @param newID The new networkID
    8686    */
    87     void Factory::changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID)
     87    void Factory::changeNetworkID(Identifier* identifier, const uint32_t oldID, const uint32_t newID)
    8888    {
    8989        getFactoryPointer()->identifierNetworkIDMap_.erase(oldID);
  • code/branches/network64/src/core/Factory.h

    r2171 r2309  
    4949#include <map>
    5050#include <string>
     51#include "util/Integers.h"
    5152
    5253namespace orxonox
     
    6061        public:
    6162            static Identifier* getIdentifier(const std::string& name);
    62             static Identifier* getIdentifier(const unsigned int id);
     63            static Identifier* getIdentifier(const uint32_t id);
    6364            static void add(const std::string& name, Identifier* identifier);
    64             static void changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID);
     65            static void changeNetworkID(Identifier* identifier, const uint32_t oldID, const uint32_t newID);
    6566            static void createClassHierarchy();
    6667
     
    8384
    8485            std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
    85             std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
     86            std::map<uint32_t, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
    8687    };
    8788
  • code/branches/network64/src/core/Identifier.cc

    r2171 r2309  
    235235        @param id The new network ID
    236236    */
    237     void Identifier::setNetworkID(unsigned int id)
     237    void Identifier::setNetworkID(uint32_t id)
    238238    {
    239239        Factory::changeNetworkID(this, this->classID_, id);
  • code/branches/network64/src/core/Identifier.h

    r2171 r2309  
    230230
    231231            /** @brief Returns the network ID to identify a class through the network. @return the network ID */
    232             inline const unsigned int getNetworkID() const { return this->classID_; }
     232            inline const uint32_t getNetworkID() const { return this->classID_; }
    233233
    234234            /** @brief Sets the network ID to a new value. @param id The new value */
    235             void setNetworkID(unsigned int id);
     235            void setNetworkID(uint32_t id);
    236236
    237237            void addConfigValueContainer(const std::string& varname, ConfigValueContainer* container);
     
    315315            BaseFactory* factory_;                                         //!< The Factory, able to create new objects of the given class (if available)
    316316            static 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)
    317             unsigned int classID_;                                         //!< The network ID to identify a class through the network
     317            uint32_t classID_;                                             //!< The network ID to identify a class through the network
    318318
    319319            bool bHasConfigValues_;                                        //!< True if this class has at least one assigned config value
Note: See TracChangeset for help on using the changeset viewer.