# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLAIAGENT::CLocalAgentMail Class Reference

This class define an agent that it can assume the local communication role of an ather agent. More...

#include <agent_local_mailer.h>

Inheritance diagram for NLAIAGENT::CLocalAgentMail:

NLAIAGENT::IAgent NLAIAGENT::IAgentComposite NLAIAGENT::IBasicAgent NLAIAGENT::IConnectIA NLAIAGENT::IRefrence NLAIAGENT::IObjectIA NLAIAGENT::IBasicObjectIA NLAIC::IBasicInterface NLAIC::IBasicType NLAIC::IPointerGestion NLMISC::IStreamable NLMISC::IClassable List of all members.

Public Methods

 CLocalAgentMail ()
 host agent where we have to establish communication. More...

 CLocalAgentMail (IBasicAgent *host)
virtual ~CLocalAgentMail ()
const IBasicAgentgetHost () const
virtual tQueue isMember (const IVarName *h, const IVarName *m, const IObjectIA &p) const
 The method isMember(nameSubClass,methodName,param) return the best method correspondent to the search. More...

virtual sint32 isClassInheritedFrom (const IVarName &h) const
 isClassInheritedFrom(className) allow us to known if this class have a base class with the name className. More...

virtual CProcessResult runMethodeMember (sint32 h, sint32 m, IObjectIA *p)
 The methode runMethodeMember(sint32 heritance, sint32 index, IObjectIA *param) allow us to run a member method. More...

virtual CProcessResult runMethodeMember (sint32 m, IObjectIA *p)
 The methode runMethodeMember(sint32 index,IObjectIA *param) allow us to run a own member method. More...

virtual tQueue canProcessMessage (const IVarName &m)
 The method canProcessMessage(const IVarName &msgName) allow us to know if agent can preocess given by msgName. More...

IBasicInterface method.
virtual void save (NLMISC::IStream &os)
 Save the class in a stream. More...

virtual void load (NLMISC::IStream &is)
 Load the class from a stream. More...

virtual const NLAIC::CIdentTypegetType () const
 getType return a unique string how represente the class, it can be the name of the class. More...

virtual const NLAIC::IBasicTypenewInstance () const
 This function allow a new instance, that mean that the class is a class factory. More...

virtual const NLAIC::IBasicTypeclone () const
 This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne. More...

virtual void getDebugString (std::string &t) const
 This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user. More...

IObjectIA method.
virtual const CProcessResult & run ()
 Have no run to do. More...

virtual sint32 getStaticMemberSize () const
 Member are th host member attribut. More...

virtual sint32 getStaticMemberIndex (const IVarName &m) const
 to get the index of a given components name. More...

virtual const IObjectIAgetStaticMember (sint32 i) const
 to get the pointer of a given components referened by an index. More...

virtual bool setStaticMember (sint32 i, IObjectIA *o)
 to cahnge a given components given by a string. More...

virtual sint32 getMethodIndexSize () const
 getMethodIndexSize define the nomber of method define in the class. More...

IBasicObjectIA method.
virtual bool isEqual (const IBasicObjectIA &a) const
 Implementation of the isEqual of the IBasicObjectIA. More...

IBasicAgent method.
virtual void onKill (IConnectIA *a)
 Called by an agent who's destroyed te remove its references. More...

virtual std::list< IBasicAgent
* >::iterator 
addChild (IBasicAgent *p)
 Add a child to the agent. More...

virtual void removeChild (const IBasicAgent *p)
 Remove a child from the std::list<IBasicAgent *> child list. More...

virtual void removeChild (std::list< IBasicAgent * >::iterator &iter)
 Remove a child from the std::list<IBasicAgent *> child list. More...

virtual void runChildren ()
 Run all child. More...

virtual void processMessages ()
 The processMessages method, process the loop/Run message. More...

