fipa_acl  1.4
message_parser.h
Go to the documentation of this file.
1 #ifndef FIPAACL_MESSAGE_PARSER_H
2 #define FIPAACL_MESSAGE_PARSER_H
3 
4 #include <map>
5 #include <fipa_acl/message_generator/acl_message.h>
6 #include <fipa_acl/message_generator/types.h>
7 #include <boost/shared_ptr.hpp>
8 
9 namespace fipa {
10 namespace acl {
11 
13 {
14  public:
16  virtual bool parseData(const std::string& storage, ACLMessage& msg) { throw std::runtime_error("Parser not implemented"); }
17 };
18 
19 typedef boost::shared_ptr<MessageParserImplementation> MessageParserImplementationPtr;
20 
29 {
30  public:
38  static bool parseData(const std::string& storage, ACLMessage &msg, fipa::acl::representation::Type representation = fipa::acl::representation::BITEFFICIENT);
39 
40  private:
41  static std::map<fipa::acl::representation::Type, fipa::acl::MessageParserImplementationPtr> msParsers;
42 };
43 
44 
45 }
46 }
47 
48 #endif // FIPAACL_MESSAGE_PARSER_H_
static bool parseData(const std::string &storage, ACLMessage &msg, fipa::acl::representation::Type representation=fipa::acl::representation::BITEFFICIENT)
parses a correctly encoded message according to grammar_bitefficient.h and creates a Message object f...
Allows to parse a bytestream that conforms to the bitefficient representation of FIPA messages to a A...
boost::shared_ptr< MessageParserImplementation > MessageParserImplementationPtr
virtual bool parseData(const std::string &storage, ACLMessage &msg)
This class provides a representation of a message conforming to the FIPA specification SC00061...
Definition: acl_message.h:55