Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network64/src/network/synchronisable/Synchronisable.h

    r2307 r2309  
    5353namespace orxonox
    5454{
    55   static const unsigned int OBJECTID_UNKNOWN = (unsigned int)-1;
     55  static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1);
    5656
    5757  namespace objectDirection{
     
    8686
    8787    static Synchronisable *fabricate(uint8_t*& mem, uint8_t mode=0x0);
    88     static bool deleteObject(unsigned int objectID);
    89     static Synchronisable *getSynchronisable(unsigned int objectID);
     88    static bool deleteObject(uint32_t objectID);
     89    static Synchronisable *getSynchronisable(uint32_t objectID);
    9090    static unsigned int getNumberOfDeletedObject(){ return deletedObjects_.size(); }
    91     static unsigned int popDeletedObject(){ unsigned int i = deletedObjects_.front(); deletedObjects_.pop(); return i; }
     91    static uint32_t popDeletedObject(){ uint32_t i = deletedObjects_.front(); deletedObjects_.pop(); return i; }
    9292
    93     inline unsigned int getObjectID(){return objectID;}
    94     inline unsigned int getClassID(){return classID;}
     93    inline uint32_t getObjectID(){return objectID;}
     94    inline uint32_t getClassID(){return classID;}
    9595  protected:
    9696    Synchronisable(BaseObject* creator);
     
    103103
    104104  private:
    105     bool getData(uint8_t*& men, unsigned int id, uint8_t mode=0x0);
    106     uint32_t getSize(unsigned int id, uint8_t mode=0x0);
     105    bool getData(uint8_t*& men, int32_t id, uint8_t mode=0x0);
     106    uint32_t getSize(int32_t id, uint8_t mode=0x0);
    107107    bool updateData(uint8_t*& mem, uint8_t mode=0x0, bool forceCallback=false);
    108108    bool isMyData(uint8_t* mem);
    109     bool doSelection(unsigned int id);
    110     bool doSync(unsigned int id, uint8_t mode=0x0);
     109    bool doSelection(int32_t id);
     110    bool doSync(int32_t id, uint8_t mode=0x0);
    111111
    112     unsigned int objectID;
    113     unsigned int creatorID;
    114     unsigned int classID;
     112    uint32_t objectID;
     113    uint32_t creatorID;
     114    uint32_t classID;
    115115
    116116    std::list<SynchronisableVariableBase*> syncList;
     
    119119    unsigned int objectFrequency_;
    120120    int objectMode_;
    121     static std::map<unsigned int, Synchronisable *> objectMap_;
    122     static std::queue<unsigned int> deletedObjects_;
     121    static std::map<uint32_t, Synchronisable *> objectMap_;
     122    static std::queue<uint32_t> deletedObjects_;
    123123  };
    124124 
Note: See TracChangeset for help on using the changeset viewer.