|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLAIAGENT::COperatorScript Class Reference#include <operator_script.h>
Inheritance diagram for NLAIAGENT::COperatorScript:
List of all members.
Public Methods |
| COperatorScript (IAgentManager *, bool activated=false) |
| COperatorScript (const COperatorScript &) |
| COperatorScript (IAgentManager *, IBasicAgent *, std::list< IObjectIA * > &, NLAISCRIPT::COperatorClass *) |
virtual | ~COperatorScript () |
float | priority () const |
| Priority of the operator. More...
|
void | calcPriority () |
virtual const NLAIC::IBasicType * | clone () const |
| Inherited functions. 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 (std::string &) 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 bool | checkActivation () |
virtual const CProcessResult & | run () |
| The work of an agent. More...
|
virtual void | processMessages (NLAIAGENT::IMessageBase *msg, NLAIAGENT::IObjectIA *o) |
virtual const NLAIC::CIdentType & | getType () 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 IObjectIA::CProcessResult | runMethodBase (int heritance, int index, IObjectIA *) |
virtual IObjectIA::CProcessResult | runMethodBase (int index, IObjectIA *) |
tQueue | getPrivateMember (const IVarName *, const IVarName *, const IObjectIA &) const |
virtual sint32 | getMethodIndexSize () const |
| getMethodIndexSize define the nomber of method define in the class. More...
|
virtual int | getBaseMethodCount () const |
| Return the nomber of internal C++ hard coded method that the class can process. More...
|
virtual void | onKill (IConnectIA *a) |
| Called by an agent who's destroyed te remove its references. More...
|
void | getFatherComponent (IVarName &) |
void | linkGoalArgs (NLAILOGIC::CGoal *) |
| Binds the goal args to the variables of the operator (defined by the "Goal:" field in the script). More...
|
virtual NLAILOGIC::CGoal * | selectGoal () |
| Selects a goal among the ones the operator can process. More...
|
virtual void | cancel () |
virtual void | onSuccess (IObjectIA *) |
| Dependencies failure and success notification These functions are called by other operators or goals who failed or succeeded. More...
|
virtual void | onFailure (IObjectIA *) |
NLAILOGIC::CFact * | buildFromVars (NLAILOGIC::IBaseAssert *, std::vector< sint32 > &, NLAILOGIC::CValueSet *) |
std::list< NLAILOGIC::CValueSet * > * | propagate (std::list< NLAILOGIC::CValueSet * > &, NLAILOGIC::CValueSet *, std::vector< sint32 > &) |
std::list< NLAILOGIC::CFact * > * | propagate (std::list< NLAILOGIC::CFact * > &) |
NLAILOGIC::CValueSet * | unifyLiaison (const NLAILOGIC::CValueSet *, NLAILOGIC::CValueSet *, std::vector< sint32 > &) |
void | lookForGoals () |
bool | checkPreconditions () |
void | execOnActivate () |
void | checkPause () |
bool | isExclusive () |
void | setPriority (float prio) |
virtual bool | checkTrigMsg () |
virtual void | order (NLAIAGENT::IBaseGroupType *, NLAILOGIC::IGoal *) |
Static Public Attributes |
const NLAIC::CIdentType | IdOperatorScript |
Protected Types |
enum | c_funcs_id {
fid_modeachieve,
fid_modemaintain,
fid_isPaused,
fid_getPriority,
fid_setPriority,
fid_isActivable,
fid_background,
fid_exclusive,
fid_achieve,
fid_order,
fid_last
} |
Private Attributes |
std::vector< NLAIAGENT::IObjectIA * > | _VarValues |
NLAILOGIC::CFactBase * | _FactBase |
NLAILOGIC::CGoal * | _CurrentGoal |
sint32 | _CyclesBeforeUpdate |
std::list< NLAILOGIC::CGoal * > | _ActivatedGoals |
bool | _IsActivable |
bool | _Exclusive |
bool | _Maintain |
float | _Priority |
float | _BasePriority |
Member Enumeration Documentation
enum NLAIAGENT::COperatorScript::c_funcs_id [protected]
|
|
|
-
Enumeration values:
-
fid_modeachieve |
|
fid_modemaintain |
|
fid_isPaused |
|
fid_getPriority |
|
fid_setPriority |
|
fid_isActivable |
|
fid_background |
|
fid_exclusive |
|
fid_achieve |
|
fid_order |
|
fid_last |
|
Reimplemented from NLAIAGENT::CActorScript.
Definition at line 49 of file operator_script.h. |
Constructor & Destructor Documentation
NLAIAGENT::COperatorScript::COperatorScript |
( |
IAgentManager * |
, |
|
|
bool |
activated = false |
|
) |
|
|
NLAIAGENT::COperatorScript::COperatorScript |
( |
const COperatorScript & |
|
) |
|
|
NLAIAGENT::COperatorScript::~COperatorScript |
( |
|
) |
[virtual] |
|
Member Function Documentation
void NLAIAGENT::COperatorScript::calcPriority |
( |
|
) |
|
|
void NLAIAGENT::COperatorScript::cancel |
( |
|
) |
[virtual] |
|
bool NLAIAGENT::COperatorScript::checkActivation |
( |
|
) |
[virtual] |
|
void NLAIAGENT::COperatorScript::checkPause |
( |
|
) |
|
|
bool NLAIAGENT::COperatorScript::checkPreconditions |
( |
|
) |
|
|
bool NLAIAGENT::COperatorScript::checkTrigMsg |
( |
|
) |
[virtual] |
|
void NLAIAGENT::COperatorScript::execOnActivate |
( |
|
) |
|
|
int NLAIAGENT::COperatorScript::getBaseMethodCount |
( |
|
) |
const [virtual] |
|
void NLAIAGENT::COperatorScript::getDebugString |
( |
std::string & |
|
) |
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::CActorScript.
Definition at line 91 of file operator_script.cpp.
References NLAIAGENT::CAgentScript::_AgentClass, NLAIAGENT::CAgentScript::_AgentManager, NLAISCRIPT::CAgentClass::getDebugString, NLAIAGENT::CStringType::getStr, NLAIAGENT::CIdMethod::Index, NLAIAGENT::CAgentScript::isMember, param, priority, r, NLAIC::IPointerGestion::release, NLAISCRIPT::CCallMethod::runOpCode, NLAISCRIPT::CCodeContext::Self, NLAISCRIPT::CCodeContext::Stack, NLAIC::stringGetBuild, t, and NLAIAGENT::tQueue. |
void NLAIAGENT::COperatorScript::getFatherComponent |
( |
IVarName & |
|
) |
|
|
sint32 NLAIAGENT::COperatorScript::getMethodIndexSize |
( |
|
) |
const [virtual] |
|
|
Reimplemented from NLAIAGENT::CActorScript.
Definition at line 734 of file operator_script.cpp.
References fid_background, fid_exclusive, fid_getPriority, fid_isActivable, fid_isPaused, fid_modeachieve, fid_modemaintain, fid_order, fid_setPriority, NLAIAGENT::DigitalType::IdDigitalType, param, NLAIAGENT::tQueue, and NLAIC::CIdentType::VoidType. |
|
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::CActorScript.
Definition at line 141 of file operator_script.cpp.
References NLAIAGENT::CAgentScript::getFactoryClass, NLAISCRIPT::IClassInterpret::getType, and IdOperatorScript.
Referenced by calcPriority, checkActivation, checkPause, checkPreconditions, execOnActivate, isExclusive, lookForGoals, onFailure, onSuccess, and run. |
bool NLAIAGENT::COperatorScript::isEqual |
( |
const IBasicObjectIA & |
a |
) |
const [virtual] |
|
bool NLAIAGENT::COperatorScript::isExclusive |
( |
|
) |
|
|
void NLAIAGENT::COperatorScript::lookForGoals |
( |
|
) |
|
|
const NLAIC::IBasicType * NLAIAGENT::COperatorScript::newInstance |
( |
|
) |
const [virtual] |
|
void NLAIAGENT::COperatorScript::onFailure |
( |
IObjectIA * |
|
) |
[virtual] |
|
void NLAIAGENT::COperatorScript::onKill |
( |
IConnectIA * |
a |
) |
[virtual] |
|
void NLAIAGENT::COperatorScript::onSuccess |
( |
IObjectIA * |
msg |
) |
[virtual] |
|
|
Definition at line 863 of file operator_script.cpp.
References NLAIAGENT::CActorScript::_NbAnswers, NLAIC::IBasicType::clone, NLAIAGENT::IBaseGroupType::getFront, NLAIAGENT::IMessageBase::PAchieve, NLAIAGENT::IBaseGroupType::popFront, NLAIAGENT::CProxyAgentMail::sendMessage, NLAIAGENT::IListBasicManager::set, NLAIAGENT::IMessageBase::setPerformatif, NLAIAGENT::IMessageBase::setSender, NLAILOGIC::IGoal::setSender, and NLAIAGENT::IBaseGroupType::size.
Referenced by runMethodBase. |
float NLAIAGENT::COperatorScript::priority |
( |
|
) |
const [virtual] |
|
|
Definition at line 473 of file operator_script.cpp.
References NLAIAGENT::CAgentScript::_AgentClass, buildFromVars, NLAISCRIPT::COperatorClass::getAssertPos, NLAISCRIPT::COperatorClass::getConcs, NLAISCRIPT::COperatorClass::getConds, NLAILOGIC::CFact::getDebugString, NLAISCRIPT::COperatorClass::getPosVarsConcs, NLAISCRIPT::COperatorClass::getPosVarsConds, propagate, r, and size. |
|
The work of an agent.
Typically agent process child message, process its message and run its activity.
Reimplemented from NLAIAGENT::CActorScript.
Definition at line 162 of file operator_script.cpp.
References NLAIAGENT::CAgentScript::_AgentClass, _CurrentGoal, _CyclesBeforeUpdate, _IsActivable, NLAIAGENT::CActorScript::_IsActivated, NLAIAGENT::CActorScript::_IsPaused, NLAIAGENT::CActorScript::activate, NLAILOGIC::CGoal::addSuccessor, calcPriority, checkActivation, checkPause, execOnActivate, getType, NLAIAGENT::IBasicAgent::IBasicAgent, NLAILOGIC::IGoal::isSelected, linkGoalArgs, selectGoal, and NLAIAGENT::CActorScript::unActivate. |
|
Reimplemented from NLAIAGENT::CActorScript.
Definition at line 659 of file operator_script.cpp.
References _Exclusive, _IsActivable, NLAIAGENT::CActorScript::_IsPaused, _Maintain, _Priority, fid_background, fid_exclusive, fid_getPriority, fid_isActivable, fid_isPaused, fid_modeachieve, fid_modemaintain, fid_order, fid_setPriority, index, order, params, priority, and r. |
|
Reimplemented from NLAIAGENT::CActorScript.
Definition at line 588 of file operator_script.cpp.
References _Exclusive, _IsActivable, NLAIAGENT::CActorScript::_IsPaused, _Maintain, fid_achieve, fid_background, fid_exclusive, fid_getPriority, fid_isActivable, fid_isPaused, fid_modeachieve, fid_modemaintain, fid_order, fid_setPriority, NLAIAGENT::getValue, index, order, params, priority, r, and setPriority. |
void NLAIAGENT::COperatorScript::setPriority |
( |
float |
prio |
) |
|
|
Member Data Documentation
float NLAIAGENT::COperatorScript::_BasePriority [private]
|
|
sint32 NLAIAGENT::COperatorScript::_CyclesBeforeUpdate [private]
|
|
bool NLAIAGENT::COperatorScript::_Exclusive [private]
|
|
bool NLAIAGENT::COperatorScript::_IsActivable [private]
|
|
bool NLAIAGENT::COperatorScript::_Maintain [private]
|
|
float NLAIAGENT::COperatorScript::_Priority [private]
|
|
The documentation for this class was generated from the following files:
|
|