Last change
on this file since 9364 was
7954,
checked in by patrick, 19 years ago
|
trunk: merged the network branche back to trunk.
|
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 | |
---|
14 | class SynchronizeableString : public SynchronizeableVar { |
---|
15 | |
---|
16 | public: |
---|
17 | SynchronizeableString( std::string * ptrIn, std::string * ptrOut, std::string name, int permission = PERMISSION_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.