fipa_acl  1.4
Static Public Member Functions | List of all members
fipa::acl::EnvelopeGenerator Class Reference

#include <envelope_generator.h>

Static Public Member Functions

static std::string create (const ACLEnvelope &msg, const representation::Type &acl_representation)
 

Detailed Description

Definition at line 10 of file envelope_generator.h.

Member Function Documentation

◆ create()

std::string fipa::acl::EnvelopeGenerator::create ( const ACLEnvelope msg,
const representation::Type acl_representation 
)
static

Create an envelope object of a certain al representation (format), e.g. bitefficient, string or xml

Returns
Envelope including message content

Definition at line 16 of file envelope_generator.cpp.

17 {
18  std::map<representation::Type, EnvelopeFormatPtr >::const_iterator it = msFormats.find(type);
19 
20  if( it != msFormats.end())
21  {
22  return it->second->apply(envelope);
23  } else
24  {
25  char buffer[512];
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);
29  }
30 }
const std::string TypeTxt[]
Definition: types.h:28

The documentation for this class was generated from the following files: