Rev 1326 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1309 | runge | 1 | /* |
| 2 | * Message.h |
||
| 3 | * |
||
| 4 | * Created on: Apr 25, 2009 |
||
| 5 | * Author: Mattias Runge |
||
| 6 | */ |
||
| 7 | |||
| 8 | #ifndef MESSAGE_H_ |
||
| 9 | #define MESSAGE_H_ |
||
| 10 | |||
| 11 | #include <string> |
||
| 12 | #include <vector> |
||
| 13 | #include <map> |
||
| 1326 | runge | 14 | #include <boost/algorithm/string/trim.hpp> |
| 1315 | runge | 15 | #include "log/Logger.h" |
| 1310 | runge | 16 | #include "message/Variable.h" |
| 1323 | runge | 17 | #include "message/Header.h" |
| 1311 | runge | 18 | #include "protocol/Protocol.h" |
| 1314 | runge | 19 | #include "utils/convert.h" |
| 1309 | runge | 20 | |
| 21 | namespace atom { |
||
| 22 | |||
| 1403 | runge | 23 | //using namespace boost::algorithm; |
| 1326 | runge | 24 | |
| 1309 | runge | 25 | class Message |
| 26 | { |
||
| 27 | public: |
||
| 1403 | runge | 28 | typedef boost::shared_ptr<Message> Pointer; |
| 1309 | runge | 29 | |
| 1403 | runge | 30 | Message(const void *origin); |
| 1309 | runge | 31 | Message(); |
| 32 | virtual ~Message(); |
||
| 33 | |||
| 1403 | runge | 34 | const void *GetOrigin() const; |
| 1309 | runge | 35 | |
| 1323 | runge | 36 | Header & getHeader(); |
| 1309 | runge | 37 | Variable & getVariable(string name); |
| 1326 | runge | 38 | variableMap & getVariables(); |
| 1309 | runge | 39 | responseList getResponses(); |
| 40 | |||
| 1326 | runge | 41 | string toString(); |
| 42 | |||
| 1309 | runge | 43 | private: |
| 1403 | runge | 44 | typedef std::map<std::string, Variable> variableMap; |
| 45 | typedef std::vector<std::string> responseList; |
||
| 46 | |||
| 47 | |||
| 1315 | runge | 48 | log::Logger LOG; |
| 1309 | runge | 49 | |
| 50 | const void *myOrigin; |
||
| 51 | |||
| 1323 | runge | 52 | Header myHeader; |
| 1309 | runge | 53 | variableMap myVariables; |
| 54 | responseList myResponses; |
||
| 55 | }; |
||
| 56 | |||
| 1403 | runge | 57 | } // namespace atom |
| 1309 | runge | 58 | |
| 59 | #endif /* MESSAGE_H_ */ |