fipa_acl  1.4
Classes | Namespaces | Macros | Functions | Variables
grammar_common.h File Reference
#include <boost/config/warning_disable.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/home/support/context.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_object.hpp>
#include <boost/spirit/include/phoenix_fusion.hpp>
#include <boost/spirit/include/phoenix_stl.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <arpa/inet.h>
#include <ctime>
#include <base-logging/Logging.hpp>
#include <fipa_acl/message_generator/acl_message.h>
#include <fipa_acl/message_parser/types.h>
#include <boost/fusion/include/adapt_class.hpp>

Go to the source code of this file.

Classes

struct  result< T >
 
struct  buildStringImpl
 
struct  buildStringImpl::result< T, U, V >
 
struct  concatStringsWithSeparatorImpl
 
struct  concatStringsWithSeparatorImpl::result< T, U, V >
 
struct  printImpl
 
struct  printImpl::result< T, U >
 
struct  digitPaddingBytesImpl
 
struct  digitPaddingBytesImpl::result< T >
 
struct  convertToNumberTokenImpl
 
struct  convertToNumberTokenImpl::result< T >
 
struct  convertDigitsToHexImpl
 
struct  convertDigitsToHexImpl::result< T >
 
struct  convertToNativeShortImpl
 
struct  convertToNativeShortImpl::result< T >
 
struct  convertToNativeLongImpl
 
struct  convertToNativeLongImpl::result< T >
 
struct  convertToStringImpl
 
struct  convertToStringImpl::result< T >
 
struct  convertToCharVectorImpl
 
struct  convertToCharVectorImpl::result< T >
 
struct  createAgentIDImpl
 
struct  createAgentIDImpl::result< T >
 
struct  convertStringToNumberImpl
 
struct  convertStringToNumberImpl::result< T >
 
struct  convertToTimeImpl
 
struct  convertToTimeImpl::result< T, U >
 
struct  convertToBaseTimeImpl
 
struct  convertToBaseTimeImpl::result< T >
 
struct  acl::grammar::Index< Iterator >
 
struct  acl::grammar::Len8< Iterator >
 
struct  acl::grammar::Len16< Iterator >
 
struct  acl::grammar::Len32< Iterator >
 
struct  acl::grammar::StringLiteral< Iterator >
 
struct  acl::grammar::StringLiteralTerminated< Iterator >
 
struct  acl::grammar::ByteLengthEncodedString< Iterator >
 
struct  acl::grammar::ByteLengthEncodedStringTerminated< Iterator >
 
struct  acl::grammar::NullTerminatedString< Iterator >
 
struct  acl::grammar::Word< Iterator >
 
struct  acl::grammar::Digits< Iterator >
 
struct  acl::grammar::CodedNumber< Iterator >
 
struct  acl::grammar::DateTime< Iterator >
 
struct  acl::grammar::String< Iterator >
 

Namespaces

 acl
 
 acl::grammar
 

Macros

#define FIPA_DEBUG_RULE(X)
 
#define FIPA_ACL_FUSION_ADAPT   BOOST_FUSION_ADAPT_CLASS
 

Functions

 FIPA_ACL_FUSION_ADAPT (fipa::acl::AgentID,(const std::string &, const std::string &, obj.getName(), obj.setName(val))(const std::vector< std::string > &, const std::vector< std::string > &, obj.getAddresses(), obj.setAddresses(val))(const std::vector< fipa::acl::AgentID > &, const std::vector< fipa::acl::AgentID > &, obj.getResolvers(), obj.setResolvers(val))(const std::vector< fipa::acl::UserdefParam > &, const std::vector< fipa::acl::UserdefParam > &, obj.getUserdefParams(), obj.setUserdefParams(val)))
 
 FIPA_ACL_FUSION_ADAPT (fipa::acl::UserdefParam,(const std::string &, const std::string &, obj.getName(), obj.setName(val))(const std::string &, const std::string &, obj.getValue(), obj.setValue(val)))
 
 FIPA_ACL_FUSION_ADAPT (fipa::acl::ACLMessage,(std::string, std::string, obj.getPerformative(), obj.setPerformative(val))(fipa::acl::AgentID, fipa::acl::AgentID, obj.getSender(), obj.setSender(val))(fipa::acl::AgentIDList, fipa::acl::AgentIDList, obj.getAllReceivers(), obj.setAllReceivers(val))(std::string, std::string, obj.getContent(), obj.setContent(val))(std::string, std::string, obj.getReplyWith(), obj.setReplyWith(val))(base::Time, base::Time, obj.getReplyBy(), obj.setReplyBy(val))(std::string, std::string, obj.getInReplyTo(), obj.setInReplyTo(val))(fipa::acl::AgentIDList, fipa::acl::AgentIDList, obj.getAllReplyTo(), obj.setAllReplyTo(val))(std::string, std::string, obj.getLanguage(), obj.setLanguage(val))(std::string, std::string, obj.getEncoding(), obj.setEncoding(val))(std::string, std::string, obj.getOntology(), obj.setOntology(val))(std::string, std::string, obj.getProtocol(), obj.setProtocol(val))(std::string, std::string, obj.getConversationID(), obj.setConversationID(val))(void, void,, obj.addUserdefParam(val)))
 
template<typename T >
result_type operator() (T arg) const
 

Variables

phoenix::function
< extractFromCodetableImpl > 
extractFromCodetable
 
phoenix::function
< buildStringImpl
buildString
 
phoenix::function
< concatStringsWithSeparatorImpl
concatStringsWithSeparator
 
