Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

VOS::MessageContext Class Reference

A message substitution context. More...

#include <messagecontext.hh>

Inheritance diagram for VOS::MessageContext:

VOS::RefCounted List of all members.

Public Member Functions


Detailed Description

A message substitution context.

Definition at line 38 of file messagecontext.hh.


Constructor & Destructor Documentation

MessageContext::MessageContext  ) 
 

Definition at line 30 of file messagecontext.cc.

MessageContext::~MessageContext  ) 
 

Definition at line 35 of file messagecontext.cc.


Member Function Documentation

void MessageContext::addToReplyRecord Message m  ) 
 

The reply record is a record of our outgoing replies to method calls that we have received from others.

We collect these replies in the reply record for the purpose of doing substitutions using on the contents of these messages.

Parameters:
m the message to add

Definition at line 59 of file messagecontext.cc.

void MessageContext::doSubstitution string &  s,
unsigned int  p = 0
 

Do substitutions on a string based on this (and enclosing) contexts.

Parameters:
s the string to substitute into (will be changed!)
p offset to start processing (used internally)

Definition at line 100 of file messagecontext.cc.

Referenced by VOS::Message::getDependency(), VOS::Message::getFrom(), VOS::Message::getLoggableString(), VOS::Message::getMethod(), VOS::Message::getNonce(), and VOS::Message::getTo().

Message * MessageContext::getFromReplyRecord const string &  s  ) 
 

Retrieve a message from the reply record, given a nonce.

Parameters:
s the nonce string
Returns:
the message nonce requested, or 0 if not found. NOTE YOU MUST CALL release() WHEN DONE OR USE A pREF() BLOCK

Definition at line 78 of file messagecontext.cc.

Referenced by doSubstitution().

string MessageContext::getParameter const string &  p  )  throw (NoSuchParameterError)
 

Get a substitution parameter.

Parameters:
p the parameter name or key
Returns:
the value to be substituted
Exceptions:
NoSuchParameterError if there is no such parameter

Definition at line 49 of file messagecontext.cc.

Referenced by doSubstitution().

MessageContext * MessageContext::getParentContext  ) 
 

Get the parent (enclosing) context.

Returns:
the parent context, if any, or 0. NOTE YOU MUST CALL release() WHEN DONE OR USE A pREF() BLOCK

Definition at line 174 of file messagecontext.cc.

void MessageContext::removeFromReplyRecord Message m  ) 
 

Remove a message from the reply record.

Parameters:
m the message to be removed

Definition at line 88 of file messagecontext.cc.

bool MessageContext::replyRecordContains const string &  s  ) 
 

Tests to see if the reply record contains a message with a certain nonce.

Parameters:
s the nonce
Returns:
whether a messages matches that nonce or not

Definition at line 69 of file messagecontext.cc.

void MessageContext::setParameter const string &  p,
const string &  v
 

Set a substitution parameter.

Parameters:
p the parameter name or key
v the value to be substituted

Definition at line 44 of file messagecontext.cc.

void MessageContext::setParentContext MessageContext mc  ) 
 

Definition at line 165 of file messagecontext.cc.


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:56:04 2003 for Interreality Project - VOS by doxygen 1.3.2