Changeset 7444 in orxonox.OLD for branches/network/src/lib/lang
- Timestamp:
- Apr 29, 2006, 1:57:48 PM (19 years ago)
- Location:
- branches/network/src/lib/lang
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/lang/base_object.cc
r7230 r7444 177 177 178 178 } 179 180 /**181 * Writes data from network containing information about the state182 * @param data pointer to data183 * @param length length of data184 * @param sender hostID of sender185 */186 int BaseObject::writeState( const byte * data, int length, int sender )187 {188 SYNCHELP_READ_BEGIN();189 190 SYNCHELP_READ_STRING( this->objectName, NWT_BO_NAME );191 192 return SYNCHELP_READ_N;193 }194 195 /**196 * data copied in data will bee sent to another host197 * @param data pointer to data198 * @param maxLength max length of data199 * @return the number of bytes writen200 */201 int BaseObject::readState( byte * data, int maxLength )202 {203 SYNCHELP_WRITE_BEGIN();204 205 //PRINTF(0)("objectname = %s\n", this->objectName);206 SYNCHELP_WRITE_STRING( this->objectName, NWT_BO_NAME );207 208 return SYNCHELP_WRITE_N;209 } -
branches/network/src/lib/lang/base_object.h
r7221 r7444 51 51 bool operator==(ClassID classID) { return this->isA(classID); }; 52 52 53 int writeState(const byte* data, int length, int sender);54 int readState(byte* data, int maxLength );55 56 53 protected: 57 54 void setClassID(ClassID classID, const std::string& className); 55 std::string objectName; //!< The name of this object 58 56 59 57 private: 60 58 std::string className; //!< the name of the class 61 59 long classID; //!< this is the id from the class_id.h enumeration 62 std::string objectName; //!< The name of this object63 60 64 61 ClassList* classList; //!< Pointer to the ClassList this Object is inside of
Note: See TracChangeset
for help on using the changeset viewer.