Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2005, 1:52:26 AM (18 years ago)
Author:
bensch
Message:

orxonox/branches/newtork: merged the network branche for merging to the trunk
confilcts maily resolved in favor of trunk with some minor fixes

merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/network . -r6146:HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network_merged/src/lib/lang/base_object.cc

    r6282 r6340  
    2222#include "compiler.h"
    2323#include "class_list.h"
     24
     25#include "synchronizeable.h"
    2426
    2527using namespace std;
     
    180182
    181183}
     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 */
     191int 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 */
     211int 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}
Note: See TracChangeset for help on using the changeset viewer.