Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6139 in orxonox.OLD for trunk/src/lib/network/synchronizeable.h


Ignore:
Timestamp:
Dec 16, 2005, 6:45:32 PM (18 years ago)
Author:
patrick
Message:

trunk: merged branche network with trunk using command: svn merge -r5999:HEAD, conflicts resolved in favor of the trunk bla

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/synchronizeable.h

    r5997 r6139  
    1919#define STATE_OUTOFSYNC 2
    2020
     21class NetworkStream;
     22
    2123
    2224class Synchronizeable : virtual public BaseObject
     
    2931
    3032    virtual void      writeBytes(const byte* data, int length);
    31     virtual int       readBytes(byte* data);
     33    virtual int       readBytes(byte* data, int maxLength, int * reciever);
    3234    virtual void      writeDebug() const;
    3335    virtual void      readDebug() const;
    34    
    35    
    36    
    37    
    38    
    39     void setIsServer(bool isServer);
    40     void setIsOutOfSync(bool outOfSync);
     36
     37    void setIsServer( bool isServer );
     38    void setIsOutOfSync( bool outOfSync );
    4139    bool isServer();
    4240    bool isOutOfSync();
     41    void setUniqueID( int id ){ uniqueID = id; }
     42    int  getUniqueID() const { return uniqueID; };
     43    void requestSync( int hostID ){ this->synchronizeRequests.push_back( hostID ); }
     44
     45    inline int getOwner(){ return owner; }
     46    inline void setOwner(int owner){ this->owner = owner; }
     47
     48    inline void setNetworkStream(NetworkStream* stream) { this->networkStream = stream; }
    4349
    4450  private:
    4551
    4652    int               uniqueID;
    47    
    48    
    49    
     53
     54
     55
    5056    //static std::vector<Synchronizeable*> classList;
    5157    int owner;
     
    5460    std::list<int> synchronizeRequests;
    5561
     62    NetworkStream* networkStream;
     63
    5664  };
    5765#endif /* _SYNCHRONIZEABLE_H */
Note: See TracChangeset for help on using the changeset viewer.