virtual IObjectIA::CProcessResult sendMessage (IObjectIA *msg)
 sendMessage allow agent to send a message to an ather agent.The message is a IMessageBase. More...

virtual IObjectIA::CProcessResult runActivity ()
 Mailer do'nt have own activity. More...

virtual bool haveActivity () const
 allow to know if the agent have an activity process to run. More...


Static Public Attributes

const NLAIC::CIdentType LocalAgentMail

Private Attributes

IBasicAgent_HostAgent

Detailed Description

This class define an agent that it can assume the local communication role of an ather agent.

This agent can be considered as an mail box agent.

Author:
Chafik sameh , Nevrax France
Date:
2000

Definition at line 40 of file agent_local_mailer.h.


Constructor & Destructor Documentation

NLAIAGENT::CLocalAgentMail::CLocalAgentMail   [inline]
 

host agent where we have to establish communication.

Definition at line 49 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IAgent::IAgent.

Referenced by clone, isEqual, newInstance, and sendMessage.

NLAIAGENT::CLocalAgentMail::CLocalAgentMail IBasicAgent   host
 

Definition at line 31 of file agent_local_mailer.cpp.

References _HostAgent, and NLAIAGENT::IConnectIA::connect.

NLAIAGENT::CLocalAgentMail::~CLocalAgentMail   [virtual]
 

Definition at line 38 of file agent_local_mailer.cpp.


Member Function Documentation

virtual std::list<IBasicAgent *>::iterator NLAIAGENT::CLocalAgentMail::addChild IBasicAgent   p [inline, virtual]
 

Add a child to the agent.

Child is added in a std::list<IBasicAgent *>. The method return the range of the child in the list.

Reimplemented from NLAIAGENT::IAgentComposite.

Definition at line 186 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IBasicAgent::IBasicAgent.

virtual tQueue NLAIAGENT::CLocalAgentMail::canProcessMessage const IVarName   m [inline, virtual]
 

The method canProcessMessage(const IVarName &msgName) allow us to know if agent can preocess given by msgName.

tQueue contain the liste of method (same as a run(msg)) that coud process the msg.

Reimplemented from NLAIAGENT::IObjectIA.

Definition at line 160 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::tQueue.

virtual const NLAIC::IBasicType* NLAIAGENT::CLocalAgentMail::clone   const [inline, virtual]
 

This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 93 of file agent_local_mailer.h.

References _HostAgent, CLocalAgentMail, and x.

virtual void NLAIAGENT::CLocalAgentMail::getDebugString std::string &    t const [inline, virtual]
 

This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 100 of file agent_local_mailer.h.

References _HostAgent, NLAIC::stringGetBuild, and t.

const IBasicAgent* NLAIAGENT::CLocalAgentMail::getHost   const [inline]
 

Definition at line 55 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IBasicAgent::IBasicAgent.

virtual sint32 NLAIAGENT::CLocalAgentMail::getMethodIndexSize   const [inline, virtual]
 

getMethodIndexSize define the nomber of method define in the class.

Reimplemented from NLAIAGENT::IBasicAgent.

Definition at line 137 of file agent_local_mailer.h.

References _HostAgent.

virtual const IObjectIA* NLAIAGENT::CLocalAgentMail::getStaticMember sint32    i const [inline, virtual]
 

to get the pointer of a given components referened by an index.

Reimplemented from NLAIAGENT::IObjectIA.

Definition at line 127 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IObjectIA::IObjectIA.

virtual sint32 NLAIAGENT::CLocalAgentMail::getStaticMemberIndex const IVarName   m const [inline, virtual]
 

to get the index of a given components name.

Reimplemented from NLAIAGENT::IObjectIA.

Definition at line 122 of file agent_local_mailer.h.

References _HostAgent.

virtual sint32 NLAIAGENT::CLocalAgentMail::getStaticMemberSize   const [inline, virtual]
 

Member are th host member attribut.

Reimplemented from NLAIAGENT::IObjectIA.

