|
fipa_acl
1.4
|
#include <conversation.h>
Inherits fipa::acl::ConversationObservable.
Static Public Member Functions | |
| static fipa::acl::ConversationID | generateConversationID (const std::string &topic="") |
| static std::string | toString (const std::vector< fipa::acl::ACLMessage > &messages) |
Additional Inherited Members | |
Protected Attributes inherited from fipa::acl::ConversationObservable | |
| fipa::acl::ConversationID | mConversationId |
A Conversation represents a flow of messages which have the conversation id and (commonly) the protocol in common
A conversation can be observed and observers will be notified when the conversation is updated
Definition at line 257 of file conversation.h.
| fipa::acl::Conversation::Conversation | ( | const std::string & | owner, |
| const fipa::acl::ConversationID & | conversationId = fipa::acl::ConversationID() |
||
| ) |
Constructor of an empty conversation Owner and conversation id need to be provided
| owner | Owner of the conversation will be the current agent |
| conversationId | Conversation id - If no conversation id is provided, one will automatically be generated |
Definition at line 100 of file conversation.cpp.
| fipa::acl::Conversation::Conversation | ( | const std::string & | owner, |
| const fipa::acl::ACLMessage & | initiator | ||
| ) |
Constructor of a Conversation that requires an iniating message, i.e. includes a call to update
Definition at line 112 of file conversation.cpp.
| fipa::acl::Conversation::Conversation | ( | const Conversation & | other | ) |
Definition at line 122 of file conversation.cpp.
|
virtual |
Conversation destructor cleans also all related commands in the command controller
Definition at line 133 of file conversation.cpp.
|
static |
Create a new ConversationID
Definition at line 285 of file conversation.cpp.
| std::string fipa::acl::Conversation::getContentLanguage | ( | ) | const |
Get content language (which is set by the initiating message)
Definition at line 137 of file conversation.cpp.
| fipa::acl::ACLMessage fipa::acl::Conversation::getLastMessage | ( | ) | const |
Get the last message of a conversation
Definition at line 245 of file conversation.cpp.
|
inline |
Get all messages in order of this conversation
Definition at line 322 of file conversation.h.
| std::string fipa::acl::Conversation::getOwner | ( | ) | const |
Get the name of the owner of this conversation, this is equal to the agent name of the system
Definition at line 280 of file conversation.cpp.
|
inline |
Get protocol (which is set by the initiating message)
Definition at line 291 of file conversation.h.
| bool fipa::acl::Conversation::hasEnded | ( | ) | const |
Check if conversation has ended. This is closely related to the interaction protocol flow, i.e. only when the protocol has been validated the conversation will end
Definition at line 251 of file conversation.cpp.
| bool fipa::acl::Conversation::hasMessages | ( | ) | const |
Check if this is an active conversation
Definition at line 274 of file conversation.cpp.
|
inline |
Set content language
Definition at line 296 of file conversation.h.
|
inline |
For protocols requiring a proxy/propagate behaviour, the number of sub conversations to be started needs to be known in order to monitor the end of the conversation correctly. E.g. a broker would set this to m, as soon as he knows that m agents will be contacted.
This MUST be called BEFORE an actual message of a sub conversation is sent.
Definition at line 311 of file conversation.h.
|
inline |
Set the protocol for this conversation
Definition at line 285 of file conversation.h.
|
static |
Convert message list to string
Definition at line 295 of file conversation.cpp.
| std::string fipa::acl::Conversation::toString | ( | ) | const |
| void fipa::acl::Conversation::update | ( | const fipa::acl::ACLMessage & | msg | ) |
Update a conversation using an incoming message
| msg | incoming or outgoing message |
Definition at line 142 of file conversation.cpp.
1.8.13