|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLAIAGENT::IBasicAgent Class ReferenceBase class for an agent.Basicly an agent is an IConnectIA that we can communicate with it and an basic agent can assume the operation of an children.
More...
#include <agent.h>
Inheritance diagram for NLAIAGENT::IBasicAgent:
List of all members.
Public Methods |
| IBasicAgent (const IWordNumRef *parent) |
| Contruct agent with an parent. More...
|
| IBasicAgent (const IWordNumRef *parent, IMailBox *m) |
| Contruct agent with an parent and an mail box. More...
|
virtual | ~IBasicAgent () |
virtual const CProcessResult & | getState () const |
| Get the curent state of the agent. More...
|
virtual void | setState (TProcessStatement s, IObjectIA *result) |
| Set the state of an agent. More...
|
virtual IObjectIA::CProcessResult | sendMessage (IMessageBase *msg) |
| Send a message to the agent. More...
|
virtual IObjectIA::CProcessResult | sendMessage (IMessageBase *msg, IBasicAgent &receiver) |
| Send message to an receiver agent. More...
|
virtual IObjectIA::CProcessResult | runActivity ()=0 |
| Run the activity process an agent. More...
|
virtual bool | haveActivity () const=0 |
| allow to know if the agent have an activity process to run. More...
|
IMailBox * | getMail () const |
| Get the mail box letter. More...
|
virtual std::list< IBasicAgent
* >::iterator | addChild (IBasicAgent *p)=0 |
| Add a child to the agent. More...
|
virtual void | removeChild (const IBasicAgent *p)=0 |
| Remove a child from the std::list<IBasicAgent *> child list. More...
|
virtual void | removeChild (std::list< IBasicAgent * >::iterator &iter)=0 |
| Remove a child from the std::list<IBasicAgent *> child list. More...
|
virtual void | runChildren ()=0 |
| Run all child. More...
|
virtual void | processMessages ()=0 |
| The processMessages method, process the loop/Run message. More...
|
virtual const CProcessResult & | run ()=0 |
| The work of an agent. More...
|
|
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 sint32 | getMethodIndexSize () const |
| getMethodIndexSize define the nomber of method define in the class. More...
|
virtual tQueue | isMember (const IVarName *, const IVarName *, const IObjectIA &) const |
| The method isMember(nameSubClass,methodName,param) return the best method correspondent to the search. More...
|
virtual CProcessResult | runMethodeMember (sint32, sint32, IObjectIA *) |
| The methode runMethodeMember(sint32 heritance, sint32 index, IObjectIA *param) allow us to run a member method. More...
|
virtual CProcessResult | runMethodeMember (sint32 index, IObjectIA *) |
| The methode runMethodeMember(sint32 index,IObjectIA *param) allow us to run a own member method. More...
|
Protected Methods |
| IBasicAgent (const IBasicAgent &a) |
| Copy constructor we protect it because agent need an unique ident, and we don't wont to give this possibility to all programmer because it is dangerous. More...
|
virtual IObjectIA * | run (const IMessageBase &m) |
| Run message is the message processing. More...
|
virtual IMessageBase * | runExec (const IMessageBase &m) |
| RunExec is to processing reltative to PExec Performatif. More...
|
virtual IMessageBase * | runEven (const IMessageBase &m) |
| RunExec is to processing reltative to PExec Performatif. More...
|
virtual IMessageBase * | runAchieve (const IMessageBase &m) |
| runAchieve ist to processing reltative to PAchieve Performatif. More...
|
virtual IMessageBase * | runAsk (const IMessageBase &m) |
| runAsk is to processing reltative to PAsk Performatif. More...
|
virtual IMessageBase * | runTell (const IMessageBase &m) |
| runTell is to processing reltative to PTell Performatif. More...
|
virtual IMessageBase * | runBreak (const IMessageBase &m) |
| runBreak is to processing reltative to PBreak Performatif. More...
|
virtual void | onKill (IConnectIA *A) |
| Called by an agent who's destroyed te remove its references. More...
|
virtual IMessageBase * | runKill (const IMessageBase &m) |
| runKill is to processing reltative to PKill Performatif. More...
|
virtual IMessageBase * | runError (const IMessageBase &m) |
| runError is to processing reltative to PError Performatif. More...
|
virtual IMessageBase * | runService (const IMessageBase &m) |
| runService is to processing reltative to PService Performatif. More...
|
Protected Attributes |
CProcessResult | _RunState |
| Internal state of the agent. More...
|
IMailBox * | _Mail |
| Box letter for communication service. More...
|
Static Private Attributes |
CMethodCall | _Method [] |
Detailed Description
Base class for an agent.Basicly an agent is an IConnectIA that we can communicate with it and an basic agent can assume the operation of an children.
-
Author:
-
Chafik sameh , Portier Pierre , Nevrax France
-
Date:
-
2000
Definition at line 45 of file agent.h.
Constructor & Destructor Documentation
NLAIAGENT::IBasicAgent::IBasicAgent |
( |
const IBasicAgent & |
a |
) |
[protected] |
|
|
Copy constructor we protect it because agent need an unique ident, and we don't wont to give this possibility to all programmer because it is dangerous.
Definition at line 288 of file agents.cpp.
References _Mail.
Referenced by NLAIAGENT::IAgentComposite::addChild, NLAIAGENT::CLocalAgentMail::addChild, NLAIAGENT::CMainAgentScript::addDynamicAgent, NLAIAGENT::CAgentScript::addDynamicAgent, NLAIAGENT::COperatorScript::checkTrigMsg, NLAIAGENT::IAgentComposite::cpyChild, NLAIAGENT::IAgentComposite::deleteListe, NLAIAGENT::CLocalAgentMail::getHost, NLAIAGENT::IAgentComposite::IAgentComposite, NLAIAGENT::IAgentManager::IAgentManager, NLAIAGENT::IAgentComposite::load, NLAIAGENT::CLocalAgentMail::load, NLAIAGENT::IAgent::newInstance, NLAIAGENT::IAgent::onKill, NLAIAGENT::IAgentComposite::removeChild, NLAIAGENT::CLocalAgentMail::removeChild, NLAIAGENT::COperatorScript::run, runAsk, NLAIAGENT::CAgentScript::runAskParentNotify, NLAIAGENT::IAgent::runChildrenStepByStep, NLAIAGENT::CActorScript::runMethodBase, runMethodeMember, and NLAIAGENT::IAgentComposite::save. |
NLAIAGENT::IBasicAgent::IBasicAgent |
( |
const IWordNumRef * |
parent |
) |
|
|
|
Contruct agent with an parent and an mail box.
Definition at line 300 of file agents.cpp.
References _Mail. |
NLAIAGENT::IBasicAgent::~IBasicAgent |
( |
|
) |
[virtual] |
|
Member Function Documentation
virtual std::list<IBasicAgent *>::iterator NLAIAGENT::IBasicAgent::addChild |
( |
IBasicAgent * |
p |
) |
[pure virtual] |
|
IMailBox * NLAIAGENT::IBasicAgent::getMail |
( |
|
) |
const |
|
sint32 NLAIAGENT::IBasicAgent::getMethodIndexSize |
( |
|
) |
const [virtual] |
|
virtual bool NLAIAGENT::IBasicAgent::haveActivity |
( |
|
) |
const [pure virtual] |
|
|
allow to know if the agent have an activity process to run.
Implemented in NLAIAGENT::IAgent. |
void NLAIAGENT::IBasicAgent::onKill |
( |
IConnectIA * |
A |
) |
[protected, virtual] |
|
virtual void NLAIAGENT::IBasicAgent::processMessages |
( |
|
) |
[pure virtual] |
|
|
The processMessages method, process the loop/Run message.
Implemented in NLAIAGENT::CActor. |
virtual void NLAIAGENT::IBasicAgent::removeChild |
( |
std::list< IBasicAgent * >::iterator & |
iter |
) |
[pure virtual] |
|
virtual void NLAIAGENT::IBasicAgent::removeChild |
( |
const IBasicAgent * |
p |
) |
[pure virtual] |
|
virtual const CProcessResult& NLAIAGENT::IBasicAgent::run |
( |
|
) |
[pure virtual] |
|
virtual void NLAIAGENT::IBasicAgent::runChildren |
( |
|
) |
[pure 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::IObjectIA.
Reimplemented in NLAIAGENT::CActor.
Definition at line 497 of file agents.cpp.
References NLAIAGENT::_Father, NLAIAGENT::_GetMailer, NLAIAGENT::_GetNumId, NLAIAGENT::_RunAsk, NLAIAGENT::_RunTel, NLAIAGENT::IConnectIA::getParent, IBasicAgent, index, NLAIAGENT::IRefrence::IRefrence, param, run, and t. |
|
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::IObjectIA.
Reimplemented in NLAIAGENT::CLocalAgentMail.
Definition at line 492 of file agents.cpp.
References index. |
|
Send message to an receiver agent.
Definition at line 328 of file agents.cpp. |
Member Data Documentation
IMailBox* NLAIAGENT::IBasicAgent::_Mail [protected]
|
|
|
Initial value:
{
IBasicAgent::CMethodCall(_MAILER_,_GetMailer),
IBasicAgent::CMethodCall(_FATHER_,_Father),
IBasicAgent::CMethodCall(_RUNTEL_,_RunTel),
IBasicAgent::CMethodCall(_RUNASK_,_RunAsk),
IBasicAgent::CMethodCall(_GETNUMID_,_GetNumId)
}
Definition at line 440 of file agents.cpp. |
CProcessResult NLAIAGENT::IBasicAgent::_RunState [protected]
|
|
The documentation for this class was generated from the following files:
|
|