Definition at line 117 of file agent_local_mailer.h.

References _HostAgent.

virtual const NLAIC::CIdentType& NLAIAGENT::CLocalAgentMail::getType   const [inline, virtual]
 

getType return a unique string how represente the class, it can be the name of the class.

This function is used for the sytem regstry class (see the definition of the template class Gen::CRegistry).

Reimplemented from NLAIAGENT::IAgent.

Definition at line 81 of file agent_local_mailer.h.

virtual bool NLAIAGENT::CLocalAgentMail::haveActivity   const [inline, virtual]
 

allow to know if the agent have an activity process to run.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 210 of file agent_local_mailer.h.

virtual sint32 NLAIAGENT::CLocalAgentMail::isClassInheritedFrom const IVarName   h const [inline, virtual]
 

isClassInheritedFrom(className) allow us to known if this class have a base class with the name className.

If true the method return the range of the base class, this range is an arbitrary reference id define by the programmer or bay the scrypt. the false return is define by -1.

Reimplemented from NLAIAGENT::IObjectIA.

Definition at line 145 of file agent_local_mailer.h.

References _HostAgent.

virtual bool NLAIAGENT::CLocalAgentMail::isEqual const IBasicObjectIA   a const [inline, virtual]
 

Implementation of the isEqual of the IBasicObjectIA.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 169 of file agent_local_mailer.h.

References _HostAgent, CLocalAgentMail, NLAIAGENT::IBasicObjectIA::IBasicObjectIA, and NLAISCRIPT::l.

tQueue NLAIAGENT::CLocalAgentMail::isMember const IVarName   h,
const IVarName   m,
const IObjectIA   p
const [virtual]
 

The method isMember(nameSubClass,methodName,param) return the best method correspondent to the search.

remember we use the overloadind method.

NameSubClass: if this pointer is not NULL then NameSubClass is the name of the base class were the method are defined.

methodName: is the name of the class.

param: is an IObjectIA where it defined the parametre of the method. lot of method use a IObjectIA vector object with an NLAIC::CIdentType as the the template argm.

Reimplemented from NLAIAGENT::IBasicAgent.

Definition at line 73 of file agent_local_mailer.cpp.

References _HostAgent, NLAIAGENT::IObjectIA::isMember, and NLAIAGENT::tQueue.

virtual void NLAIAGENT::CLocalAgentMail::load NLMISC::IStream   is [inline, virtual]
 

Load the class from a stream.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 69 of file agent_local_mailer.h.

References _HostAgent, NLAIC::CIdentTypeAlloc::allocClass, NLAIAGENT::IBasicAgent::IBasicAgent, id, NLAIAGENT::IRefrence::IRefrence, and num.

virtual const NLAIC::IBasicType* NLAIAGENT::CLocalAgentMail::newInstance   const [inline, virtual]
 

This function allow a new instance, that mean that the class is a class factory.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 86 of file agent_local_mailer.h.

References _HostAgent, CLocalAgentMail, and x.

void NLAIAGENT::CLocalAgentMail::onKill IConnectIA   a [virtual]
 

Called by an agent who's destroyed te remove its references.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 58 of file agent_local_mailer.cpp.

References _HostAgent, and NLAIC::IPointerGestion::release.

void NLAIAGENT::CLocalAgentMail::processMessages   [virtual]
 

The processMessages method, process the loop/Run message.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 55 of file agent_local_mailer.cpp.

virtual void NLAIAGENT::CLocalAgentMail::removeChild std::list< IBasicAgent * >::iterator &    iter [inline, virtual]
 

Remove a child from the std::list<IBasicAgent *> child list.

Reimplemented from NLAIAGENT::IAgentComposite.

Definition at line 195 of file agent_local_mailer.h.

References _HostAgent.

virtual void NLAIAGENT::CLocalAgentMail::removeChild const IBasicAgent   p [inline, virtual]
 