phoenix::function< printImplprint
 
phoenix::function
< digitPaddingBytesImpl
digitPaddingBytes
 
phoenix::function
< convertToNumberTokenImpl
convertToNumberToken
 
phoenix::function
< convertDigitsToHexImpl
convertDigitsToHex
 
phoenix::function
< convertToNativeShortImpl
lazy_ntohs
 
phoenix::function
< convertToNativeLongImpl
lazy_ntohl
 
phoenix::function
< convertToStringImpl
convertToString
 
phoenix::function
< convertToCharVectorImpl
convertToCharVector
 
phoenix::function
< createAgentIDImpl
createAgentID
 
phoenix::function
< convertStringToNumberImpl
convertStringToNumber
 
phoenix::function
< convertToTimeImpl
convertToTime
 
phoenix::function
< convertToBaseTimeImpl
convertToBaseTime
 

Macro Definition Documentation

#define FIPA_ACL_FUSION_ADAPT   BOOST_FUSION_ADAPT_CLASS

Definition at line 51 of file grammar_common.h.

#define FIPA_DEBUG_RULE (   X)

Definition at line 39 of file grammar_common.h.

Function Documentation

FIPA_ACL_FUSION_ADAPT ( fipa::acl::AgentID  ,
(const std::string &, const std::string &, obj.getName(), obj.setName(val))(const std::vector< std::string > &, const std::vector< std::string > &, obj.getAddresses(), obj.setAddresses(val))(const std::vector< fipa::acl::AgentID > &, const std::vector< fipa::acl::AgentID > &, obj.getResolvers(), obj.setResolvers(val))(const std::vector< fipa::acl::UserdefParam > &, const std::vector< fipa::acl::UserdefParam > &, obj.getUserdefParams(), obj.setUserdefParams(val))   
)
FIPA_ACL_FUSION_ADAPT ( fipa::acl::UserdefParam  ,
(const std::string &, const std::string &, obj.getName(), obj.setName(val))(const std::string &, const std::string &, obj.getValue(), obj.setValue(val))   
)
FIPA_ACL_FUSION_ADAPT ( fipa::acl::ACLMessage  ,
(std::string, std::string, obj.getPerformative(), obj.setPerformative(val))(fipa::acl::AgentID, fipa::acl::AgentID, obj.getSender(), obj.setSender(val))(fipa::acl::AgentIDList, fipa::acl::AgentIDList, obj.getAllReceivers(), obj.setAllReceivers(val))(std::string, std::string, obj.getContent(), obj.setContent(val))(std::string, std::string, obj.getReplyWith(), obj.setReplyWith(val))(base::Time, base::Time, obj.getReplyBy(), obj.setReplyBy(val))(std::string, std::string, obj.getInReplyTo(), obj.setInReplyTo(val))(fipa::acl::AgentIDList, fipa::acl::AgentIDList, obj.getAllReplyTo(), obj.setAllReplyTo(val))(std::string, std::string, obj.getLanguage(), obj.setLanguage(val))(std::string, std::string, obj.getEncoding(), obj.setEncoding(val))(std::string, std::string, obj.getOntology(), obj.setOntology(val))(std::string, std::string, obj.getProtocol(), obj.setProtocol(val))(std::string, std::string, obj.getConversationID(), obj.setConversationID(val))(void, void,, obj.addUserdefParam(val))   
)
template<typename T >
result_type operator() ( arg) const

Definition at line 135 of file grammar_common.h.

136  {
137  if(typeid(T) == typeid(unsigned short))
138  {
139  //unsigned short index;
141  //index = arg;
142 
143  // TODO: search codetable and extract data
144  }
145 
146  throw std::runtime_error("Codetable currently unsupported");
147  }

Variable Documentation

phoenix::function<buildStringImpl> buildString

Definition at line 5 of file grammar_common.cpp.

phoenix::function<concatStringsWithSeparatorImpl> concatStringsWithSeparator

Definition at line 6 of file grammar_common.cpp.

phoenix::function<convertDigitsToHexImpl> convertDigitsToHex

Definition at line 9 of file grammar_common.cpp.

phoenix::function<convertStringToNumberImpl> convertStringToNumber

Definition at line 15 of file grammar_common.cpp.

phoenix::function<convertToBaseTimeImpl> convertToBaseTime

Definition at line 19 of file grammar_common.cpp.

phoenix::function<convertToCharVectorImpl> convertToCharVector

Definition at line 11 of file grammar_common.cpp.

phoenix::function<convertToNumberTokenImpl> convertToNumberToken

Definition at line 20 of file grammar_common.cpp.

phoenix::function<convertToStringImpl> convertToString

Definition at line 10 of file grammar_common.cpp.

phoenix::function<convertToTimeImpl> convertToTime

Definition at line 18 of file grammar_common.cpp.

phoenix::function<createAgentIDImpl> createAgentID

Definition at line 14 of file grammar_common.cpp.

phoenix::function<digitPaddingBytesImpl> digitPaddingBytes

Definition at line 16 of file grammar_common.cpp.

phoenix::function<extractFromCodetableImpl> extractFromCodetable

Definition at line 4 of file grammar_common.cpp.

phoenix::function<convertToNativeLongImpl> lazy_ntohl

Definition at line 13 of file grammar_common.cpp.

phoenix::function<convertToNativeShortImpl> lazy_ntohs

Definition at line 12 of file grammar_common.cpp.

phoenix::function<printImpl> print

Definition at line 7 of file grammar_common.cpp.