# 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

Inheritance graph
[legend]
Collaboration diagram for NLAIAGENT::CLocalAgentMail:

Collaboration graph
[legend]
List of all members.

Public Methods

 CLocalAgentMail ()
 CLocalAgentMail (IBasicAgent *host)
virtual ~CLocalAgentMail ()
const IBasicAgentgetHost () const
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 (char *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 ()
 The work of an agent. More...

virtual sint32 getStaticMemberSize () const
 Static member is the component that the agent is create and die with. 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 void setStaticMember (sint32 i,IObjectIA *o)
 to cahnge a given components given by a string. More...

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

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...

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(s):
Chafik sameh , Nevrax France
Date:
2000

Definition at line 40 of file agent_local_mailer.h.


Constructor & Destructor Documentation

NLAIAGENT::CLocalAgentMail::CLocalAgentMail ( ) [inline]
 

Definition at line 49 of file agent_local_mailer.h.

NLAIAGENT::CLocalAgentMail::CLocalAgentMail ( IBasicAgent * host )
 

Definition at line 31 of file agent_local_mailer.cpp.

NLAIAGENT::CLocalAgentMail::~CLocalAgentMail ( ) [virtual]
 

Definition at line 38 of file agent_local_mailer.cpp.


Member Function Documentation

std::list< IBasicAgent *>::iterator NLAIAGENT::CLocalAgentMail::addChild<IBasicAgent *> ( 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 181 of file agent_local_mailer.h.

tQueue NLAIAGENT::CLocalAgentMail::canProcessMessage ( const IVarName & msgName ) [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 156 of file agent_local_mailer.h.

const NLAIC::IBasicType * NLAIAGENT::CLocalAgentMail::clone ( void ) 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.

void NLAIAGENT::CLocalAgentMail::getDebugString ( char * 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.

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

Definition at line 55 of file agent_local_mailer.h.

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

getMethodIndexSize define the nomber of external method.

Reimplemented from NLAIAGENT::IBasicAgent.

Definition at line 134 of file agent_local_mailer.h.

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 124 of file agent_local_mailer.h.

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 119 of file agent_local_mailer.h.

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

Static member is the component that the agent is create and die with.

getStaticMemberSize to get the size of the static member components

Reimplemented from NLAIAGENT::IObjectIA.

Definition at line 114 of file agent_local_mailer.h.

const NLAIC::CIdentType & NLAIAGENT::CLocalAgentMail::getType ( void ) 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.

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 205 of file agent_local_mailer.h.

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 141 of file agent_local_mailer.h.

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

Implementation of the isEqual of the IBasicObjectIA.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 164 of file agent_local_mailer.h.

tQueue NLAIAGENT::CLocalAgentMail::isMember ( const IVarName * className,
const IVarName * name,
const IObjectIA & param ) 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 65 of file agent_local_mailer.cpp.

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.

const NLAIC::IBasicType * NLAIAGENT::CLocalAgentMail::newInstance ( void ) 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.

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.

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.

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 190 of file agent_local_mailer.h.

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 185 of file agent_local_mailer.h.

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

The work of an agent.

Typically agent process child message, process its message and run its activity.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 109 of file agent_local_mailer.h.

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

Mailer do'nt have own activity.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 201 of file agent_local_mailer.h.

void NLAIAGENT::CLocalAgentMail::runChildren ( ) [virtual]
 

Run all child.

Reimplemented from NLAIAGENT::IAgent.

Definition at line 51 of file agent_local_mailer.cpp.

CProcessResult NLAIAGENT::CLocalAgentMail::runMethodeMember ( sint32 index,
IObjectIA * param ) [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 151 of file agent_local_mailer.h.

CProcessResult NLAIAGENT::CLocalAgentMail::runMethodeMember ( sint32 heritance,
sint32 index,
IObjectIA * param ) [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 146 of file agent_local_mailer.h.

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.

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 79 of file agent_local_mailer.cpp.

void 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 129 of file agent_local_mailer.h.


Member Data Documentation

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

Initializer:

NLAIC::CIdentType( "LocalAgentMail", 
                NLAIC::CSelfClassFactory((const NLAIC::IBasicInterface &)CLocalAgentMail((IBasicAgent *)&staticAgent)), 
                NLAIC::CTypeOfObject::tAgent,
                NLAIC::CTypeOfOperator(NLAIC::CTypeOfOperator::opNone) )

Definition at line 420 of file static_def_init.cpp.

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

Definition at line 46 of file agent_local_mailer.h.


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