Changeset 6139 in orxonox.OLD for trunk/src/lib/network/synchronizeable.h
- Timestamp:
- Dec 16, 2005, 6:45:32 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/synchronizeable.h
r5997 r6139 19 19 #define STATE_OUTOFSYNC 2 20 20 21 class NetworkStream; 22 21 23 22 24 class Synchronizeable : virtual public BaseObject … … 29 31 30 32 virtual void writeBytes(const byte* data, int length); 31 virtual int readBytes(byte* data );33 virtual int readBytes(byte* data, int maxLength, int * reciever); 32 34 virtual void writeDebug() const; 33 35 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 ); 41 39 bool isServer(); 42 40 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; } 43 49 44 50 private: 45 51 46 52 int uniqueID; 47 48 49 53 54 55 50 56 //static std::vector<Synchronizeable*> classList; 51 57 int owner; … … 54 60 std::list<int> synchronizeRequests; 55 61 62 NetworkStream* networkStream; 63 56 64 }; 57 65 #endif /* _SYNCHRONIZEABLE_H */
Note: See TracChangeset
for help on using the changeset viewer.