fipa_acl  1.4
Public Member Functions | List of all members
fipa::acl::MessageFormat Class Referenceabstract

Abstract class which should be implemented by a specific format to encode an ACLMessage according to the fipa specification (SC00069) More...

#include <message_format.h>

Inherited by fipa::acl::BitefficientMessageFormat, fipa::acl::StringMessageFormat, and fipa::acl::XMLMessageFormat.

Public Member Functions

 MessageFormat ()
 
virtual ~MessageFormat ()
 
void setUseCodeTables (bool x)
 
bool getUseCodeTables () const
 
void setUpdateCodeTables (bool x)
 
bool getUpdateCodeTables () const
 
void setResolverDepth (int depth)
 
int getResolverDepth () const
 
void setVersion (const std::string &version)
 
std::string getVersion () const
 
virtual std::string apply (const ACLMessage &msg) const =0
 

Detailed Description

Abstract class which should be implemented by a specific format to encode an ACLMessage according to the fipa specification (SC00069)

Definition at line 22 of file message_format.h.

Constructor & Destructor Documentation

fipa::acl::MessageFormat::MessageFormat ( )

Default construction

Definition at line 7 of file message_format.cpp.

8  : mUseCodeTables(false)
9  , mUpdateCodeTables(true)
10  // FIPA defines version 1.0
11  , mVersion("1.0")
12  , mResolverDepth(1)
13 {
14 }
virtual fipa::acl::MessageFormat::~MessageFormat ( )
inlinevirtual

Definition at line 54 of file message_format.h.

54 {}

Member Function Documentation

virtual std::string fipa::acl::MessageFormat::apply ( const ACLMessage msg) const
pure virtual

Format the message

Returns
the newly formatted message object

Implemented in fipa::acl::XMLMessageFormat, fipa::acl::BitefficientMessageFormat, and fipa::acl::StringMessageFormat.

int fipa::acl::MessageFormat::getResolverDepth ( ) const
inline

Get resolver depth which should be considered for comparison

Returns
resolver depth

Definition at line 87 of file message_format.h.

87 { return mResolverDepth; }
bool fipa::acl::MessageFormat::getUpdateCodeTables ( ) const
inline

Get update code tables

Returns
True if codetable should be update, false otherwise

Definition at line 76 of file message_format.h.

76 { return mUpdateCodeTables; }
bool fipa::acl::MessageFormat::getUseCodeTables ( ) const
inline

Check if code tables shouldbe used

Returns
True, if code tables should be used, false otherwise

Definition at line 65 of file message_format.h.

65 { return mUseCodeTables; }
std::string fipa::acl::MessageFormat::getVersion ( ) const
inline

Get version of the format

Definition at line 97 of file message_format.h.

97 { return mVersion; }
void fipa::acl::MessageFormat::setResolverDepth ( int  depth)
inline

Set resolver depth which should be considered for comparison

Definition at line 81 of file message_format.h.

81 { mResolverDepth = depth; }
void fipa::acl::MessageFormat::setUpdateCodeTables ( bool  x)
inline

Set whether code tables should be updated

Definition at line 70 of file message_format.h.

70 { mUpdateCodeTables = x; }
void fipa::acl::MessageFormat::setUseCodeTables ( bool  x)
inline

Set if use code table should be used

Definition at line 59 of file message_format.h.

59 { mUseCodeTables = x; }
void fipa::acl::MessageFormat::setVersion ( const std::string &  version)
inline

Set version format

Definition at line 92 of file message_format.h.

92 { mVersion = version; }

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