fipa_acl  1.4
envelope_parser.h
Go to the documentation of this file.
1 #ifndef FIPA_ACL_ENVELOPE_PARSER_H
2 #define FIPA_ACL_ENVELOPE_PARSER_H
3 
4 #include <fipa_acl/message_generator/acl_envelope.h>
5 #include <fipa_acl/message_generator/types.h>
6 #include <string>
7 #include <map>
8 #include <boost/shared_ptr.hpp>
9 
10 namespace fipa {
11 namespace acl {
12 
14 {
15  public:
17 
18  virtual bool parseData(const std::string& storage, ACLEnvelope& envelope) { throw std::runtime_error("Parser not implemented"); }
19 };
20 
21 typedef boost::shared_ptr<EnvelopeParserImplementation> EnvelopeParserImplementationPtr;
22 
24 {
25 
26 public:
27  static bool parseData(const std::string& storage, ACLEnvelope& envelope, representation::Type type = fipa::acl::representation::BITEFFICIENT);
28 
29 private:
30  static std::map<fipa::acl::representation::Type, fipa::acl::EnvelopeParserImplementationPtr> msParsers;
31 
32 };
33 
34 } // end namespace acl
35 } // end namespace fipa
36 
37 #endif // FIPA_ACL_ENVELOPE_PARSER_H
virtual bool parseData(const std::string &storage, ACLEnvelope &envelope)
ACLMessage envelope (also typed as fipa::acl::Letter) includes the base envelope and updated fields...
Definition: acl_envelope.h:349
static bool parseData(const std::string &storage, ACLEnvelope &envelope, representation::Type type=fipa::acl::representation::BITEFFICIENT)
boost::shared_ptr< EnvelopeParserImplementation > EnvelopeParserImplementationPtr