3 #include <boost/assign/list_of.hpp> 4 #include <base-logging/Logging.hpp> 12 std::map<representation::Type, EnvelopeFormatPtr > EnvelopeGenerator::msFormats = boost::assign::map_list_of
18 std::map<representation::Type, EnvelopeFormatPtr >::const_iterator it = msFormats.find(type);
20 if( it != msFormats.end())
22 return it->second->apply(envelope);
26 snprintf(buffer, 512,
"fipa::acl::EnvelopeGenerator: envelope format of type '%s' is unknown",
representation::TypeTxt[type].c_str());
27 LOG_ERROR(
"%s", buffer);
28 throw std::runtime_error(buffer);
static std::string create(const ACLEnvelope &msg, const representation::Type &acl_representation)
ACLMessage envelope (also typed as fipa::acl::Letter) includes the base envelope and updated fields...
const std::string TypeTxt[]
Foundation of Physical Intelligent Agents.