Rev 1309 | Rev 1311 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1309 | Rev 1310 | ||
|---|---|---|---|
| Line 8... | Line 8... | ||
| 8 | #ifndef VARIABLE_H_ |
8 | #ifndef VARIABLE_H_ |
| 9 | #define VARIABLE_H_ |
9 | #define VARIABLE_H_ |
| 10 | 10 | ||
| 11 | #include <string> |
11 | #include <string> |
| 12 | #include <boost/make_shared.hpp> |
12 | #include <boost/make_shared.hpp> |
| 13 | #include "Datatype.h" |
13 | #include "message/Datatype.h" |
| 14 | #include " |
14 | #include "utils/BitBuffer.h" |
| - | 15 | #include "db/Database.h" |
|
| 15 | 16 | ||
| 16 | namespace atom { |
17 | namespace atom { |
| 17 | namespace message { |
18 | namespace message { |
| 18 | 19 | ||
| 19 | using namespace std; |
20 | using namespace std; |
| 20 | using namespace |
21 | using namespace utils; |
| 21 | 22 | ||
| 22 | class Variable |
23 | class Variable |
| 23 | { |
24 | { |
| 24 | public: |
25 | public: |
| 25 | Variable(); |
26 | Variable(); |
| 26 | Variable(string datatype, bool required, string unit); |
27 | Variable(string name, string datatype, bool required, string unit); |
| 27 | virtual ~Variable(); |
28 | virtual ~Variable(); |
| - | 29 | ||
| - | 30 | boost::any getValue(); |
|
| - | 31 | void setValue(boost::any value); |
|
| 28 | 32 | ||
| 29 | void readBits(BitBuffer & buffer); |
33 | void readBits(BitBuffer & buffer); |
| 30 | 34 | ||
| 31 | private: |
35 | private: |
| - | 36 | string myName; |
|
| 32 |
|
37 | Datatype::pointer myDatatype; |
| 33 | bool myRequired; |
38 | bool myRequired; |
| 34 | string myUnit; |
39 | string myUnit; |
| 35 | unsigned int myLength; |
40 | unsigned int myLength; |
| 36 | }; |
41 | }; |
| 37 | 42 | ||