|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLAIAGENT::CAgentScript Class ReferenceClass for managing script agent.
More...
#include <agent_script.h>
Inheritance diagram for NLAIAGENT::CAgentScript
[legend]Collaboration diagram for NLAIAGENT::CAgentScript:
[legend]List of all members.
Public Types |
enum | TMethodNumDef {
TSend,
TSendComponent,
TGetChildTag,
TAddChildTag,
TRemoveChild,
TFather,
TSelf,
TGetName,
TRunAskParentNotify,
TRunTellParentNotify,
TLastM
} |
| This enum define ident for hard coded method that we have to import its under the script. More...
|
enum | TTypeCheck {
CheckAll,
CheckCount,
DoNotCheck
} |
Public Methods |
| CAgentScript (const CAgentScript &) |
| Construct with copy constructor. More...
|
| CAgentScript (IAgentManager *) |
| Build with an knowning manager. More...
|
| CAgentScript (IAgentManager *, IBasicAgent *, std::list<IObjectIA *> &, NLAISCRIPT::CAgentClass *) |
| Build with an knowning manager and a list of static compoment. More...
|
virtual | ~CAgentScript () |
const NLAISCRIPT::CAgentClass* | getClass () |
|
virtual void | addOperator (NLAILOGIC::IBaseOperator *) |
| Method for adding operator. More...
|
virtual void | remOperator (NLAILOGIC::IBaseOperator *p) |
| Removing operator from th agent. More...
|
virtual IObjectIA::CProcessResult | addDynamicAgent (NLAIAGENT::IBaseGroupType *g) |
| Add an agent to the dynamic agent child. More...
|
virtual IObjectIA::CProcessResult | getDynamicAgent (NLAIAGENT::IBaseGroupType *g) |
| Get agent from the dynamic agent child. More...
|
virtual IObjectIA::CProcessResult | getDynamicName (NLAIAGENT::IBaseGroupType *g) |
| Get the instance name of the agent in its manager. More...
|
virtual IObjectIA::CProcessResult | removeDynamic (NLAIAGENT::IBaseGroupType *g) |
| remove an agent from the manager. More...
|
virtual IObjectIA::CProcessResult | runAskParentNotify (IBaseGroupType *) |
| This function process the message CNotifyParentScript for the runAsk. More...
|
virtual IObjectIA::CProcessResult | runTellParentNotify (IBaseGroupType *) |
| This function process the message CNotifyParentScript for the runTell. More...
|
NLAISCRIPT::IOpCode* | getMethode (sint32 inheritance,sint32 index) |
| get the closure correspondent of the method indexed by index in the base class inheritance. More...
|
NLAISCRIPT::IOpCode* | getMethode (sint32 index) |
| get the closure correspondent of the method indexed by index. More...
|
const IAgentManager* | getAgentManager () const |
| Get the manager of the instance. More...
|
const NLAISCRIPT::CAgentClass* | getFactoryClass () const |
| Get the creator of this instance. More...
|
virtual sint32 | getChildMessageIndex (const IMessageBase *, sint32 ) |
| get the mail boxe for scripted message. More...
|
void | setAgentManager (IAgentManager *manager) |
| Set the manager for this instance. More...
|
|
virtual int | getBaseMethodCount () const |
| Return the nomber of internal C++ hard coded method that the class can process. More...
|
virtual const IObjectIA* | getAgentContext () const |
| Get an valid context for this instance. More...
|
|
virtual void | runChildren () |
| Run all child. More...
|
virtual void | onKill (IConnectIA *A) |
| Called by an agent who's destroyed te remove its references. More...
|
virtual void | processMessages () |
| The processMessages method, process the loop/Run message. More...
|
virtual void | processMessages (IMessageBase *,IObjectIA *) |
virtual void | processContinuation (IMessageBase *, IMessageBase *) |
virtual IObjectIA::CProcessResult | runActivity () |
| Mailer do'nt have own activity. More...
|
virtual bool | isEqual (const IBasicObjectIA &a) const |
| Implementation of the isEqual of the IBasicObjectIA. More...
|
virtual bool | haveActivity () const |
| allow to know if the agent have an activity process to run. More...
|
IObjectIA::CProcessResult | sendMethod (IObjectIA *) |
IObjectIA::CProcessResult | sendMethodCompoment (IObjectIA *) |
virtual IObjectIA::CProcessResult | runMethodBase (int heritance, int index,IObjectIA *) |
virtual IObjectIA::CProcessResult | runMethodBase (int index,IObjectIA *) |
virtual sint32 | getStaticMemberSize () const |
| Static member is the component that the agent is create and die with. More...
|
virtual sint32 | getStaticMemberIndex (const IVarName &) const |
| to get the index of a given components name. More...
|
virtual const IObjectIA* | getStaticMember (sint32) const |
| to get the pointer of a given components referened by an index. More...
|
virtual void | setStaticMember (sint32,IObjectIA *) |
| to cahnge a given components given by a string. More...
|
virtual tQueue | getPrivateMember (const IVarName *,const NLAIAGENT::IVarName *,const IObjectIA &) const |
virtual tQueue | isMember (const IVarName *,const NLAIAGENT::IVarName *,const IObjectIA &) const |
| The method isMember(nameSubClass,methodName,param) return the best method correspondent to the search. More...
|
virtual sint32 | isClassInheritedFrom (const NLAIAGENT::IVarName &) const |
| isClassInheritedFrom(className) allow us to known if this class have a base class with the name className. More...
|
virtual sint32 | getMethodIndexSize () const |
| getMethodIndexSize define the nomber of external method. More...
|
virtual IObjectIA::CProcessResult | runMethodeMember (sint32 heritance, sint32 index,IObjectIA *) |
| The methode runMethodeMember(sint32 heritance, sint32 index, IObjectIA *param) allow us to run a member method. More...
|
virtual IObjectIA::CProcessResult | runMethodeMember (sint32 index,IObjectIA *) |
| The methode runMethodeMember(sint32 index,IObjectIA *param) allow us to run a own member method. More...
|
virtual CProcessResult | sendMessage (IObjectIA *) |
| sendMessage allow agent to send a message to an ather agent.The message is a IMessageBase. More...
|
virtual CProcessResult | sendMessage (const IVarName &,IObjectIA *) |
| This method allow to send a message to an compoment given by an string IVarName. More...
|
CProcessResult | sendMessageToDynmaicChild (const IVarName &,IObjectIA *) |
virtual const IObjectIA::CProcessResult& | run () |
| The work of an agent. More...
|
|
virtual void | load (NLMISC::IStream &is) |
| Load the class from a stream. More...
|
virtual void | save (NLMISC::IStream &os) |
| Save the class in a stream. More...
|
virtual const NLAIC::IBasicType* | clone () const |
| This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne. More...
|
virtual const NLAIC::IBasicType* | newInstance () const |
| This function allow a new instance, that mean that the class is a class factory. 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...
|
virtual const NLAIC::CIdentType& | getType () const |
| getType return a unique string how represente the class, it can be the name of the class. More...
|
Static Public Methods |
void | initAgentScript () |
void | releaseAgentScript () |
Static Public Attributes |
CMethodCall** | StaticMethod = NULL |
NLAISCRIPT::COperandSimpleListOr* | msgType = NULL |
NLAISCRIPT::COperandSimpleListOr* | msgPerf = NULL |
NLAISCRIPT::CParam* | SendParamMessageScript = NULL |
NLAISCRIPT::CParam* | SendCompParamMessageScript = NULL |
NLAISCRIPT::COperandSimple* | IdMsgNotifyParentClass = NULL |
NLAISCRIPT::COperandSimpleListOr* | IdMsgNotifyParent = NULL |
NLAISCRIPT::CParam* | ParamRunParentNotify = NULL |
const NLAIC::CIdentType | IdAgentScript |
Protected Attributes |
IObjectIA** | _Components |
| Table of static compoments. More...
|
int | _NbComponents |
| Nomber of static compoment. More...
|
IAgentManager* | _AgentManager |
| The manager where the agent is run this manager have the agent script context. More...
|
tsetDefNameAgent | _DynamicAgentName |
| Map for store agent added in the dynamic child container. More...
|
NLAISCRIPT::CAgentClass* | _AgentClass |
| The creator of this instance. This useful for find scripted method entry point. More...
|
Private Types |
typedef std::multiset<CKeyAgent> | tsetDefNameAgent |
| Type def for the map witch store the name of dynamic agent store in the agent. More...
|
Detailed Description
Class for managing script agent.
-
Author(s):
-
Chafik sameh , Nevrax France
-
Date:
-
2000
Definition at line 63 of file agent_script.h.
Member Typedef Documentation
typedef std::multiset<CKeyAgent> NLAIAGENT::CAgentScript::tsetDefNameAgent [private]
|
|
|
Type def for the map witch store the name of dynamic agent store in the agent.
Definition at line 138 of file agent_script.h. |
Member Enumeration Documentation
enum NLAIAGENT::CAgentScript::TMethodNumDef
|
|
|
This enum define ident for hard coded method that we have to import its under the script.
-
Enumeration values:
-
TSend
|
|
TSendComponent
|
Index of the send method. |
TGetChildTag
|
Index of the send with continuation method. |
TAddChildTag
|
Index of the getChild method. |
TRemoveChild
|
Index of the addChild method. |
TFather
|
Index of the removeDynamic method. |
TSelf
|
Get the father of the agent. |
TGetName
|
Get The self pointer. |
TRunAskParentNotify
|
Get the name of the agent in the manager child list. |
TRunTellParentNotify
|
the offest of the runAskParentNotify method. |
TLastM
|
The count of export method. |
Definition at line 68 of file agent_script.h. |
enum NLAIAGENT::CAgentScript::TTypeCheck
|
|
|
-
Enumeration values:
-
CheckAll
|
|
CheckCount
|
|
DoNotCheck
|
|
Definition at line 88 of file agent_script.h. |
Constructor & Destructor Documentation
NLAIAGENT::CAgentScript::CAgentScript (
|
const CAgentScript & a )
|
|
NLAIAGENT::CAgentScript::CAgentScript (
|
IAgentManager * manager )
|
|
|
Build with an knowning manager and a list of static compoment.
Definition at line 272 of file agent_script.cpp. |
NLAIAGENT::CAgentScript::~CAgentScript (
|
) [virtual]
|
|
Member Function Documentation
const IObjectIA * NLAIAGENT::CAgentScript::getAgentContext (
|
) const [inline, virtual]
|
|
const IAgentManager * NLAIAGENT::CAgentScript::getAgentManager (
|
) const [inline]
|
|
int NLAIAGENT::CAgentScript::getBaseMethodCount (
|
) const [virtual]
|
|
void NLAIAGENT::CAgentScript::getDebugString (
|
char * t ) const [virtual]
|
|
|
Get the instance name of the agent in its manager.
Definition at line 644 of file agent_script.cpp. |
sint32 NLAIAGENT::CAgentScript::getMethodIndexSize (
|
) const [virtual]
|
|
|
get the closure correspondent of the method indexed by index.
Definition at line 392 of file agent_script.cpp. |
|
get the closure correspondent of the method indexed by index in the base class inheritance.
Definition at line 376 of file agent_script.cpp. |
const IObjectIA * NLAIAGENT::CAgentScript::getStaticMember (
|
sint32 index ) const [virtual]
|
|
sint32 NLAIAGENT::CAgentScript::getStaticMemberIndex (
|
const IVarName & name ) const [virtual]
|
|
sint32 NLAIAGENT::CAgentScript::getStaticMemberSize (
|
) const [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 359 of file agent_script.cpp. |
bool NLAIAGENT::CAgentScript::haveActivity (
|
) const [virtual]
|
|
void NLAIAGENT::CAgentScript::initAgentScript (
|
) [static]
|
|
sint32 NLAIAGENT::CAgentScript::isClassInheritedFrom (
|
const IVarName & name ) const [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 1410 of file agent_script.cpp. |
bool NLAIAGENT::CAgentScript::isEqual (
|
const IBasicObjectIA & a ) const [virtual]
|
|
const NLAIC::IBasicType * NLAIAGENT::CAgentScript::newInstance (
|
void ) const [virtual]
|
|
void NLAIAGENT::CAgentScript::onKill (
|
IConnectIA * a ) [virtual]
|
|
void NLAIAGENT::CAgentScript::processMessages (
|
) [virtual]
|
|
void NLAIAGENT::CAgentScript::releaseAgentScript (
|
) [static]
|
|
|
remove an agent from the manager.
The rgument g must store an CStringType. This string is the name of the agent to remove. The methode return the state of the operation, an digital at 1.0 if the remove is done an digital at 0.0 is the method did'nt find the agent.
Definition at line 553 of file agent_script.cpp. |
void NLAIAGENT::CAgentScript::runChildren (
|
) [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 1165 of file agent_script.cpp. |
void NLAIAGENT::CAgentScript::setAgentManager (
|
IAgentManager * manager )
|
|
void NLAIAGENT::CAgentScript::setStaticMember (
|
sint32 index,
|
|
IObjectIA * op ) [virtual]
|
|
Member Data Documentation
|
The creator of this instance. This useful for find scripted method entry point.
Definition at line 159 of file agent_script.h. |
IAgentManager * NLAIAGENT::CAgentScript::_AgentManager [protected]
|
|
|
The manager where the agent is run this manager have the agent script context.
Definition at line 148 of file agent_script.h. |
IObjectIA ** NLAIAGENT::CAgentScript::_Components [protected]
|
|
|
Map for store agent added in the dynamic child container.
Note that if message have a run message for prossing message, this message is achieve in this mail box, else he is achive in the base class mail box.
Definition at line 155 of file agent_script.h. |
int NLAIAGENT::CAgentScript::_NbComponents [protected]
|
|
The documentation for this class was generated from the following files:
|
|