Last change
on this file since 7459 was
7459,
checked in by rennerc, 18 years ago
|
finished some SynchronizeableVars classes
|
File size:
955 bytes
|
Rev | Line | |
---|
[7444] | 1 | /*! |
---|
| 2 | * @file synchronizeable_string.h |
---|
| 3 | * @brief Definition of SynchronizeableString |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #include "synchronizeable_var/synchronizeable_var.h" |
---|
| 7 | |
---|
| 8 | #ifndef _SYNCHRONIZEABLE_STRING_H |
---|
| 9 | #define _SYNCHRONIZEABLE_STRING_H |
---|
| 10 | |
---|
| 11 | #include <string> |
---|
| 12 | |
---|
| 13 | class SynchronizeableString : public SynchronizeableVar { |
---|
| 14 | |
---|
| 15 | public: |
---|
| 16 | SynchronizeableString( std::string * ptrIn, std::string * ptrOut, std::string name, int permission = 0, int priority = 0 ); |
---|
| 17 | virtual ~SynchronizeableString(); |
---|
| 18 | |
---|
| 19 | virtual int writeToBuf( byte * buf, int maxLength ); |
---|
| 20 | virtual int readFromBuf( byte * buf, int maxLength ); |
---|
| 21 | |
---|
[7459] | 22 | |
---|
| 23 | /** |
---|
| 24 | * check if writeToBuf will return the same size every time |
---|
| 25 | * @return true if same size every time |
---|
| 26 | */ |
---|
| 27 | virtual bool hasStaticSize(){ return false; }; |
---|
| 28 | |
---|
[7444] | 29 | private: |
---|
| 30 | std::string * vPtrIn; //!< pointer to data (read) |
---|
| 31 | std::string * vPtrOut; //!< pointer to data (write) |
---|
| 32 | |
---|
| 33 | }; |
---|
| 34 | |
---|
| 35 | #endif /* _SYNCHRONIZEABLE_STRING_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.