Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_string.h @ 9347

Last change on this file since 9347 was 9347, checked in by bensch, 18 years ago

orxonox/proxy: merged the proxy.old back again, and it seems to work.

Merged with command
svn merge -r9247:HEAD https://svn.orxonox.net/orxonox/branches/proxy.old .

no conflicts

File size: 1.1 KB
Line 
1/*!
2 * @file synchronizeable_string.h
3 * @brief Definition of SynchronizeableString
4*/
5
6#include "synchronizeable_var/synchronizeable_var.h"
7#include "converter.h"
8
9#ifndef _SYNCHRONIZEABLE_STRING_H
10#define _SYNCHRONIZEABLE_STRING_H
11
12#include <string>
13
14class SynchronizeableString : public SynchronizeableVar {
15
16  public:
17    SynchronizeableString( std::string * ptrIn, std::string * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
18    virtual ~SynchronizeableString();
19   
20    virtual int writeToBuf( byte * buf, int maxLength );
21    virtual int readFromBuf( byte * buf, int maxLength );
22   
23       
24    /**
25     * check if writeToBuf will return the same size every time
26     * @return true if same size every time
27     */
28    virtual bool hasStaticSize(){ return false; };
29   
30    virtual int getSize(){ return vPtrIn->length()+INTSIZE; }
31   
32    virtual int getSizeFromBuf( byte * buf, int maxLength );
33   
34    virtual void debug();
35   
36  private:
37    std::string * vPtrIn;       //!< pointer to data (read)
38    std::string * vPtrOut;      //!< pointer to data (write)
39
40};
41
42#endif /* _SYNCHRONIZEABLE_STRING_H */
Note: See TracBrowser for help on using the repository browser.