Changeset 9347 in orxonox.OLD for branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_var.h
- Timestamp:
- Jul 20, 2006, 11:43:27 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_var.h
r7954 r9347 12 12 13 13 enum { 14 PERMISSION_SERVER = 1, 15 PERMISSION_OWNER = 2, 16 PERMISSION_ALL = 4 14 PERMISSION_MASTER_SERVER = 1, 15 PERMISSION_PROXY_SERVER = 2, 16 PERMISSION_OWNER = 4, 17 PERMISSION_ALL = 8 17 18 }; 18 19 … … 20 21 21 22 public: 22 SynchronizeableVar( void * ptrIn, void * ptrOut, std::string name, int length, int permission = PERMISSION_ SERVER, int priority = 0 );23 SynchronizeableVar( void * ptrIn, void * ptrOut, std::string name, int length, int permission = PERMISSION_MASTER_SERVER, int priority = 0 ); 23 24 virtual ~SynchronizeableVar(); 24 25 … … 28 29 */ 29 30 inline bool beWatched(){ return this->bWatched; } 30 31 /** 31 32 /** 32 33 * set flag if synchronizeable wants to be informed on changes 33 34 */ … … 96 97 */ 97 98 inline void resetPriority() { this->priority = this->realPriority; } 98 99 99 100 /** 100 101 * reads actual size from buffer. this is used when size is not constant … … 104 105 */ 105 106 virtual inline int getSizeFromBuf( byte * buf, int maxLength ){ return this->getSize(); } 106 107 107 108 /** 108 109 * set variable id … … 110 111 */ 111 112 inline void setVarId( int id ){ this->varId = id; } 112 113 /** 113 114 /** 114 115 * get variable id 115 116 * @return variable id 116 117 */ 117 118 inline int getVarId(){ return varId; } 118 119 119 120 /** 120 121 * set hasChanged … … 122 123 */ 123 124 inline void setHasChanged( bool changed ){ this->changed = changed; } 124 125 /** 125 126 /** 126 127 * get hasChanged 127 128 * @return variable id 128 129 */ 129 130 inline bool getHasChanged(){ return changed; } 130 131 131 132 /** 132 133 * print out variable value … … 137 138 private: 138 139 bool bWatched; //!< true if synchronizeable wants to be informed on changes 139 140 140 141 int permission; //!< who is allowed to change this var 141 142 int priority; //!< priority assigned to var 142 143 int realPriority; //!< priority assigned to var, increased every time not sent 143 144 int varId; //!< id to identify varables 144 145 145 146 bool changed; //!< true if last readFromBuf changed anything 146 147
Note: See TracChangeset
for help on using the changeset viewer.