From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNLAIAGENT_1_1CActor.html | 1159 ++++++++++++++++++++++++ 1 file changed, 1159 insertions(+) create mode 100644 docs/doxygen/nel/classNLAIAGENT_1_1CActor.html (limited to 'docs/doxygen/nel/classNLAIAGENT_1_1CActor.html') diff --git a/docs/doxygen/nel/classNLAIAGENT_1_1CActor.html b/docs/doxygen/nel/classNLAIAGENT_1_1CActor.html new file mode 100644 index 00000000..ba05c5b5 --- /dev/null +++ b/docs/doxygen/nel/classNLAIAGENT_1_1CActor.html @@ -0,0 +1,1159 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# 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::CActor Class Reference

Class Actor You can think of activation as a set of tokens passed between actors. +More... +

+#include <actor.h> +

+

Inheritance diagram for NLAIAGENT::CActor: +

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

Base class member method.

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 const NLAIC::IBasicTypenewInstance () const
 This function allow a new instance, that mean that the class is a class factory. 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...

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

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

virtual const CProcessResult & run ()
 The work of an agent. 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 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 tQueue isMember (const NLAIAGENT::IVarName *, const NLAIAGENT::IVarName *, const IObjectIA &) const
virtual IObjectIA::CProcessResult runMethodeMember (sint32, IObjectIA *)
 The methode runMethodeMember(sint32 index,IObjectIA *param) allow us to run a own member method. More...

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

const NLAIC::CIdentType IdActor

Public Methods

 CActor ()
 Default constructor. More...

 CActor (IAgent *, bool activated=false)
 Builds and actor with its father. More...

 CActor (const CActor &)
 copy constructor. More...

 ~CActor ()
bool isActivated ()
 Returns true if the actor has a token. More...

void addTransition (NLAILOGIC::IBaseCond *, std::vector< CActor * > &, bool)
 Adds a transition, ie a condition and a list of newly activated agents. More...

void activate ()
 Activates the actor. More...

virtual void onActivate ()
 Callback called at the activation of the actor. More...

void unActivate ()
 Unactivates the actor. More...

virtual void onUnActivate ()
 Callback called when the agent is unactivated. More...


Protected Types

enum  c_funcs_id { fid_activate, +fid_unActivate, +fid_forwardActivity + }

Protected Methods

virtual void forwardActivity (CActor *, bool stay_active=false)
 Transfers activity to another actor. More...

virtual void forwardActivity (std::vector< CActor * > &, bool stay_active=false)
 Transfers activity to another actor. More...


Protected Attributes

bool _IsActivated
+

Detailed Description

+Class Actor You can think of activation as a set of tokens passed between actors. +

+The number of tokens isn't fixed, which means one transition can activate more than one actor. An actor has a list of conditions under which he's going to pass activation to other actors. A simple state machine is a particular case in which there's always only one token for all actors. If a run() is defined, the actor becomes an active agent with an activity at each cycle. +

+ +

+Definition at line 46 of file actor.h.


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NLAIAGENT::CActor::c_funcs_id [protected] +
+
+ + + + + +
+   + + +

+

+Enumeration values:
+ + + + +
fid_activate  +
fid_unActivate  +
fid_forwardActivity  +
+
+ +

+Definition at line 50 of file actor.h.

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NLAIAGENT::CActor::CActor  
+
+ + + + + +
+   + + +

+Default constructor. +

+ +

+Definition at line 8 of file actor.cpp. +

+Referenced by clone, newInstance, and runMethodeMember.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
NLAIAGENT::CActor::CActor IAgent ,
bool   activated = false
+
+ + + + + +
+   + + +

+Builds and actor with its father. +

+ +

+Definition at line 13 of file actor.cpp. +

+References _IsActivated.

+

+ + + + +
+ + + + + + + + + + +
NLAIAGENT::CActor::CActor const CActor &  
+
+ + + + + +
+   + + +

+copy constructor. +

+ +

+Definition at line 19 of file actor.cpp. +

+References _IsActivated.

+

+ + + + +
+ + + + + + + + + +
NLAIAGENT::CActor::~CActor  
+
+ + + + + +
+   + + +

+ +

+Definition at line 24 of file actor.cpp.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
void NLAIAGENT::CActor::activate  
+
+ + + + + +
+   + + +

+Activates the actor. +

+ +

+Definition at line 37 of file actor.cpp. +

+References _IsActivated, and onActivate. +

+Referenced by runMethodeMember.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NLAIAGENT::CActor::addTransition NLAILOGIC::IBaseCond ,
std::vector< CActor * > &  ,
bool  
+
+ + + + + +
+   + + +

+Adds a transition, ie a condition and a list of newly activated agents. +

+ +

+Definition at line 84 of file actor.cpp.

+

