Rev 1596 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1596 | Rev 1602 | ||
|---|---|---|---|
| Line 23... | Line 23... | ||
| 23 | 23 | ||
| 24 | #include <string> |
24 | #include <string> |
| 25 | #include <map> |
25 | #include <map> |
| 26 | 26 | ||
| 27 | #include <boost/shared_ptr.hpp> |
27 | #include <boost/shared_ptr.hpp> |
| - | 28 | ||
| - | 29 | #include "type/common.h" |
|
| 28 | 30 | ||
| 29 | namespace atom { |
31 | namespace atom { |
| 30 | namespace can { |
32 | namespace can { |
| 31 | 33 | ||
| 32 | class Message |
34 | class Message |
| 33 | { |
35 | { |
| 34 | public: |
36 | public: |
| 35 | typedef boost::shared_ptr<Message> Pointer; |
37 | typedef boost::shared_ptr<Message> Pointer; |
| 36 | typedef std::map<std::string, std::string> VariableList; |
- | |
| 37 | 38 | ||
| 38 | Message(std::string class_name, std::string direction_name, std::string module_name, unsigned int id, std::string command_name); |
39 | Message(std::string class_name, std::string direction_name, std::string module_name, unsigned int id, std::string command_name); |
| 39 | virtual ~Message(); |
40 | virtual ~Message(); |
| 40 | 41 | ||
| 41 | std::string GetClassName(); |
42 | std::string GetClassName(); |
| Line 45... | Line 46... | ||
| 45 | std::string GetCommandName(); |
46 | std::string GetCommandName(); |
| 46 | 47 | ||
| 47 | std::string GetVariable(std::string name); |
48 | std::string GetVariable(std::string name); |
| 48 | void SetVariable(std::string name, std::string value); |
49 | void SetVariable(std::string name, std::string value); |
| 49 | 50 | ||
| 50 |
|
51 | type::StringMap& GetVariables(); |
| - | 52 | void SetVariables(type::StringMap variables); |
|
| 51 | 53 | ||
| 52 | private: |
54 | private: |
| 53 | std::string class_name_; |
55 | std::string class_name_; |
| 54 | std::string direction_name_; |
56 | std::string direction_name_; |
| 55 | std::string module_name_; |
57 | std::string module_name_; |
| 56 | unsigned int id_; |
58 | unsigned int id_; |
| 57 | std::string command_name_; |
59 | std::string command_name_; |
| 58 |
|
60 | type::StringMap variables_; |
| 59 | }; |
61 | }; |
| 60 | 62 | ||
| 61 | }; // namespace can |
63 | }; // namespace can |
| 62 | }; // namespace atom |
64 | }; // namespace atom |
| 63 | 65 | ||