Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

BaseMsg Class Reference

Inheritance diagram for BaseMsg:

Inheritance graph
[legend]

Detailed Description

Messgage.

Definition at line 11 of file BaseMsg.h.

Public Member Functions

 BaseMsg (const std::string &listenerName, const std::string &name)
 Create msg.
virtual ~BaseMsg ()
virtual BaseMsgclone () const =0
virtual void sendActual (BaseListener *listener) const =0
void sendClone () const
 Send copy of message.
bool equalsName (const std::string &name) const
const std::string & getMsgName () const
const std::string & getListenerName () const
virtual std::string toString () const

Protected Attributes

std::string m_listenerName
std::string m_name


Constructor & Destructor Documentation

BaseMsg::BaseMsg const std::string &  listenerName,
const std::string &  name
 

Create msg.

Parameters:
listenerName name of destination
name msg name

Definition at line 19 of file BaseMsg.cpp.

00020 : m_listenerName(listenerName), m_name(name)
00021 {
00022     /* empty */
00023 }

virtual BaseMsg::~BaseMsg  )  [inline, virtual]
 

Definition at line 17 of file BaseMsg.h.

00017 {}


Member Function Documentation

virtual BaseMsg* BaseMsg::clone  )  const [pure virtual]
 

bool BaseMsg::equalsName const std::string &  name  )  const [inline]
 

Definition at line 22 of file BaseMsg.h.

00023         { return m_name == name; }

const std::string& BaseMsg::getListenerName  )  const [inline]
 

Definition at line 25 of file BaseMsg.h.

00025 { return m_listenerName; }

const std::string& BaseMsg::getMsgName  )  const [inline]
 

Definition at line 24 of file BaseMsg.h.

00024 { return m_name; }

virtual void BaseMsg::sendActual BaseListener listener  )  const [pure virtual]
 

Implemented in IntMsg, SimpleMsg, and StringMsg.

void BaseMsg::sendClone  )  const
 

Send copy of message.

Definition at line 29 of file BaseMsg.cpp.

00030 {
00031     //NOTE: message type must be preserved
00032     MessagerAgent::agent()->forwardNewMsg(clone());
00033 }

std::string BaseMsg::toString  )  const [virtual]
 

Reimplemented in IntMsg, and StringMsg.

Definition at line 36 of file BaseMsg.cpp.

00037 {
00038     std::string result = m_listenerName;
00039     result.append("->" + m_name);
00040     return result;
00041 }


Field Documentation

std::string BaseMsg::m_listenerName [protected]
 

Definition at line 13 of file BaseMsg.h.

std::string BaseMsg::m_name [protected]
 

Definition at line 14 of file BaseMsg.h.


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:54:40 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2