fipa_acl  1.4
bitefficient_message_parser.h
Go to the documentation of this file.
1 
8 #ifndef FIPAACL_BITEFFICIENT_MESSAGE_PARSER_H
9 #define FIPAACL_BITEFFICIENT_MESSAGE_PARSER_H
10 
11 #include <vector>
12 #include <string>
13 
14 #include <fipa_acl/message_generator/acl_message.h>
15 #include <fipa_acl/message_generator/userdef_param.h>
16 #include <fipa_acl/message_generator/agent_id.h>
17 
18 #include <fipa_acl/message_parser/types.h>
19 
20 #include <fipa_acl/message_parser/message_parser.h>
21 
25 namespace fipa {
26 
30 namespace acl {
31 
44 {
45  public:
52  bool parseData(const std::string& storage, ACLMessage &msg);
53 
60  bool buildMessage(const Message& parsedMsg, ACLMessage &msg);
61 
62  private:
66  void buildContent(const message::Parameter& param,ACLMessage &msg);
67 
72  void buildParameters(const std::vector<message::Parameter>& parsedParams,ACLMessage &msg);
73 
78  void buildPredefMessageParameters(const message::Parameter& param, ACLMessage &msg);
79 
83  void buildSender(const message::Parameter& param, ACLMessage &msg);
84 
88  AgentID buildAgentID(const AgentIdentifier& agent);
89 
93  void buildResolvers(const AgentIdentifier& agentIdentifier, AgentID& outAgentID);
94 
98  void buildAgentParameters(const AgentIdentifier& agentIdentifier, AgentID& outAgentID);
99 
103  UserdefParam buildUserdefParameter(const UserDefinedParameter& param);
104 
108  UserdefParam buildUserdefParameter(const message::Parameter& param);
109 
113  void buildReceiver(const message::Parameter& param, ACLMessage &msg);
114 
118  void buildReplyBy(const message::Parameter& param, ACLMessage &msg);
119 
123  void buildReplyTo(const message::Parameter& param, ACLMessage &msg);
124 };
125 
126 
127 }
128 }
129 
130 #endif // FIPAACL_BITEFFICIENT_MESSAGE_PARSER_H
Allows to parse a bytestream that conforms to the bitefficient representation of FIPA messages to a A...
Definition for AgentIdentifier.
Definition: agent_id.h:30
bool parseData(const std::string &storage, ACLMessage &msg)
parses a correctly encoded message according to grammar_bitefficient.h and creates a Message object f...
This class provides a representation of a message conforming to the FIPA specification SC00061...
Definition: acl_message.h:55
bool buildMessage(const Message &parsedMsg, ACLMessage &msg)
creates an unpopulated message object and passes it around to have its fields populated, along with the parsed message where the data is extracted from
overloaded equality operator for UserdefParam class objects
Definition: userdef_param.h:25
Implements the general AgentID functionality, which is present throughout the fipa specifications(FIP...
Definition: agent_id.h:37