Rev 1326 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1309 | runge | 1 | /* |
| 2 | * Variable.h |
||
| 3 | * |
||
| 4 | * Created on: Jul 21, 2009 |
||
| 5 | * Author: Mattias Runge |
||
| 6 | */ |
||
| 7 | |||
| 8 | #ifndef VARIABLE_H_ |
||
| 9 | #define VARIABLE_H_ |
||
| 10 | |||
| 11 | #include <string> |
||
| 12 | #include <boost/make_shared.hpp> |
||
| 1310 | runge | 13 | #include "message/Datatype.h" |
| 1319 | runge | 14 | #include "message/BitBuffer.h" |
| 1311 | runge | 15 | #include "protocol/Protocol.h" |
| 1314 | runge | 16 | #include "utils/convert.h" |
| 1323 | runge | 17 | #include "xml/Node.h" |
| 1328 | runge | 18 | #include "log/Logger.h" |
| 1309 | runge | 19 | |
| 20 | namespace atom { |
||
| 21 | namespace message { |
||
| 22 | |||
| 23 | using namespace std; |
||
| 24 | |||
| 25 | class Variable |
||
| 26 | { |
||
| 27 | public: |
||
| 28 | Variable(); |
||
| 1323 | runge | 29 | Variable(xml::Node xmlNode); |
| 1309 | runge | 30 | virtual ~Variable(); |
| 31 | |||
| 1322 | runge | 32 | string getName(); |
| 33 | Datatype::pointer getDatatype(); |
||
| 34 | string getUnit(); |
||
| 35 | bool isRequired(); |
||
| 1310 | runge | 36 | |
| 1309 | runge | 37 | void readBits(BitBuffer & buffer); |
| 1322 | runge | 38 | void writeBits(BitBuffer & buffer); |
| 1309 | runge | 39 | |
| 1326 | runge | 40 | string toString(); |
| 41 | |||
| 1309 | runge | 42 | private: |
| 1328 | runge | 43 | log::Logger LOG; |
| 44 | |||
| 1310 | runge | 45 | string myName; |
| 46 | Datatype::pointer myDatatype; |
||
| 1309 | runge | 47 | bool myRequired; |
| 48 | string myUnit; |
||
| 49 | }; |
||
| 50 | |||
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 54 | #endif /* VARIABLE_H_ */ |