Last change
on this file since 8284 was
7954,
checked in by patrick, 18 years ago
|
trunk: merged the network branche back to trunk.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[7444] | 1 | /*! |
---|
| 2 | * @file synchronizeable_string.h |
---|
| 3 | * @brief Definition of SynchronizeableString |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #include "synchronizeable_var/synchronizeable_var.h" |
---|
[7508] | 7 | #include "converter.h" |
---|
[7444] | 8 | |
---|
| 9 | #ifndef _SYNCHRONIZEABLE_STRING_H |
---|
| 10 | #define _SYNCHRONIZEABLE_STRING_H |
---|
| 11 | |
---|
| 12 | #include <string> |
---|
| 13 | |
---|
| 14 | class SynchronizeableString : public SynchronizeableVar { |
---|
| 15 | |
---|
| 16 | public: |
---|
[7631] | 17 | SynchronizeableString( std::string * ptrIn, std::string * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 ); |
---|
[7444] | 18 | virtual ~SynchronizeableString(); |
---|
| 19 | |
---|
| 20 | virtual int writeToBuf( byte * buf, int maxLength ); |
---|
| 21 | virtual int readFromBuf( byte * buf, int maxLength ); |
---|
| 22 | |
---|
[7459] | 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 | |
---|
[7508] | 30 | virtual int getSize(){ return vPtrIn->length()+INTSIZE; } |
---|
| 31 | |
---|
[7631] | 32 | virtual int getSizeFromBuf( byte * buf, int maxLength ); |
---|
| 33 | |
---|
[7578] | 34 | virtual void debug(); |
---|
| 35 | |
---|
[7444] | 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.