Remove a child from the std::list<IBasicAgent *> child list.

Reimplemented from NLAIAGENT::IAgentComposite.

Definition at line 190 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IBasicAgent::IBasicAgent.

virtual const CProcessResult& NLAIAGENT::CLocalAgentMail::run void    [inline, virtual]
 

Have no run to do.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 110 of file agent_local_mailer.h.

virtual IObjectIA::CProcessResult NLAIAGENT::CLocalAgentMail::runActivity   [inline, virtual]
 

Mailer do'nt have own activity.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 206 of file agent_local_mailer.h.

References NLAIAGENT::IObjectIA::ProcessRun.

void NLAIAGENT::CLocalAgentMail::runChildren   [virtual]
 

Run all child.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 51 of file agent_local_mailer.cpp.

virtual CProcessResult NLAIAGENT::CLocalAgentMail::runMethodeMember sint32    m,
IObjectIA   p
[inline, virtual]
 

The methode runMethodeMember(sint32 index,IObjectIA *param) allow us to run a own member method.

index: is the method id return by the isMember(const IVarName *,const IVarName *,const IObjectIA &) const method. param: is the parametre for the method.

Reimplemented from NLAIAGENT::IBasicAgent.

Definition at line 155 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IObjectIA::IObjectIA.

virtual CProcessResult NLAIAGENT::CLocalAgentMail::runMethodeMember sint32    h,
sint32    m,
IObjectIA   p
[inline, virtual]
 

The methode runMethodeMember(sint32 heritance, sint32 index, IObjectIA *param) allow us to run a member method.

heritance: is the id returned by the methodisClassInheritedFrom(const IVarName &). index: is the method id return by the isMember(const IVarName *,const IVarName *,const IObjectIA &) const method. param: is the parametre for the method.

Reimplemented from NLAIAGENT::IBasicAgent.

Definition at line 150 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IObjectIA::IObjectIA.

virtual void NLAIAGENT::CLocalAgentMail::save NLMISC::IStream   os [inline, virtual]
 

Save the class in a stream.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 62 of file agent_local_mailer.h.

References _HostAgent, NLAIAGENT::IConnectIA::IConnectIA, r, and NLMISC::IStream::serial.

IObjectIA::CProcessResult NLAIAGENT::CLocalAgentMail::sendMessage IObjectIA   m [virtual]
 

sendMessage allow agent to send a message to an ather agent.The message is a IMessageBase.

Reimplemented from NLAIAGENT::IConnectIA.

Definition at line 87 of file agent_local_mailer.cpp.

References _HostAgent, CLocalAgentMail, NLAISCRIPT::CMsgNotifyParentClass::IdMsgNotifyParentClass, NLAIAGENT::IObjectIA::IObjectIA, and NLAIAGENT::IConnectIA::setParent.

virtual bool NLAIAGENT::CLocalAgentMail::setStaticMember sint32    i,
IObjectIA   o
[inline, virtual]
 

to cahnge a given components given by a string.

Reimplemented from NLAIAGENT::IObjectIA.

Definition at line 132 of file agent_local_mailer.h.

References _HostAgent, and NLAIAGENT::IObjectIA::IObjectIA.


Member Data Documentation

IBasicAgent* NLAIAGENT::CLocalAgentMail::_HostAgent [private]
 

Definition at line 46 of file agent_local_mailer.h.

Referenced by addChild, canProcessMessage, CLocalAgentMail, clone, getDebugString, getHost, getMethodIndexSize, getStaticMember, getStaticMemberIndex, getStaticMemberSize, isClassInheritedFrom, isEqual, isMember, load, newInstance, onKill, removeChild, runMethodeMember, save, sendMessage, and setStaticMember.

const NLAIC::CIdentType CLocalAgentMail::LocalAgentMail [static]
 

Initial value:

Definition at line 529 of file static_def_init.cpp.


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