Changeset 6341 in orxonox.OLD for trunk/src/lib/lang
- Timestamp:
- Dec 30, 2005, 1:57:12 AM (19 years ago)
- Location:
- trunk/src/lib/lang
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/base_object.cc
r6282 r6341 22 22 #include "compiler.h" 23 23 #include "class_list.h" 24 25 #include "synchronizeable.h" 24 26 25 27 using namespace std; … … 180 182 181 183 } 184 185 /** 186 * Writes data from network containing information about the state 187 * @param data pointer to data 188 * @param length length of data 189 * @param sender hostID of sender 190 */ 191 int BaseObject::writeState( const byte * data, int length, int sender ) 192 { 193 SYNCHELP_READ_BEGIN(); 194 195 if ( objectName ) 196 { 197 delete[] objectName; 198 objectName = NULL; 199 } 200 SYNCHELP_READ_STRINGM( this->objectName ); 201 202 return SYNCHELP_READ_N; 203 } 204 205 /** 206 * data copied in data will bee sent to another host 207 * @param data pointer to data 208 * @param maxLength max length of data 209 * @return the number of bytes writen 210 */ 211 int BaseObject::readState( byte * data, int maxLength ) 212 { 213 SYNCHELP_WRITE_BEGIN(); 214 215 SYNCHELP_WRITE_STRING( this->objectName ); 216 217 return SYNCHELP_WRITE_N; 218 } -
trunk/src/lib/lang/base_object.h
r6280 r6341 15 15 #define NULL 0 //!< NULL 16 16 #endif 17 18 #include "stdincl.h" 17 19 18 20 class TiXmlElement; … … 45 47 bool operator==(ClassID classID) { return this->isA(classID); }; 46 48 49 int writeState(const byte* data, int length, int sender); 50 int readState(byte* data, int maxLength ); 47 51 protected: 48 52 void setClassID(ClassID classID, const char* className);
Note: See TracChangeset
for help on using the changeset viewer.