+ + + + +
+ + + + + + + + + +
const NLAIC::IBasicType * NLAIAGENT::CActor::clone   const [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 105 of file actor.cpp. +

+References CActor.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NLAIAGENT::CActor::forwardActivity std::vector< CActor * > &  ,
bool   stay_active = false
[protected, virtual]
+
+ + + + + +
+   + + +

+Transfers activity to another actor. +

+The second arg bool must be set to true for this agent to stay active, false otherwise. +

+Definition at line 70 of file actor.cpp. +

+References unActivate.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NLAIAGENT::CActor::forwardActivity CActor *  ,
bool   stay_active = false
[protected, virtual]
+
+ + + + + +
+   + + +

+Transfers activity to another actor. +

+The second arg bool must be set to true for this agent to stay active, false otherwise. +

+Definition at line 59 of file actor.cpp. +

+References unActivate. +

+Referenced by runMethodeMember.

+

+ + + + +
+ + + + + + + + + + +
void NLAIAGENT::CActor::getDebugString std::string &   t const [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 121 of file actor.cpp. +

+References t. +

+Referenced by runMethodeMember.

+

+ + + + +
+ + + + + + + + + +
sint32 NLAIAGENT::CActor::getMethodIndexSize   const [virtual]
+
+ + + + + +
+   + + +

+getMethodIndexSize define the nomber of method define in the class. +

+ +

+Reimplemented from NLAIAGENT::IBasicAgent. +

+Definition at line 263 of file actor.cpp.

+

+ + + + +
+ + + + + + + + + +
const NLAIC::CIdentType & NLAIAGENT::CActor::getType   const [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 162 of file actor.cpp. +

+References IdActor.

+

+ + + + +
+ + + + + + + + + +
bool NLAIAGENT::CActor::isActivated  
+
+ + + + + +
+   + + +

+Returns true if the actor has a token. +

+ +

+Definition at line 31 of file actor.cpp. +

+References _IsActivated.

+

+ + + + +
+ + + + + + + + + + +
bool NLAIAGENT::CActor::isEqual const IBasicObjectIA  a const [virtual]
+
+ + + + + +
+   + + +

+Implementation of the isEqual of the IBasicObjectIA. +

+ +

+Reimplemented from NLAIAGENT::IAgent. +

+Definition at line 130 of file actor.cpp.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
tQueue NLAIAGENT::CActor::isMember const NLAIAGENT::IVarName ,
const NLAIAGENT::IVarName ,
const IObjectIA 
const [virtual]
+
+ + + + + +
+   + + +

+ +

+Definition at line 179 of file actor.cpp. +

+References fid_activate, fid_forwardActivity, fid_unActivate, param, NLAIAGENT::tQueue, and NLAIC::CIdentType::VoidType.

+

+ + + + +
+ + + + + + + + + + +
void NLAIAGENT::CActor::load NLMISC::IStream  is [virtual]
+
+ + + + + +
+   + + +

+Load the class from a stream. +

+ +

+Reimplemented from NLAIAGENT::IAgent. +

+Definition at line 174 of file actor.cpp.

+

+ + + + +
+ + + + + + + + + +
const NLAIC::IBasicType * NLAIAGENT::CActor::newInstance   const [virtual]
+
+ + + + + +
+   + + +

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

+ +

+Reimplemented from NLAIAGENT::IAgent. +

+Definition at line 111 of file actor.cpp. +

+References CActor, NLAIAGENT::IConnectIA::getParent, and NLAIAGENT::IAgent::IAgent.

+

+ + + + +
+ + + + + + + + + +
void NLAIAGENT::CActor::onActivate   [virtual]
+
+ + + + + +
+   + + +

+Callback called at the activation of the actor. +

+ +

+Definition at line 95 of file actor.cpp. +

+Referenced by activate.

+

+ + + + +
+ + + + + + + + + +
void NLAIAGENT::CActor::onUnActivate   [virtual]
+
+ + + + + +
+   + + +

+Callback called when the agent is unactivated. +

+ +

+Definition at line 100 of file actor.cpp. +

+Referenced by unActivate.

+

+ + + + +
+ + + + + + + + + +
void NLAIAGENT::CActor::processMessages   [virtual]
+
+ + + + + +
+   + + +

+The processMessages method, process the loop/Run message. +

+ +

+Reimplemented from NLAIAGENT::IAgent. +

+Definition at line 135 of file actor.cpp.

+

+ + + + +
+ + + + + + + + + +
const IObjectIA::CProcessResult & NLAIAGENT::CActor::run   [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 146 of file actor.cpp.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
IObjectIA::CProcessResult NLAIAGENT::CActor::runMethodeMember sint32  ,
IObjectIA 
[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 212 of file actor.cpp. +

+References activate, CActor, fid_activate, fid_forwardActivity, fid_unActivate, forwardActivity, getDebugString, id, params, r, and unActivate.

+

+ + + + +
+ + + + + + + + + + +
void NLAIAGENT::CActor::save NLMISC::IStream  os [virtual]
+
+ + + + + +
+   + + +

+Save the class in a stream. +

+ +

+Reimplemented from NLAIAGENT::IAgent. +

+Definition at line 167 of file actor.cpp. +

+References _IsActivated, and NLMISC::IStream::serial.

+

+ + + + +
+ + + + + + + + + +
void NLAIAGENT::CActor::unActivate  
+
+ + + + + +
+   + + +

+Unactivates the actor. +

+ +

+Definition at line 47 of file actor.cpp. +

+References _IsActivated, and onUnActivate. +

+Referenced by forwardActivity, and runMethodeMember.

+


Member Data Documentation

+

+ + + + +
+ + +
bool NLAIAGENT::CActor::_IsActivated [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 57 of file actor.h. +

+Referenced by activate, CActor, isActivated, save, and unActivate.

+

+ + + + +
+ + +
const NLAIC::CIdentType NLAIAGENT::CActor::IdActor [static] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 105 of file actor.h. +

+Referenced by getType.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1