#include <interpret_object_operator.h>
Inheritance diagram for NLAISCRIPT::COperatorClass:
Public Member Functions | |
void | activatePostConditions (NLAIAGENT::IObjectIA *) |
void | addBoolConc (const NLAIAGENT::IVarName *) |
void | addBoolCond (const NLAIAGENT::IVarName *) |
Add first order patterns as preconditions or postconditions. | |
void | addCodeConc (IOpCode *) |
PostConditions code is code that will be executed upon completion of the execution of the operator. | |
void | addCodeCond (IOpCode *) |
void | addFirstOrderConc (const NLAIAGENT::IVarName *, std::list< const NLAIAGENT::IVarName * > &) |
void | addFirstOrderCond (const NLAIAGENT::IVarName *, std::list< const NLAIAGENT::IVarName * > &) |
Add first order patterns as preconditions or postconditions. | |
void | addFuzzyCond (NLAIAGENT::IVarName *, NLAIAGENT::IVarName *) |
void | addPostcondition (NLAILOGIC::CFactPattern *) |
void | addPrecondition (NLAILOGIC::CFactPattern *) |
virtual std::list< NLAILOGIC::CFact * > * | backward (std::list< NLAILOGIC::CFact * > &) |
NLAILOGIC::CFact * | buildFromVars (NLAILOGIC::IBaseAssert *, std::vector< sint32 > &, NLAILOGIC::CValueSet *) |
void | buildLogicTables () |
Compiles the conds and concs internaly. | |
virtual NLAIAGENT::IObjectIA * | buildNewInstance () const |
Instanciates an object of the class. | |
virtual TQueue | canProcessMessage (const IVarName &) |
virtual sint32 | checkTriggerMsg (const NLAIAGENT::IMessageBase *) |
virtual void | classIsMounted () |
Registers a new static component. | |
const NLAIC::IBasicType * | clone () const |
void | compileFactPattern (NLAILOGIC::CFactPattern *, std::vector< NLAILOGIC::IBaseAssert * > &, std::vector< sint32 > &) |
Transforms a CFactPattern in an assert and a list of variable positions in the operator. | |
COperatorClass () | |
COperatorClass (const COperatorClass &) | |
COperatorClass (const NLAIAGENT::IVarName &, const NLAIAGENT::IVarName &) | |
COperatorClass (const NLAIC::CIdentType &) | |
COperatorClass (const NLAIAGENT::IVarName &) | |
virtual void | createBaseClassComponents (std::list< NLAIAGENT::IObjectIA * > &) const |
Build the bases classes for a new instance, including inherited ones. | |
virtual void | createComponents (std::list< NLAIAGENT::IObjectIA * > &) const |
Build the class static components for a new instance, including inherited ones. | |
sint32 | decRef () |
Decrement the reference of an object. | |
virtual void | failure (NLAILOGIC::IBaseOperator *) |
virtual void | failure () |
sint32 | findMethod (const NLAIAGENT::IVarName &name, const CParam &CParam) const |
virtual std::list< NLAILOGIC::CFact * > * | forward (std::list< NLAILOGIC::CFact * > &) |
void | getAssertPos (NLAILOGIC::IBaseAssert *, std::vector< NLAILOGIC::IBaseAssert * > &, std::vector< sint32 > &) |
sint32 | getBaseMethodCount () const |
Get the base method count. | |
NLAIAGENT::IObjectIA * | getBaseObjectInstance () const |
Get the C++ base class representative pointer. | |
virtual sint32 | getChildMessageIndex (const NLAIAGENT::IMessageBase *, sint32) |
virtual const NLAIAGENT::IVarName * | getClassName () const |
Returns the name of the class in the registry. | |
virtual CComponent * | getComponent (const NLAIAGENT::IVarName &name) const |
virtual CComponent * | getComponent (sint32 i) const |
virtual sint32 | getComponentIndex (const NLAIAGENT::IVarName &) const |
virtual const char * | getComponentName (sint32) const |
Gets the name of the components with an offset reference. | |
std::vector< NLAILOGIC::IBaseAssert * > & | getConcs () |
std::vector< NLAILOGIC::IBaseAssert * > & | getConds () |
sint32 | getConstructorIndex () |
virtual void | getDebugString (std::string &) const |
std::vector< NLAIAGENT::IVarName * > & | getFuzzySets () |
std::vector< NLAIAGENT::IVarName * > & | getFuzzyVars () |
virtual const NLAILOGIC::CGoal * | getGoal () |
std::vector< sint32 > & | getGoalVarPos () |
virtual const std::string | getInfo () |
virtual const IClassInterpret * | getInheritance (sint32 n) const |
Return a pointer represent the inheritance range n, the inheritance graph are represented by a vector. | |
sint32 | getInheritedStaticMemberIndex (const NLAIAGENT::IVarName &) const |
virtual std::string | getMethodeMemberDebugString (sint32, sint32) const |
const NLAIAGENT::IVarName * | getName () const |
void | getPosListBackward (sint32, sint32, std::vector< sint32 > &) |
void | getPosListForward (sint32, sint32, std::vector< sint32 > &) |
std::vector< std::vector< sint32 > > & | getPosVarsConcs () |
std::vector< std::vector< sint32 > > & | getPosVarsConds () |
float | getPriority () const |
const sint32 & | getRef () const |
get the refence count. | |
virtual NLAIAGENT::IObjectIA * | getStaticComponentValue (std::string &) |
const IObjectIA * | getStaticMember (const IVarName &compName) const |
virtual const NLAIAGENT::IObjectIA * | getStaticMember (sint32) const |
virtual sint32 | getStaticMemberIndex (const IVarName &) const |
virtual sint32 | getStaticMemberIndex (const NLAIAGENT::IVarName &) const |
virtual sint32 | getStaticMemberSize () const |
returns the number of static members specific to the class (not the inherited ones) | |
virtual const NLAIC::CIdentType & | getType () const |
virtual NLAIC::CTypeOfObject | getTypeClass () const |
sint32 | getUpdateEvery () |
sint32 | getVarPos (NLAILOGIC::IBaseVar *) |
Looks for a variable in the operator's variables vector and returns its position. | |
std::vector< NLAILOGIC::IBaseVar * > & | getVars () |
void | incRef () |
Inc a reference. We use this when we have to conserve a pointer memeory for exemple in a list. | |
virtual void | init (IObjectIA *) |
void | initialiseFactBase (NLAILOGIC::CFactBase *) |
virtual void | initStatics () |
virtual sint32 | isClassInheritedFrom (const IVarName &) const |
virtual bool | isEqual (const IBasicObjectIA &a) const=0 |
virtual bool | isEqual (const NLAIAGENT::IBasicObjectIA &a) const |
virtual bool | isLocal () |
If the result is true the object is loclal else its a representation of an object on the server. By the method return true. | |
virtual TQueue | isMember (const IVarName *, const IVarName *, const IObjectIA &) const |
virtual bool | isValid (NLAILOGIC::CFactBase *) |
Verifies if the preconditions are validated. | |
bool | isValidFonc (NLAIAGENT::IObjectIA *) |
virtual void | load (NLMISC::IStream &) |
sint32 | NbMsgTrigger () |
const NLAIC::IBasicType * | newInstance () const |
bool | operator== (const IBasicObjectIA &classType) const |
virtual float | priority () const |
Priority of the operator. | |
virtual std::list< NLAILOGIC::CFact * > * | propagate (std::list< NLAILOGIC::CFact * > &) |
virtual sint32 | registerComponent (const NLAIAGENT::IVarName &type_name, const NLAIAGENT::CStringVarName &field_name) |
Adds a static component to an agent. | |
virtual sint32 | registerComponent (const NLAIAGENT::IVarName &type_name) |
Adds a static component to an agent. | |
void | RegisterMessage (NLAIAGENT::IMessageBase::TPerformatif, const std::string &, const std::string &) |
virtual void | release () |
Release allow to release the pointer. The last release when the _Ref is nul delete the object. | |
virtual const NLAIAGENT::IObjectIA::CProcessResult & | run () |
virtual CProcessResult | runMethodeMember (sint32 index, IObjectIA *) |
virtual CProcessResult | runMethodeMember (sint32, sint32, IObjectIA *) |
virtual const CProcessResult & | runStep () |
virtual void | save (NLMISC::IStream &) |
virtual CProcessResult | sendMessage (const IVarName &, IObjectIA *) |
virtual CProcessResult | sendMessage (IObjectIA *) |
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
void | setBaseMethodCount (sint32 n) |
Set the base method count. | |
void | setBaseObjectInstance (NLAIAGENT::IObjectIA *o) |
Set the C++ base class representative pointer. We have to incRef() before. | |
virtual void | setClassName (const NLAIAGENT::IVarName &) |
void | setComment (char *) |
Sets the comment for the operator. | |
virtual void | setGoal (const NLAIAGENT::IVarName *, std::list< const NLAIAGENT::IVarName * > &) |
virtual void | setGoal (const NLAIAGENT::CStringVarName &) |
Sets the goal the operator tries to achieve. | |
void | setPriority (float p) |
bool | setStaticMember (const IVarName &compName, IObjectIA *change) |
virtual bool | setStaticMember (sint32, NLAIAGENT::IObjectIA *) |
void | setType (const NLAIAGENT::IVarName &, const IClassInterpret &) |
void | setType (NLAIC::CIdentType *idType) |
virtual void | setUpdateEvery (sint32 cycles) |
virtual void | success (NLAILOGIC::IBaseOperator *) |
virtual void | success () |
virtual std::list< NLAILOGIC::CFact * > * | test (std::list< NLAILOGIC::CFact * > &) |
NLAILOGIC::CValueSet * | unifyBackward (std::list< NLAILOGIC::CFact * > &) |
NLAILOGIC::CValueSet * | unifyForward (std::list< NLAILOGIC::CFact * > &) |
NLAILOGIC::CValueSet * | unifyLiaison (const NLAILOGIC::CValueSet *, NLAILOGIC::CValueSet *, std::vector< sint32 > &) |
Tries to unify an instaciation of the operator's variables with a new CFact. | |
virtual void | updateStaticMember (sint32, NLAIAGENT::IObjectIA *) |
virtual | ~COperatorClass () |
Data Fields | |
std::list< const NLAIAGENT::IVarName * > | _BooleanConcs |
std::list< const NLAIAGENT::IVarName * > | _BooleanConds |
std::vector< std::list< const NLAIAGENT::IVarName * > * > | _ClassConcVars |
std::vector< std::list< const NLAIAGENT::IVarName * > * > | _ClassCondVars |
std::vector< const NLAIAGENT::IVarName * > | _ConcAsserts |
std::vector< IOpCode * > | _ConcCode |
std::vector< const NLAIAGENT::IVarName * > | _CondAsserts |
std::vector< IOpCode * > | _CondCode |
NLAILOGIC::CFactBase * | _FactBase |
std::vector< NLAIAGENT::IVarName * > | _FuzzySets |
std::vector< NLAIAGENT::IVarName * > | _FuzzyVars |
Static Public Attributes | |
const NLAIC::CIdentType | IdAgentClass |
const NLAIC::CIdentType | IdOperatorClass |
TProcessStatement | ProcessBuzzy = processBuzzy |
TProcessStatement | ProcessEnd = processEnd |
TProcessStatement | ProcessError = processError |
TProcessStatement | ProcessIdle = processIdle |
TProcessStatement | ProcessLocked = processLocked |
CProcessResult | ProcessNotComplit = IObjectIA::CProcessResult(processNotComplete) |
CProcessResult | ProcessRun = IObjectIA::CProcessResult() |
Protected Attributes | |
NLAIC::CIdentType * | _IdType |
Type of the class. | |
Private Attributes | |
char * | _Comment |
std::vector< NLAILOGIC::IBaseAssert * > | _Concs |
Pos of a precondition pattern's vars in the operator's vars table. | |
std::vector< NLAILOGIC::IBaseAssert * > | _Conds |
Variables of the operator. | |
NLAILOGIC::CGoal * | _Goal |
const NLAIAGENT::IVarName * | _GoalAssert |
Goal the operator tris to validate. | |
std::vector< sint32 > | _GoalPosVar |
Name of the goal's vars. | |
std::list< const NLAIAGENT::IVarName * > | _GoalVars |
Name of the goal's assert. | |
std::vector< std::vector< sint32 > > | _PosVarsConc |
Postconditions asserts. | |
std::vector< std::vector< sint32 > > | _PosVarsCond |
Preconditions asserts. | |
float | _Priority |
std::vector< NLAILOGIC::CGoal > | _Steps |
Description of the operator. | |
std::vector< sint32 > | _StepsMode |
std::vector< NLAIC::CIdentType > | _TrigMsgClass |
std::vector< NLAIAGENT::IMessageBase::TPerformatif > | _TrigMsgPerf |
Pos of a postcondition pattern's vars in the operator's vars table. | |
std::vector< sint32 > | _TrigMsgPos |
std::vector< std::string > | _TrigMsgVarname |
sint32 | _UpdateCycles |
std::vector< NLAILOGIC::IBaseVar * > | _Vars |
Pos of the goal's var in the operato's static components. |
|
Definition at line 23 of file logic/interpret_object_operator.cpp. References _Goal, _UpdateCycles, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00023 : CAgentClass(n) 00024 { 00025 setBaseMethodCount(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))->getBaseMethodCount()); 00026 setBaseObjectInstance(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))); 00027 _Goal = NULL; 00028 _Comment = NULL; 00029 _FactBase = new NLAILOGIC::CFactBase(); 00030 _UpdateCycles = 0; 00031 _Priority = 1; 00032 } |
|
Definition at line 34 of file logic/interpret_object_operator.cpp. References _Goal, _UpdateCycles, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), id, NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00034 : CAgentClass(id) 00035 { 00036 setBaseMethodCount(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))->getBaseMethodCount()); 00037 setBaseObjectInstance(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))); 00038 _Goal = NULL; 00039 _Comment = NULL; 00040 _FactBase = new NLAILOGIC::CFactBase(); 00041 _UpdateCycles = 0; 00042 _Priority = 1; 00043 } |
|
Definition at line 45 of file logic/interpret_object_operator.cpp. References _Goal, _UpdateCycles, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00045 : CAgentClass( inheritance ) 00046 { 00047 setBaseMethodCount(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))->getBaseMethodCount()); 00048 setBaseObjectInstance(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))); 00049 _Goal = NULL; 00050 _Comment = NULL; 00051 _FactBase = new NLAILOGIC::CFactBase(); 00052 _UpdateCycles = 0; 00053 _Priority = 1; 00054 } |
|
Definition at line 56 of file logic/interpret_object_operator.cpp. References _Comment, _FactBase, _Goal, _Priority, _UpdateCycles, NLAILOGIC::CFactBase::clone(), NLAILOGIC::CGoal::clone(), NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00056 : CAgentClass( c ) 00057 { 00058 setBaseMethodCount(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))->getBaseMethodCount()); 00059 setBaseObjectInstance(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))); 00060 if ( c._Goal != NULL) 00061 _Goal = (NLAILOGIC::CGoal *) c._Goal->clone(); 00062 else 00063 _Goal = NULL; 00064 00065 if ( c._Comment != NULL ) 00066 { 00067 _Comment = new char[ strlen( c._Comment ) ]; 00068 strcpy( _Comment, c._Comment ); 00069 } 00070 else 00071 _Comment = NULL; 00072 00073 if ( c._FactBase != NULL) 00074 _FactBase = (NLAILOGIC::CFactBase *) c._FactBase->clone(); 00075 else 00076 _FactBase = new NLAILOGIC::CFactBase(); 00077 00078 _UpdateCycles = c._UpdateCycles; 00079 _Priority = c._Priority; 00080 00081 } |
|
Definition at line 83 of file logic/interpret_object_operator.cpp. References _Goal, _UpdateCycles, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance(). Referenced by clone(), and newInstance().
00084 { 00085 setBaseMethodCount(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))->getBaseMethodCount()); 00086 setBaseObjectInstance(((NLAIAGENT::COperatorScript *)(NLAIAGENT::COperatorScript::IdOperatorScript.getFactory()->getClass()))); 00087 _Goal = NULL; 00088 _Comment = NULL; 00089 _FactBase = new NLAILOGIC::CFactBase(); 00090 _UpdateCycles = 0; 00091 _Priority = 1; 00092 } |
|
Definition at line 94 of file logic/interpret_object_operator.cpp. References _ConcCode, _CondCode, _FuzzySets, _FuzzyVars, _Goal, and NLAIC::IPointerGestion::release().
00095 { 00096 if ( _Comment != NULL ) 00097 delete[] _Comment; 00098 00099 if ( _FactBase != NULL ) 00100 _FactBase->release(); 00101 00102 if ( _Goal != NULL ) 00103 _Goal->release(); 00104 00105 00106 std::vector<NLAIAGENT::IVarName *>::iterator it_fvar = _FuzzyVars.begin(); 00107 while ( it_fvar != _FuzzyVars.end() ) 00108 { 00109 (*it_fvar)->release(); 00110 it_fvar++; 00111 } 00112 00113 it_fvar = _FuzzySets.begin(); 00114 while ( it_fvar != _FuzzySets.end() ) 00115 { 00116 (*it_fvar)->release(); 00117 it_fvar++; 00118 } 00119 00120 std::vector< IOpCode *>::iterator it_code = _CondCode.begin(); 00121 while ( it_code != _CondCode.end() ) 00122 { 00123 (*it_code)->release(); 00124 it_code++; 00125 } 00126 00127 it_code = _ConcCode.begin(); 00128 while ( it_code != _ConcCode.end() ) 00129 { 00130 (*it_code)->release(); 00131 it_code++; 00132 } 00133 /* 00134 int i; 00135 for ( i = 0; i < (int) _CondCode.size(); i++ ) 00136 { 00137 ( (NLAIAGENT::IVarName *)_CondCode[i] )->release(); 00138 } 00139 00140 for ( i = 0; i < (int) _CondCode.size(); i++ ) 00141 { 00142 ( (NLAIAGENT::IVarName *)_ConcCode[i] )->release(); 00143 } 00144 00145 for ( i = 0; i < (int) _CondAsserts.size(); i++ ) 00146 { 00147 ( (NLAIAGENT::IVarName *) _CondAsserts[i] )->release(); 00148 } 00149 00150 for ( i = 0; i < (int) _ConcAsserts.size(); i++ ) 00151 { 00152 ( (NLAIAGENT::IVarName *) _ConcAsserts[i] )->release(); 00153 } 00154 00155 std::list<const NLAIAGENT::IVarName *>::iterator it_n = _BooleanConds.begin(); 00156 while ( _BooleanConds.size() ) 00157 { 00158 ( (NLAIAGENT::IVarName *) _BooleanConds.front() )->release(); 00159 _BooleanConds.pop_front(); 00160 } 00161 00162 it_n = _BooleanConcs.begin(); 00163 while ( _BooleanConcs.size() ) 00164 { 00165 ( (NLAIAGENT::IVarName *) _BooleanConcs.front() )->release(); 00166 _BooleanConcs.pop_front(); 00167 } 00168 */ 00169 } |
|
Definition at line 801 of file logic/interpret_object_operator.cpp. References _ConcCode, NLAISCRIPT::CContextDebug::Active, NLAISCRIPT::CContextDebug::callStackPop(), NLAISCRIPT::CCodeContext::Code, NLAISCRIPT::CCodeContext::ContextDebug, r, and uint32.
00802 { 00803 NLAISCRIPT::CCodeContext &context = (NLAISCRIPT::CCodeContext &)*c; 00804 00805 for ( int i = 0; i < (int) _ConcCode.size(); i++ ) 00806 { 00807 NLAISCRIPT::IOpCode *opPtr = _ConcCode[ i ]; 00808 00809 IObjectIA::CProcessResult r; 00810 if(opPtr != NULL) 00811 { 00812 NLAISCRIPT::IOpCode &op = *opPtr; 00813 NLAISCRIPT::CCodeBrancheRun *opTmp = context.Code; 00814 int ip = (uint32)*context.Code; 00815 context.Code = (NLAISCRIPT::CCodeBrancheRun *)&op; 00816 *context.Code = 0; 00817 00818 r = ((NLAISCRIPT::ICodeBranche *)opPtr)->run(context); 00819 // If we are in Debug Mode 00820 if (context.ContextDebug.Active) 00821 { 00822 context.ContextDebug.callStackPop(); 00823 } 00824 *context.Code = ip; 00825 context.Code = opTmp; 00826 } 00827 } 00828 } |
|
Definition at line 638 of file logic/interpret_object_operator.cpp. References _BooleanConcs.
00639 { 00640 _BooleanConcs.push_back( conc_name ); 00641 } |
|
Add first order patterns as preconditions or postconditions.
Definition at line 633 of file logic/interpret_object_operator.cpp. References _BooleanConds.
00634 { 00635 _BooleanConds.push_back( cond_name ); 00636 } |
|
Implements NLAISCRIPT::IClassInterpret. Definition at line 458 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_ConstructorIndex, NLAISCRIPT::CAgentClass::_lastRef, NLAISCRIPT::CAgentClass::_Methode, NLAISCRIPT::CAgentClass::findMethod(), NLAISCRIPT::IClassInterpret::getClassName(), NLAIAGENT::IVarName::getString(), param, NLAIC::IPointerGestion::release(), NLAISCRIPT::CMethodeName::setParam(), sint32, and NLAIC::stringGetBuild(). Referenced by NLAISCRIPT::CAgentClass::buildChildsMessageMap().
00459 { 00460 #ifdef NL_DEBUG 00461 std::string txtClass; 00462 std::string txt; 00463 param.getDebugString(txtClass); 00464 txt = name.getString() + txtClass; 00465 txtClass = getClassName()->getString(); 00466 #endif 00467 sint32 i = findMethod(name,param); 00468 if(i >= 0) 00469 { 00470 CMethodeName *oldM = _Methode[ i ].Method; 00471 if(_Methode[ i ].isBasedOnBaseClass()) 00472 { 00473 CMethodeName *m = new CMethodeName(name); 00474 _Methode[ i ].setMethodBasedOnBaseClassState(false); 00475 oldM->release(); 00476 _Methode[i] = m; 00477 m->setParam( param ) ; 00478 _lastRef = i; 00479 } 00480 else 00481 { 00482 00483 std::string txtP; 00484 std::string txt; 00485 param.getDebugString(txtP); 00486 txt = NLAIC::stringGetBuild("%s%s is all ready defined in '%s'",name.getString(),txtP.c_str(),getClassName()->getString()); 00487 throw NLAIE::CExceptionAllReadyExist((char *)txt.c_str()); 00488 } 00489 } 00490 else 00491 { 00492 CMethodeName *m = new CMethodeName(name); 00493 _Methode.push_back( CMethodType( m )); 00494 m->setParam( param ); 00495 _lastRef = _Methode.size() - 1; 00496 _Methode.back().setMethodBasedOnBaseClassState(false); 00497 } 00498 00499 static NLAIAGENT::CStringVarName constructor_name("Constructor"); 00500 if ( name == constructor_name ) 00501 _ConstructorIndex = _lastRef; 00502 00503 return _lastRef; 00504 } |
|
PostConditions code is code that will be executed upon completion of the execution of the operator.
Definition at line 651 of file logic/interpret_object_operator.cpp. References _ConcCode.
00652 { 00653 _ConcCode.push_back( code ); 00654 } |
|
Add first order patterns as preconditions or postconditions PreConditions code must be any piece of code that returns an object that is true or false using the isTrue() function. Definition at line 645 of file logic/interpret_object_operator.cpp. References _CondCode.
00646 { 00647 _CondCode.push_back( code ); 00648 } |
|
Definition at line 620 of file logic/interpret_object_operator.cpp. References _ClassConcVars, and _ConcAsserts.
00621 { 00622 _ConcAsserts.push_back( assert_name ); 00623 std::list<const NLAIAGENT::IVarName *> *tmp_list = new std::list<const NLAIAGENT::IVarName *>; 00624 while ( !params_list.empty() ) 00625 { 00626 tmp_list->push_back( params_list.front() ); 00627 params_list.pop_front(); 00628 } 00629 _ClassConcVars.push_back( tmp_list ); 00630 } |
|
Add first order patterns as preconditions or postconditions.
Definition at line 594 of file logic/interpret_object_operator.cpp. References NLAILOGIC::CFactBase::addAssert(), addPrecondition(), NLAILOGIC::CVarSet::addVar(), assert, and NLAIC::IBasicType::clone().
00595 { 00596 /* _CondAsserts.push_back( assert_name ); 00597 std::list<const NLAIAGENT::IVarName *> *tmp_list = new std::list<const NLAIAGENT::IVarName *>; 00598 while ( !params_list.empty() ) 00599 { 00600 const char *txt = params_list.front()->getString(); 00601 tmp_list->push_back( params_list.front() ); 00602 params_list.pop_front(); 00603 } 00604 _ClassCondVars.push_back( tmp_list ); 00605 */ 00606 00607 NLAIAGENT::CStringVarName name = *(NLAIAGENT::CStringVarName *)assert_name->clone(); 00608 NLAILOGIC::IBaseAssert *assert = _FactBase->addAssert( name, params_list.size() ); 00609 NLAILOGIC::CFactPattern *pattern = new NLAILOGIC::CFactPattern( assert ); 00610 std::list<const NLAIAGENT::IVarName *>::iterator it_var = params_list.begin(); 00611 while ( it_var != params_list.end() ) 00612 { 00613 NLAIAGENT::CStringVarName var_name = *(NLAIAGENT::CStringVarName *)(*it_var); 00614 pattern->addVar( new NLAILOGIC::CVar( var_name ) ); 00615 it_var++; 00616 } 00617 addPrecondition( pattern ); 00618 } |
|
Definition at line 875 of file logic/interpret_object_operator.cpp. References _FuzzySets, and _FuzzyVars.
00876 { 00877 _FuzzyVars.push_back( var_name ); 00878 _FuzzySets.push_back( fset ); 00879 } |
|
Definition at line 490 of file logic/interpret_object_operator.cpp. References _Concs, compileFactPattern(), and NLAILOGIC::CFactPattern::getAssert(). Referenced by buildLogicTables(), and initialiseFactBase().
00491 { 00492 if ( pattern->getAssert() ) 00493 { 00494 std::vector<sint32> pos_Vars; 00495 compileFactPattern( pattern, _Conds, pos_Vars); 00496 00497 // pattern->getAssert()->addInput( this ); 00498 _Concs.push_back( pattern->getAssert() ); 00499 _PosVarsConc.push_back( pos_Vars ); 00500 } 00501 } |
|
Definition at line 476 of file logic/interpret_object_operator.cpp. References compileFactPattern(), and NLAILOGIC::CFactPattern::getAssert(). Referenced by addFirstOrderCond(), buildLogicTables(), and initialiseFactBase().
00477 { 00478 if ( pattern->getAssert() ) 00479 { 00480 std::vector<sint32> pos_Vars; 00481 compileFactPattern( pattern, _Conds, pos_Vars); 00482 00483 // pattern->getAssert()->addClause( this, pos_Vars ); 00484 _Conds.push_back( pattern->getAssert() ); 00485 _PosVarsCond.push_back( pos_Vars ); 00486 00487 } 00488 } |
|
Definition at line 334 of file logic/interpret_object_operator.cpp. References buildFromVars(), NLAIC::IPointerGestion::release(), sint32, and unifyBackward().
00335 { 00336 NLAILOGIC::CValueSet *unified = unifyBackward( facts ); 00337 std::list<NLAILOGIC::CFact *> *result = new std::list<NLAILOGIC::CFact *>; 00338 for (sint32 i = 0; i < (sint32) _Conds.size(); i++ ) 00339 { 00340 NLAILOGIC::CFact *tmp = buildFromVars( _Conds[i], _PosVarsCond[i], unified ); 00341 result->push_back( tmp ); 00342 #ifdef NL_DEBUG 00343 00344 #endif 00345 } 00346 unified->release(); 00347 return result; 00348 } |
|
Build the table that translates an agent's message processing function index into it's child equivalent message processing function index. Builds components included inherited ones Counts the number of scripted components Definition at line 150 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Methode, NLAISCRIPT::CAgentClass::_MsgIndirectTable, NLAISCRIPT::CAgentClass::_VTable, NLAISCRIPT::CAgentClass::addBrancheCode(), NLAISCRIPT::CAgentClass::clearIndirectMsgTable(), components, NLAISCRIPT::CAgentClass::findMethod(), NLAISCRIPT::CAgentClass::getBrancheCode(), NLAISCRIPT::CAgentClass::getBrancheCodeSize(), NLAISCRIPT::IClassInterpret::getClassName(), NLAIC::CIdentType::getFactory(), NLAISCRIPT::CMethodeName::getName(), NLAISCRIPT::CMethodeName::getParam(), NLAIAGENT::IVarName::getString(), NLAISCRIPT::CAgentClass::isMessageFunc(), sint32, and x.
00151 { 00152 00153 sint32 i,j; 00154 sint32 child_index; 00155 sint32 nb_scripted_components = 0; 00156 00157 #ifdef NL_DEBUG 00158 const char *dbg_this_class_name = getClassName()->getString(); 00159 #endif 00160 clearIndirectMsgTable(); 00161 00163 std::vector<CComponent *> components; 00164 if ( _VTable.size() ) 00165 { 00166 for ( i = 0; i < (int) _VTable.size(); i++ ) 00167 { 00168 for ( j = 0; j < (int) _VTable[i]->_Components.size(); j++ ) 00169 { 00170 components.push_back( _VTable[i]->_Components[j] ); 00171 } 00172 } 00173 } 00174 00175 00177 for (i =0; i < (int) components.size() ; i++ ) // ... for each of its components ... 00178 { 00179 NLAIC::CIdentType c_type( components[ i ]->RegisterName->getString() ); 00180 if( ((const NLAIC::CTypeOfObject &) c_type) & NLAIC::CTypeOfObject::tInterpret ) // ...if it's a scripted agent... 00181 nb_scripted_components ++; 00182 } 00183 00184 // For each message processing function of the father, 00185 // allocates the table with by default -1, which means the child doesn't process the 00186 // message. 00187 for ( i = 0; i < (int) _Methode.size(); i++ ) 00188 { 00189 CMethodeName &method = getBrancheCode( (int) i ); 00190 if ( isMessageFunc( method.getParam() ) ) 00191 { 00192 _MsgIndirectTable.push_back( new sint32[nb_scripted_components ] ); 00193 for ( child_index = 0; child_index < nb_scripted_components; child_index++ ) 00194 _MsgIndirectTable[i][child_index] = -1; 00195 } 00196 else 00197 _MsgIndirectTable.push_back( NULL ); 00198 } 00199 00200 sint32 index_component = 0; 00201 00202 for (i =0; i < (int) components.size() ; i++ ) // ... for each of its components ... 00203 { 00204 NLAIC::CIdentType c_type( components[ i ]->RegisterName->getString() ); 00205 #ifdef NL_DEBUG 00206 const char *dbg_class_name = components[ i ]->RegisterName->getString(); 00207 #endif 00208 if( ((const NLAIC::CTypeOfObject &) c_type) & NLAIC::CTypeOfObject::tInterpret ) // ...if it's a scripted agent... 00209 { 00210 CAgentClass *child_class = (CAgentClass *) c_type.getFactory()->getClass(); 00211 #ifdef NL_DEBUG 00212 sint32 dbg_nb_funcs = child_class->getBrancheCodeSize(); 00213 #endif 00214 for (child_index =0; child_index < child_class->getBrancheCodeSize(); child_index++ ) // ... for each of its methods... 00215 { 00216 CMethodeName &method = child_class->getBrancheCode( (int) child_index ); 00217 #ifdef NL_DEBUG 00218 const char *dbg_meth_name = method.getName().getString(); 00219 #endif 00220 if ( isMessageFunc( method.getParam() ) ) // ... if it's a message processing function... 00221 { 00222 // Looks if the father has a procecessing function for this message 00223 sint32 father_index = findMethod( method.getName(), method.getParam() ); 00224 if ( father_index != -1 ) 00225 { 00226 // The father processes this message. Puts the index for the child in the table. 00227 _MsgIndirectTable[ father_index ][ index_component ] = child_index; 00228 } 00229 else 00230 { 00231 // Ajoute la méthode chez le père 00232 father_index = addBrancheCode( method.getName(), method.getParam() ); 00233 _Methode[ father_index ].Method->setCode((IOpCode *)NULL); 00234 _Methode[ father_index ].Method->setTypeOfMethode( new NLAISCRIPT::COperandVoid() ); 00235 00236 00237 // Créée le tableau 00238 if ( father_index >= (int) _MsgIndirectTable.size() ) 00239 { 00240 _MsgIndirectTable.push_back( new sint32[ nb_scripted_components ] ); 00241 sint32 x; 00242 for ( x =0; x < nb_scripted_components; x++) 00243 _MsgIndirectTable[ father_index ][x] = -1; 00244 } 00245 _MsgIndirectTable[ father_index ] [ index_component ] = child_index; 00246 } 00247 } 00248 } 00249 index_component++; 00250 } 00251 } 00252 } |
|
Definition at line 324 of file logic/interpret_object_operator.cpp. References assert, NLAILOGIC::CValueSet::setValue(), and sint32. Referenced by backward(), and forward().
00325 { 00326 NLAILOGIC::CFact *result = new NLAILOGIC::CFact( assert); // TODO:: pas besoin du nombre dans ce constructeur puisqu'on a l'assert 00327 for (sint32 i = 0; i < (sint32) pl.size() ; i++ ) 00328 { 00329 result->setValue( i, (*vars)[ pl[i] ] ); 00330 } 00331 return result; 00332 } |
|
Compiles the conds and concs internaly.
Definition at line 657 of file logic/interpret_object_operator.cpp. References _ClassConcVars, _ClassCondVars, _ConcAsserts, _CondAsserts, NLAILOGIC::CFactBase::addAssert(), addPostcondition(), addPrecondition(), NLAILOGIC::CVarSet::addVar(), assert, and size.
00658 { 00659 // _FactBase = new NLAILOGIC::CFactBase(); 00660 int i; 00661 for ( i = 0; i < (int) _CondAsserts.size() ; i++ ) 00662 { 00663 NLAIAGENT::CStringVarName name = *(NLAIAGENT::CStringVarName *)_CondAsserts[i]->clone(); 00664 NLAILOGIC::IBaseAssert *assert = _FactBase->addAssert( name, _ClassCondVars[i]->size() ); 00665 NLAILOGIC::CFactPattern *pattern = new NLAILOGIC::CFactPattern( assert ); 00666 std::list<const NLAIAGENT::IVarName *>::iterator it_var = _ClassCondVars[i]->begin(); 00667 while ( it_var != _ClassCondVars[i]->end() ) 00668 { 00669 NLAIAGENT::CStringVarName var_name = *(NLAIAGENT::CStringVarName *)(*it_var); 00670 pattern->addVar( new NLAILOGIC::CVar( var_name ) ); 00671 it_var++; 00672 } 00673 addPrecondition( pattern ); 00674 } 00675 00676 for ( i = 0; i < (int) _ConcAsserts.size() ; i++ ) 00677 { 00678 NLAIAGENT::CStringVarName name = *(NLAIAGENT::CStringVarName *)_ConcAsserts[i]->clone(); 00679 NLAILOGIC::IBaseAssert *assert = _FactBase->addAssert( name, _ClassConcVars[i]->size() ); 00680 NLAILOGIC::CFactPattern *pattern = new NLAILOGIC::CFactPattern( assert ); 00681 std::list<const NLAIAGENT::IVarName *>::iterator it_var = _ClassConcVars[i]->begin(); 00682 while ( it_var != _ClassConcVars[i]->end() ) 00683 { 00684 NLAIAGENT::CStringVarName var_name = *(NLAIAGENT::CStringVarName *)(*it_var); 00685 pattern->addVar( new NLAILOGIC::CVar( var_name ) ); 00686 it_var++; 00687 } 00688 addPostcondition( pattern ); 00689 } 00690 } |
|
Instanciates an object of the class.
Reimplemented from NLAISCRIPT::CAgentClass. Definition at line 197 of file logic/interpret_object_operator.cpp. References components, NLAISCRIPT::CAgentClass::createBaseClassComponents(), getPriority(), and NLAIAGENT::COperatorScript::setPriority().
00198 { 00199 // Création des composants statiques 00200 std::list<NLAIAGENT::IObjectIA *> components; 00201 createBaseClassComponents( components ); 00202 00203 // Création du message 00204 NLAIAGENT::COperatorScript *instance = new NLAIAGENT::COperatorScript( NULL, NULL ,components, (COperatorClass *) this ); 00205 instance->setPriority(getPriority()); 00206 00207 return instance; 00208 } |
|
Build the table that translates an agent's message processing function index into it's child equivalent message processing function index. Builds components included inherited ones Counts the number of scripted components Definition at line 649 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Methode, NLAISCRIPT::CAgentClass::_VTable, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IClassInterpret::getClassName(), NLAISCRIPT::CMethodeName::getDebugString(), NLAIC::IPointerGestion::incRef(), sint32, NLAISCRIPT::CAgentClass::sizeVTable(), and t. Referenced by NLAISCRIPT::CAgentClass::buildVTable().
00650 { 00651 #ifdef NL_DEBUG 00652 char txtClass[2048*8]; 00653 strcpy(txtClass,getClassName()->getString()); 00654 #endif 00655 if(sizeVTable() > 1 ) 00656 { 00657 const IClassInterpret *t= _VTable[sizeVTable() - 2]; 00658 00659 if(t->getMethodIndexSize() > getBaseMethodCount()) 00660 { 00661 _Methode.resize(t->getMethodIndexSize() - getBaseMethodCount()); 00662 00663 int mmax = t->getMethodIndexSize() - getBaseMethodCount(); 00664 for(sint32 i = 0; i < mmax; i ++) 00665 { 00666 CMethodeName *m = &t->getBrancheCode(i); 00667 #ifdef NL_DEBUG 00668 std::string txt; 00669 m->getDebugString(txt); 00670 #endif 00671 m->incRef(); 00672 _Methode[i] = m; 00673 } 00674 } 00675 } 00676 } |
|
Build the table that translates an agent's message processing function index into it's child equivalent message processing function index. Builds components included inherited ones Counts the number of scripted components Implements NLAISCRIPT::IClassInterpret. Definition at line 641 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, NLAISCRIPT::CAgentClass::buildVMethode(), and NLAISCRIPT::CAgentClass::getClassPath(). Referenced by NLAISCRIPT::CCancelGoalMsgClass::CCancelGoalMsgClass(), NLAISCRIPT::CFactMsgClass::CFactMsgClass(), NLAISCRIPT::CFailureMsgClass::CFailureMsgClass(), NLAISCRIPT::CGetValueMsgClass::CGetValueMsgClass(), NLAISCRIPT::CGoalMsgClass::CGoalMsgClass(), NLAISCRIPT::CMsgNotifyParentClass::CMsgNotifyParentClass(), NLAISCRIPT::CSetValueMsgClass::CSetValueMsgClass(), and NLAISCRIPT::CSuccessMsgClass::CSuccessMsgClass().
00642 { 00643 _VTable.clear(); 00644 getClassPath(_VTable); 00645 00646 buildVMethode(); 00647 } |
|
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 in NLAIAGENT::CLocalAgentMail. Definition at line 350 of file baseai.cpp. References NLAIAGENT::TQueue. Referenced by NLAIAGENT::CLocalAgentMail::canProcessMessage().
00351 { 00352 return TQueue(); 00353 } |
|
Definition at line 930 of file logic/interpret_object_operator.cpp. References _TrigMsgClass, _TrigMsgPerf, _TrigMsgPos, NLAIAGENT::IMessageBase::getPerformatif(), NLAIC::IBasicType::getType(), and sint32.
00931 { 00932 sint32 n = _TrigMsgPerf.size(); 00933 00934 while ( n-- ) 00935 { 00936 if ( msg->getPerformatif() == _TrigMsgPerf[n] ) 00937 { 00938 #ifdef NL_DEBUG 00939 const char *msg_dbg = (const char *) msg->getType(); 00940 #endif 00941 if ( msg->getType() == _TrigMsgClass[n] ) 00942 return _TrigMsgPos[n]; 00943 } 00944 } 00945 return -1; 00946 } |
|
Registers a new static component.
Implements NLAISCRIPT::IClassInterpret. Definition at line 259 of file interpret_object_agent.cpp.
00260 { 00261 } |
|
This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne. Reimplemented from NLAISCRIPT::CAgentClass. Definition at line 172 of file logic/interpret_object_operator.cpp. References COperatorClass().
00173 { 00174 NLAIC::IBasicType *clone = new COperatorClass(*this); 00175 return clone; 00176 } |
|
Transforms a CFactPattern in an assert and a list of variable positions in the operator.
Definition at line 537 of file logic/interpret_object_operator.cpp. References NLAISCRIPT::CAgentClass::getComponentIndex(), NLAILOGIC::CVarSet::getVars(), NLAISCRIPT::CAgentClass::registerComponent(), and sint32. Referenced by addPostcondition(), and addPrecondition().
00538 { 00539 // Recherche si variables à ajouter 00540 std::vector<NLAILOGIC::IBaseVar *> *vars_pattern = fp->getVars(); 00541 if ( vars_pattern ) 00542 { 00543 std::vector<NLAILOGIC::IBaseVar *>::iterator it_cond = vars_pattern->begin(); 00544 while ( it_cond != vars_pattern->end() ) 00545 { 00546 // Looks in the class components if the var already exists 00547 sint32 id_var = getComponentIndex( (*it_cond)->getName() ); 00548 00549 if ( id_var != -1 ) 00550 { 00551 // If it exists, stores its index 00552 pos_Vars.push_back( id_var ); 00553 } 00554 else 00555 { 00556 // If it doesn't exist, registers the var as a component of the class 00557 NLAIAGENT::CStringVarName var_name("Var"); 00558 registerComponent( var_name , (const NLAIAGENT::CStringVarName &) (*it_cond)->getName() ); 00559 00560 // TODO: contrôle de type 00561 00562 _Vars.push_back( (NLAILOGIC::IBaseVar *)(*it_cond)->clone() ); 00563 pos_Vars.push_back( _Vars.size() - 1); 00564 } 00565 it_cond++; 00566 } 00567 } 00568 00569 for ( sint32 i = 0; i < (sint32) vars_pattern->size(); i++ ) 00570 { 00571 (*vars_pattern)[i]->release(); 00572 } 00573 delete vars_pattern; 00574 } |
|
|
Build the class static components for a new instance, including inherited ones.
Definition at line 609 of file interpret_object_agent.cpp. References NLAIC::IBasicType::getDebugString(), NLAIC::getRegistry(), NLAIAGENT::IVarName::getString(), id, NLAIC::IPointerGestion::incRef(), NLAISCRIPT::CComponent::ObjectName, NLAISCRIPT::CComponent::RegisterName, sint, sint32, NLAISCRIPT::CComponent::Static, and NLAISCRIPT::CComponent::StaticValue. Referenced by NLAISCRIPT::CAgentClass::createBaseClassComponents().
00610 { 00611 NLAIAGENT::IObjectIA *obj; 00612 for (sint32 i = 0; i < (sint32) _Components.size(); i++) 00613 { 00614 CComponent *comp = _Components[i]; 00615 if ( !comp->Static ) 00616 { 00617 //sint32 class_index = NLAIC::getRegistry()->getNumIdent( comp->RegisterName->getString() ); 00618 NLAIC::CIdentType id(comp->RegisterName->getString()); 00619 sint class_index = id.getIndex(); 00620 obj = (NLAIAGENT::IObjectIA *) NLAIC::getRegistry()->createInstance( class_index ); 00621 } 00622 else 00623 { 00624 #ifdef NL_DEBUG 00625 std::string comp_name; 00626 comp->RegisterName->getDebugString( comp_name ); 00627 00628 std::string comp_type; 00629 comp->ObjectName->getDebugString( comp_type ); 00630 00631 std::string buf; 00632 comp->StaticValue->getDebugString(buf); 00633 #endif 00634 obj = comp->StaticValue; 00635 comp->StaticValue->incRef(); 00636 } 00637 comps.push_back( obj ); 00638 } 00639 } |
|
Decrement the reference of an object.
Definition at line 93 of file abstract_interface.h. References NLAIC::IPointerGestion::_Ref, and sint32. Referenced by NLAIC::IPointerGestion::release(), and NLAIAGENT::CAgentTimerHandle::~CAgentTimerHandle().
00094 {
00095 return --_Ref;
00096 }
|
|
Definition at line 467 of file logic/interpret_object_operator.cpp.
00468 { 00469 } |
|
Definition at line 459 of file logic/interpret_object_operator.cpp.
00460 { 00461 } |
|
Definition at line 577 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Methode, NLAISCRIPT::CMethodeName::getName(), NLAISCRIPT::CMethodeName::getParam(), param, and sint32. Referenced by NLAISCRIPT::CAgentClass::addBrancheCode(), NLAISCRIPT::CAgentClass::buildChildsMessageMap(), NLAIAGENT::CAgentScript::callConstructor(), NLAIAGENT::CAgentScript::callFunction(), and NLAISCRIPT::CAgentClass::initStatics().
00578 { 00579 for(sint32 i = 0 ; i < (sint32)_Methode.size(); i ++) 00580 { 00581 #ifdef NL_DEBUG 00582 const char *dbg_method_name = _Methode[i].Method->getName().getString(); 00583 #endif² 00584 CMethodeName *m = _Methode[i].Method; 00585 const CParam &p = (const CParam &)m->getParam(); 00586 if( m->getName() == name && p == param ) 00587 return i; 00588 } 00589 return -1; 00590 } |
|
Definition at line 350 of file logic/interpret_object_operator.cpp. References _Concs, buildFromVars(), NLAIC::IPointerGestion::release(), sint32, and unifyForward().
00351 { 00352 NLAILOGIC::CValueSet *unified = unifyForward( facts ); 00353 #ifdef NL_DEBUG 00354 00355 #endif 00356 std::list<NLAILOGIC::CFact *> *result = new std::list<NLAILOGIC::CFact *>; 00357 for (sint32 i = 0; i < (sint32) _Concs.size(); i++ ) 00358 { 00359 NLAILOGIC::CFact *tmp = buildFromVars( _Concs[i], _PosVarsConc[i], unified ); 00360 result->push_back( tmp ); 00361 #ifdef NL_DEBUG 00362 00363 #endif 00364 } 00365 unified->release(); 00366 return result; 00367 } |
|
Definition at line 441 of file logic/interpret_object_operator.cpp. References NLAISCRIPT::l, and sint32. Referenced by NLAIAGENT::COperatorScript::propagate(), propagate(), unifyBackward(), and unifyForward().
|
|
Defines the base class of this class.
Implements NLAISCRIPT::IClassInterpret. Definition at line 866 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Base_class, NLAISCRIPT::CAgentClass::_Inheritance, NLAIC::getRegistry(), and NLAIAGENT::IVarName::getString(). Referenced by NLAISCRIPT::CAgentClass::createBaseClassComponents(), NLAISCRIPT::CAgentClass::getClassPath(), NLAISCRIPT::CAgentClass::getNbBaseClass(), NLAISCRIPT::CAgentClass::getStaticMember(), NLAISCRIPT::CAgentClass::getStaticMemberIndex(), and NLAISCRIPT::CAgentClass::getSuperClass().
00867 { 00868 if ( _Inheritance ) 00869 { 00870 if(_Base_class == NULL) 00871 { 00872 return (const IClassInterpret *)( (CClassInterpretFactory *) NLAIC::getRegistry()->getFactory( _Inheritance->getString() ) )->getClass(); 00873 } 00874 else 00875 { 00876 return _Base_class; 00877 } 00878 } 00879 else 00880 return NULL; 00881 } |
|
Get the base method count.
Definition at line 65 of file interpret_object_agent.h. References NLAISCRIPT::IAgentMultiClass::_BaseMethodCount, and sint32. Referenced by NLAISCRIPT::CAgentClass::buildVMethode(), NLAISCRIPT::CActorClass::CActorClass(), NLAISCRIPT::CAgentClass::CAgentClass(), NLAISCRIPT::CFsmClass::CFsmClass(), NLAISCRIPT::CManagerClass::CManagerClass(), NLAISCRIPT::CMessageClass::CMessageClass(), COperatorClass(), NLAISCRIPT::CSeqFsmClass::CSeqFsmClass(), NLAISCRIPT::CAgentClass::getChildMessageIndex(), NLAISCRIPT::CAgentClass::getMethodIndexSize(), NLAISCRIPT::CAgentClass::getPrivateMember(), NLAISCRIPT::CAgentClass::setConstroctorMethod(), and NLAISCRIPT::CAgentClass::setRunMethod().
00066 {
00067 return _BaseMethodCount;
00068 }
|
|
Get the C++ base class representative pointer.
Definition at line 77 of file interpret_object_agent.h. References NLAISCRIPT::IAgentMultiClass::_BaseObjectInstance. Referenced by NLAISCRIPT::CAgentClass::isMember().
00078 {
00079 return _BaseObjectInstance;
00080 }
|
|
get method in the base class. where h is the base class offset m is the method offset.
Implements NLAISCRIPT::IClassInterpret. Definition at line 438 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, and sint32.
00439 { 00440 #ifdef NL_DEBUG 00441 const NLAIAGENT::IObjectIA *o = _VTable[ no_base_class ]; 00442 #endif 00443 00444 return _VTable[ no_base_class ]->getBrancheCode( no_methode ); 00445 } |
|
throw NLAIE::CExceptionUnReference;
Implements NLAISCRIPT::IClassInterpret. Definition at line 424 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Methode, sint, and sint32.
00425 { 00426 #ifdef NL_DEBUG 00427 sint kkk = _Methode.size(); 00428 #endif 00429 CMethodeName *a = _Methode[i].Method; 00430 return *a; 00431 } |
|
Implements NLAISCRIPT::IClassInterpret. Definition at line 447 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_lastRef, and NLAISCRIPT::CAgentClass::_Methode. Referenced by NLAISCRIPT::CAgentClass::buildChildsMessageMap(), NLAIAGENT::CAgentScript::callConstructor(), NLAIAGENT::CAgentScript::callFunction(), NLAIAGENT::CMessageScript::getMethode(), NLAIAGENT::CAgentScript::getMethode(), NLAIAGENT::CAgentScript::getMethodeMemberDebugString(), NLAISCRIPT::CAgentClass::initStatics(), and NLAIAGENT::CAgentScript::runMethodeMember().
00448 { 00449 if(_lastRef < 0) throw NLAIE::CExceptionUnReference("you try to access to an unrefrence index"); 00450 return *_Methode[_lastRef].Method; 00451 } |
|
Definition at line 433 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Methode, and sint32. Referenced by NLAISCRIPT::CAgentClass::buildChildsMessageMap().
00434 {
00435 return _Methode.size();
00436 }
|
|
Definition at line 254 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_MsgIndirectTable, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAIAGENT::IMessageBase::getMethodIndex(), and sint32. Referenced by NLAIAGENT::CAgentScript::getChildMessageIndex().
00255 { 00256 return _MsgIndirectTable[ msg->getMethodIndex() - getBaseMethodCount() ][child_index]; 00257 } |
|
Implements NLMISC::IClassable. Reimplemented in NLAIC::CIdentType. Definition at line 116 of file abstract_interface.h. Referenced by NLAISCRIPT::CAgentClass::isClassInheritedFrom().
00117 { 00118 return std::string("<unnamed>"); 00119 } |
|
Returns the name of the class in the registry.
Definition at line 106 of file interpret_object.cpp. Referenced by NLAISCRIPT::CAgentClass::addBrancheCode(), NLAISCRIPT::CAgentClass::buildChildsMessageMap(), NLAISCRIPT::CAgentClass::buildVMethode(), NLAISCRIPT::CListClass::find(), NLAIAGENT::CAgentScript::getClassName(), NLAISCRIPT::CAgentClass::getDebugString(), NLAISCRIPT::CCompilateur::getInheritanceRange(), NLAISCRIPT::CAgentClass::isClassInheritedFrom(), NLAISCRIPT::CAgentClass::isEqual(), and NLAISCRIPT::CCompilateur::RegisterClass().
00107 {
00108 return _Name;
00109 }
|
|
Builds a vector with the path from the super class to this class.
Definition at line 896 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::getBaseClass(), NLAISCRIPT::IClassInterpret::getName(), and NLAIAGENT::IVarName::getString(). Referenced by NLAISCRIPT::CAgentClass::buildVTable().
00897 { 00898 const CAgentClass *base_class = (CAgentClass *) getBaseClass(); 00899 #ifdef NL_DEBUG 00900 const char *txt = NULL; 00901 if(getName() != NULL) txt = getName()->getString(); 00902 else if(getName() != NULL) txt = base_class->getName()->getString(); 00903 #endif 00904 if ( base_class /*&& !(base_class->getType() == IdAgentClass)*/) 00905 { 00906 base_class->getClassPath( path ); 00907 } 00908 path.push_back( this ); 00909 } |
|
Returns a CComponent struct describing a static component from its name in the class Only the class's own static members are considered, not the inherited ones. Implements NLAISCRIPT::IClassInterpret. Definition at line 307 of file interpret_object_agent.cpp. References sint32.
00308 { 00309 for(sint32 i = _Components.size() - 1; i >= 0; i --) 00310 { 00311 if (_Components[i]->ObjectName !=NULL && *_Components[i]->ObjectName == name) 00312 return _Components[i]; 00313 } 00314 return NULL; 00315 } |
|
Returns a CComponent struct describing a static component from its index in the class Only the class's own static members are considered, not the inherited ones. Implements NLAISCRIPT::IClassInterpret. Definition at line 416 of file interpret_object_agent.cpp. References sint32. Referenced by NLAIAGENT::CMessageScript::getDebugString(), and NLAISCRIPT::CAgentClass::getStaticComponentValue().
00417 { 00418 if ( i < (sint32) _Components.size() ) 00419 return _Components[ i ]; 00420 else 00421 return NULL; 00422 } |
|
Definition at line 290 of file interpret_object_agent.cpp. References buffer, NLAIC::IBasicType::getDebugString(), and sint32. Referenced by compileFactPattern(), NLAIAGENT::CAgentScript::runMethodBase(), and setGoal().
00291 { 00292 for(sint32 i = _Components.size() - 1; i >= 0; i --) 00293 { 00294 00295 #ifdef NL_DEBUG 00296 std::string buffer; 00297 name.getDebugString( buffer ); 00298 std::string buffer2; 00299 _Components[i]->ObjectName->getDebugString( buffer2 ); 00300 #endif 00301 if (_Components[i]->ObjectName !=NULL && (*_Components[i]->ObjectName) == name) 00302 return i; 00303 } 00304 return -1; 00305 } |
|
Gets the name of the components with an offset reference.
Implements NLAISCRIPT::IClassInterpret. Definition at line 924 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, NLAIAGENT::IVarName::getString(), NLAISCRIPT::CComponent::ObjectName, and sint32. Referenced by NLAIAGENT::CMessageScript::getDebugString(), and NLAIAGENT::CAgentScript::getDebugString().
00925 { 00926 sint32 nb_components = 0; 00927 std::vector<const CAgentClass *>::const_iterator it_bc = _VTable.begin(); 00928 while ( it_bc != _VTable.end() && nb_components <= i ) 00929 { 00930 nb_components = nb_components + (*it_bc)->getStaticMemberSize(); 00931 it_bc++; 00932 } 00933 it_bc--; 00934 CComponent *component = (*it_bc)->getComponent( i - ( nb_components - (*it_bc)->getStaticMemberSize() ) ); 00935 return component->ObjectName->getString(); 00936 } |
|
Returns the number of base classes.
Implements NLAISCRIPT::IClassInterpret. Definition at line 846 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Base_class, NLAISCRIPT::CAgentClass::_Inheritance, NLAIC::getRegistry(), and NLAIAGENT::IVarName::getString().
00847 { 00848 if ( _Inheritance ) 00849 { 00850 if(_Base_class == NULL) 00851 { 00852 _Base_class = (IClassInterpret *)( (CClassInterpretFactory *) NLAIC::getRegistry()->getFactory( _Inheritance->getString() ) )->getClass(); 00853 return _Base_class; 00854 } 00855 else 00856 { 00857 return _Base_class; 00858 } 00859 } 00860 else 00861 { 00862 return NULL; 00863 } 00864 } |
|
Definition at line 213 of file interpret_object_operator.h. References _Concs. Referenced by NLAIAGENT::COperatorScript::propagate().
00214 { 00215 return _Concs; 00216 } |
|
Definition at line 208 of file interpret_object_operator.h. Referenced by NLAIAGENT::COperatorScript::propagate().
00209 { 00210 return _Conds; 00211 } |
|
Definition at line 948 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_ConstructorIndex, and sint32.
00949 {
00950 return _ConstructorIndex;
00951 }
|
|
|
|
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 NLAISCRIPT::CAgentClass. Definition at line 184 of file logic/interpret_object_operator.cpp. References t. Referenced by RegisterMessage().
|
|
Definition at line 198 of file interpret_object_operator.h. References _FuzzySets.
00199 { 00200 return _FuzzySets; 00201 } |
|
Definition at line 193 of file interpret_object_operator.h. References _FuzzyVars.
00194 { 00195 return _FuzzyVars; 00196 } |
|
Definition at line 471 of file logic/interpret_object_operator.cpp. References _Goal.
00472 { 00473 return _Goal; 00474 } |
|
Definition at line 228 of file interpret_object_operator.h. References _GoalPosVar.
00229 { 00230 return _GoalPosVar; 00231 } |
|
Definition at line 292 of file abstract_interface.h. References NLAIC::IBasicType::getDebugString(), and s.
00293 { 00294 std::string s; 00295 getDebugString(s); 00296 return s; 00297 } |
|
Return a pointer represent the inheritance range n, the inheritance graph are represented by a vector.
Implements NLAISCRIPT::IClassInterpret. Definition at line 716 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, and sint32.
00717 {
00718 return _VTable[n];
00719 }
|
|
Defines the base class of this class.
Implements NLAISCRIPT::IClassInterpret. Definition at line 831 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Inheritance.
00832 {
00833 return _Inheritance;
00834 }
|
|
Definition at line 344 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, buffer, NLAIC::IBasicType::getDebugString(), NLAISCRIPT::IClassInterpret::getType(), index, and sint32. Referenced by NLAIAGENT::CAgentScript::getStaticMemberIndex(), RegisterMessage(), NLAIAGENT::CAgentScript::runAskGetValue(), and NLAIAGENT::CAgentScript::runMethodBase().
00345 { 00346 00347 #ifdef NL_DEBUG 00348 const char *dbg_this_type = (const char *) getType(); 00349 std::string buffer; 00350 name.getDebugString(buffer); 00351 #endif 00352 00353 00354 sint32 nb_components = 0; 00355 std::vector<const CAgentClass *>::const_iterator it_bc = _VTable.begin(); 00356 sint32 index; 00357 while ( it_bc != _VTable.end() && ( ( index = (*it_bc)->getComponentIndex( name ) ) == -1 ) ) 00358 { 00359 nb_components += (*it_bc)->getStaticMemberSize(); 00360 it_bc++; 00361 } 00362 00363 if ( it_bc != _VTable.end() && index != -1) 00364 return nb_components + index; 00365 else 00366 return -1; 00367 } |
|
The methode getMethodeMemberDebugString(sint32 heritance, sint32 index) return a string that define the name and the argument of the method Reimplemented in NLAIAGENT::CAgentScript. Definition at line 311 of file baseai.cpp. References sint32. Referenced by NLAISCRIPT::CCallHeapMethodi::getDebugResult(), NLAISCRIPT::CCallStackMethodi::getDebugResult(), NLAISCRIPT::CCallMethodi::getDebugResult(), NLAISCRIPT::CLibHeapMemberMethod::getDebugResult(), NLAISCRIPT::CLibStackNewMemberMethod::getDebugResult(), NLAISCRIPT::CLibStackMemberMethod::getDebugResult(), NLAISCRIPT::CLibCallMethodi::getDebugResult(), NLAISCRIPT::CLibCallInheritedMethod::getDebugResult(), NLAISCRIPT::CLibCallMethod::getDebugResult(), NLAISCRIPT::CLibMemberMethodi::getDebugResult(), NLAISCRIPT::CLibMemberInheritedMethod::getDebugResult(), and NLAISCRIPT::CLibMemberMethod::getDebugResult().
00312 { 00313 switch(id) 00314 { 00315 case 0: 00316 { 00317 return std::string("IObjectIA::sendMessage(IMessage)"); 00318 } 00319 break; 00320 case 1: 00321 break; 00322 case 2: 00323 return std::string("IObjectIA::run()"); 00324 break; 00325 00326 case 3: 00327 { 00328 return std::string("IObjectIA::getStaticMember(Integer)"); 00329 } 00330 } 00331 return std::string("Mathod_?????(Param_?????)"); 00332 } |
|
getMethodIndexSize define the nomber of method define in the class. Reimplemented from NLAIAGENT::IObjectIA. Definition at line 453 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Methode, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), and sint32. Referenced by NLAIAGENT::CMessageScript::getMethode(), NLAIAGENT::CAgentScript::getMethode(), NLAIAGENT::CMessageScript::getMethodIndexSize(), and NLAISCRIPT::CAgentClass::getPrivateMember().
00454 { 00455 return (sint32)_Methode.size() + getBaseMethodCount(); 00456 } |
|
Definition at line 169 of file interpret_object.h. Referenced by NLAISCRIPT::CAgentClass::createBaseClassComponents(), and NLAISCRIPT::CAgentClass::getClassPath().
00170 {
00171 return _Name;
00172 }
|
|
Returns the number of base classes (the distance to the super class).
Definition at line 912 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::getBaseClass(), and sint32.
00913 { 00914 sint32 dist = 0; 00915 const CAgentClass *base_class = this; 00916 while ( base_class->getBaseClass() ) 00917 { 00918 base_class = (CAgentClass *) base_class->getBaseClass(); 00919 dist++; 00920 } 00921 return dist; 00922 } |
|
|
|
|
|
Definition at line 223 of file interpret_object_operator.h. Referenced by NLAIAGENT::COperatorScript::propagate().
00224 { 00225 return _PosVarsConc; 00226 } |
|
Definition at line 218 of file interpret_object_operator.h. Referenced by NLAIAGENT::COperatorScript::propagate().
00219 { 00220 return _PosVarsCond; 00221 } |
|
Definition at line 248 of file interpret_object_operator.h. Referenced by buildNewInstance().
00249 { 00250 return _Priority; 00251 } |
|
Implements NLAISCRIPT::IClassInterpret. Definition at line 506 of file interpret_object_agent.cpp. References NLAISCRIPT::CParam::eval(), NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IClassInterpret::getBrancheCode(), NLAISCRIPT::CAgentClass::getMethodIndexSize(), NLAISCRIPT::CMethodeName::getName(), NLAISCRIPT::CMethodeName::getParam(), NLAIAGENT::IVarName::getString(), NLAISCRIPT::CMethodeName::getTypeOfMethode(), NLAIAGENT::CIdMethod::Index, NLAIAGENT::CIdMethod::Method, param, q, NLAIAGENT::CIdMethod::ReturnType, sint32, t, NLAIAGENT::TQueue, and NLAIAGENT::CIdMethod::Weight. Referenced by NLAISCRIPT::CAgentClass::isMember(), and NLAIAGENT::CAgentScript::isMember().
00507 { 00508 NLAIAGENT::TQueue q; 00509 const IClassInterpret *classType = this; 00510 NLAIAGENT::CIdMethod k; 00511 00512 for(sint32 i = 0; i < getMethodIndexSize() - getBaseMethodCount(); i ++) 00513 { 00514 CMethodeName &m = classType->getBrancheCode(i); 00515 #ifdef NL_DEBUG 00516 const char *dbg_this_name = m.getName().getString(); 00517 const char *dbg_func_name = methodName->getString(); 00518 #endif 00519 if(m.getName() == *methodName ) 00520 { 00521 k.Weight = m.getParam().eval((const CParam &)param); 00522 if(k.Weight < 0.0) continue; 00523 k.Index = i + getBaseMethodCount(); 00524 k.Method = &m; 00525 IOpType *t = (IOpType *)m.getTypeOfMethode(); 00526 t->incRef(); 00527 00528 if(k.ReturnType != NULL) 00529 { 00530 k.ReturnType->release(); 00531 } 00532 00533 k.ReturnType = new CObjectUnknown(t); 00534 q.push(k); 00535 } 00536 } 00537 return q; 00538 } |
|
get the refence count.
Definition at line 99 of file abstract_interface.h. References NLAIC::IPointerGestion::_Ref, and sint32. Referenced by NLAIAGENT::CAgentTimerHandle::~CAgentTimerHandle().
00100 {
00101 return _Ref;
00102 }
|
|
return the absolut index of the run() method of this class.
Implements NLAISCRIPT::IClassInterpret. Definition at line 938 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_RunIndex, and sint32. Referenced by NLAIAGENT::CAgentScript::haveActivity(), NLAIAGENT::CMainAgentScript::run(), and NLAIAGENT::CAgentScript::runActivity().
00939 {
00940 return _RunIndex;
00941 }
|
|
Definition at line 1024 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::getComponent(), and NLAISCRIPT::CComponent::StaticValue.
01025 { 01026 CComponent *component = getComponent( NLAIAGENT::CStringVarName( c_name.c_str() ) ); 01027 return component->StaticValue; 01028 } |
|
to get the pointer of a given components referened by an string. Definition at line 261 of file baseai.h. References NLAIAGENT::IObjectIA::getStaticMember(), and NLAIAGENT::IObjectIA::getStaticMemberIndex().
00262 { 00263 return getStaticMember(getStaticMemberIndex(compName)); 00264 } |
|
to get the pointer of a given components referened by an index. Reimplemented from NLAIAGENT::IObjectIA. Definition at line 369 of file interpret_object_agent.cpp. References NLAISCRIPT::IClassInterpret::getBaseClass(), NLAISCRIPT::CAgentClass::getBaseClass(), NLAISCRIPT::IClassInterpret::getComponent(), NLAISCRIPT::IClassInterpret::getStaticMemberSize(), NLAIAGENT::IVarName::getString(), id, index, NLAISCRIPT::CComponent::RegisterName, and sint32.
00370 { 00371 try 00372 { 00373 /*NLAIC::CIdentType id(_Components[i]->RegisterName->getString()); 00374 const NLAIAGENT::IObjectIA *o = (const NLAIAGENT::IObjectIA *)id.getFactory()->getClass(); 00375 return o;*/ 00376 sint32 n = 0; 00377 const IClassInterpret *classType = getBaseClass(); 00378 while(classType != NULL) 00379 { 00380 n += classType->getStaticMemberSize(); 00381 classType = classType->getBaseClass(); 00382 } 00383 classType = this; 00384 while(classType != NULL) 00385 { 00386 for(sint32 i = classType->getStaticMemberSize() - 1; i >= 0; i --) 00387 { 00388 if(index == i + n) 00389 { 00390 NLAIC::CIdentType id(classType->getComponent(i)->RegisterName->getString()); 00391 const NLAIAGENT::IObjectIA *o = (const NLAIAGENT::IObjectIA *)id.getFactory()->getClass(); 00392 return o; 00393 } 00394 /*if (classType->getComponent(i)->ObjectName != NULL && *classType->getComponent(i)->ObjectName == name) 00395 { 00396 return i + n; 00397 }*/ 00398 } 00399 classType = classType->getBaseClass(); 00400 if(classType != NULL) n -= classType->getStaticMemberSize(); 00401 } 00402 } 00403 catch(NLAIE::IException &) 00404 { 00405 //throw NLAIE::CExceptionContainer(e.what()); 00406 } 00407 00408 return NULL; 00409 } |
|
to get the index of a given components name. Reimplemented in NLAIAGENT::CLocalAgentMail, NLAIAGENT::CAgentScript, and NLAIAGENT::CMessageScript. Definition at line 188 of file baseai.cpp. References sint32. Referenced by NLAISCRIPT::CCompilateur::affectation(), NLAIAGENT::CComponentHandle::getComponent(), NLAIAGENT::IObjectIA::getStaticMember(), NLAIAGENT::CLocalAgentMail::getStaticMemberIndex(), NLAISCRIPT::CCompilateur::getValidateHierarchyBase(), NLAISCRIPT::CCompilateur::isValidateVarName(), NLAISCRIPT::CCodeBrancheRunDebug::printVariable(), NLAISCRIPT::CCompilateur::processingVar(), NLAISCRIPT::CConstraintStackComp::run(), and NLAIAGENT::IObjectIA::setStaticMember().
00189 {
00190 return -1;
00191 }
|
|
Returns a CComponent struct describing a static component from its name in the class Only the class's own static members are considered, not the inherited ones. Definition at line 318 of file interpret_object_agent.cpp. References NLAISCRIPT::IClassInterpret::getBaseClass(), NLAISCRIPT::CAgentClass::getBaseClass(), NLAISCRIPT::IClassInterpret::getComponent(), NLAISCRIPT::IClassInterpret::getStaticMemberSize(), NLAISCRIPT::CComponent::ObjectName, and sint32. Referenced by NLAIAGENT::CMessageScript::getStaticMemberIndex().
00319 { 00320 sint32 n = 0; 00321 const IClassInterpret *classType = getBaseClass(); 00322 while(classType != NULL) 00323 { 00324 n += classType->getStaticMemberSize(); 00325 classType = classType->getBaseClass(); 00326 } 00327 classType = this; 00328 while(classType != NULL) 00329 { 00330 for(sint32 i = classType->getStaticMemberSize() - 1; i >= 0; i --) 00331 { 00332 if (classType->getComponent(i)->ObjectName != NULL && *classType->getComponent(i)->ObjectName == name) 00333 { 00334 return i + n; 00335 } 00336 } 00337 classType = classType->getBaseClass(); 00338 if(classType != NULL) n -= classType->getStaticMemberSize(); 00339 } 00340 00341 return -1; 00342 } |
|
returns the number of static members specific to the class (not the inherited ones)
Implements NLAISCRIPT::IClassInterpret. Definition at line 411 of file interpret_object_agent.cpp. References sint32.
00412 {
00413 return _Components.size();
00414 }
|
|
Returns the base class of this class.
Definition at line 884 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::getBaseClass().
00885 { 00886 const CAgentClass *base_class = this; 00887 00888 while ( base_class->getBaseClass() ) 00889 { 00890 base_class = (CAgentClass *) base_class->getBaseClass(); 00891 } 00892 return base_class; 00893 } |
|
|
Reimplemented from NLAISCRIPT::IClassInterpret. Reimplemented in NLAISCRIPT::CMessageClass. Definition at line 274 of file interpret_object_agent.h. References uint.
00275 { 00276 uint b = NLAIC::CTypeOfObject::tObject | NLAIC::CTypeOfObject::tAgent; 00277 return NLAIC::CTypeOfObject((uint)IClassInterpret::getTypeClass() | b); 00278 } |
|
Definition at line 238 of file interpret_object_operator.h. References _UpdateCycles, and sint32.
00239 { 00240 return _UpdateCycles; 00241 } |
|
Looks for a variable in the operator's variables vector and returns its position.
Definition at line 578 of file logic/interpret_object_operator.cpp. References NLAILOGIC::IBaseVar::getName(), and sint32.
|
|
Definition at line 203 of file interpret_object_operator.h.
00204 { 00205 return _Vars; 00206 } |
|
|
Init method alows to init the attribut of an object. the maparmetre is in more time a list of IObjectIA. Reimplemented in NLAIFUZZY::CSimpleFuzzyCond, NLAIFUZZY::CFuzzyRule, NLAIFUZZY::CFuzzyRuleSet, NLAIFUZZY::CFuzzyInterval, NLAIFUZZY::CRightFuzzySet, NLAIFUZZY::CTriangleFuzzySet, NLAIFUZZY::CTrapezeFuzzySet, NLAIFUZZY::CLeftFuzzySet, NLAIFUZZY::CFuzzyVar, NLAILOGIC::CFirstOrderAssert, NLAILOGIC::CRule, and NLAILOGIC::CFactPattern. Definition at line 116 of file baseai.cpp. Referenced by NLAIFUZZY::IFuzzySet::runMethodeMember(), and NLAISCRIPT::CLdbNewOpCode::runOpCode().
00117 { 00118 00119 } |
|
Definition at line 830 of file logic/interpret_object_operator.cpp. References _ClassConcVars, _ClassCondVars, _ConcAsserts, _CondAsserts, NLAILOGIC::CFactBase::addAssert(), addPostcondition(), addPrecondition(), NLAILOGIC::CVarSet::addVar(), assert, and size.
00831 { 00832 int i; 00833 for ( i = 0; i < (int) _CondAsserts.size() ; i++ ) 00834 { 00835 NLAIAGENT::CStringVarName name = *(NLAIAGENT::CStringVarName *)_CondAsserts[i]->clone(); 00836 NLAILOGIC::IBaseAssert *assert = inst__FactBase->addAssert( name, _ClassCondVars[i]->size() ); 00837 NLAILOGIC::CFactPattern *pattern = new NLAILOGIC::CFactPattern( assert ); 00838 std::list<const NLAIAGENT::IVarName *>::iterator it_var = _ClassCondVars[i]->begin(); 00839 while ( it_var != _ClassCondVars[i]->end() ) 00840 { 00841 NLAIAGENT::CStringVarName var_name = *(NLAIAGENT::CStringVarName *)(*it_var); 00842 pattern->addVar( new NLAILOGIC::CVar( var_name ) ); 00843 it_var++; 00844 } 00845 addPrecondition( pattern ); 00846 } 00847 00848 for ( i = 0; i < (int) _ConcAsserts.size() ; i++ ) 00849 { 00850 NLAIAGENT::CStringVarName name = *(NLAIAGENT::CStringVarName *)_ConcAsserts[i]->clone(); 00851 NLAILOGIC::IBaseAssert *assert = inst__FactBase->addAssert( name, _ClassConcVars[i]->size() ); 00852 NLAILOGIC::CFactPattern *pattern = new NLAILOGIC::CFactPattern( assert ); 00853 std::list<const NLAIAGENT::IVarName *>::iterator it_var = _ClassConcVars[i]->begin(); 00854 while ( it_var != _ClassConcVars[i]->end() ) 00855 { 00856 NLAIAGENT::CStringVarName var_name = *(NLAIAGENT::CStringVarName *)(*it_var); 00857 pattern->addVar( new NLAILOGIC::CVar( var_name ) ); 00858 it_var++; 00859 } 00860 addPostcondition( pattern ); 00861 } 00862 } |
|
Reimplemented from NLAISCRIPT::IClassInterpret. Definition at line 958 of file interpret_object_agent.cpp. References NLAISCRIPT::CCodeContext::Code, NLAISCRIPT::CAgentClass::findMethod(), NLAISCRIPT::CAgentClass::getBrancheCode(), NLAISCRIPT::CMethodeName::getCode(), NLAISCRIPT::CCodeBrancheRun::run(), NLAISCRIPT::CCodeContext::Self, and sint32.
00959 { 00960 NLAIAGENT::CStringVarName staticinit_func_name("StaticInit"); 00961 sint32 id_func = findMethod( staticinit_func_name, NLAISCRIPT::CParam() ); 00962 if ( id_func != -1 ) 00963 { 00964 NLAISCRIPT::CStackPointer stack; 00965 NLAISCRIPT::CStackPointer heap; 00966 NLAISCRIPT::CCodeContext codeContext(stack,heap,NULL,this, NLAISCRIPT::CCallPrint::inputOutput); 00967 codeContext.Self = this; 00968 NLAISCRIPT::CCodeBrancheRun *o = (NLAISCRIPT::CCodeBrancheRun *)getBrancheCode( id_func ).getCode(); 00969 codeContext.Code = o; 00970 o->run(codeContext); 00971 } 00972 } |
|
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 in NLAIAGENT::IVector, NLAIAGENT::CLocalAgentMail, NLAIAGENT::INombreDefine, NLAIAGENT::IBaseGroupType, and NLAIAGENT::CMessageScript. Definition at line 246 of file baseai.cpp. References sint32. Referenced by NLAISCRIPT::CCompilateur::getValidateHierarchyBase(), NLAIAGENT::CLocalAgentMail::isClassInheritedFrom(), NLAIAGENT::CActorScript::Launch(), NLAIAGENT::CFsmScript::setTopLevel(), and NLAIAGENT::CActorScript::setTopLevel().
00247 {
00248 return -1;
00249 }
|
|
Defines the base class of this class.
Definition at line 678 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, NLAISCRIPT::IClassInterpret::getClassName(), NLAIC::IPointerGestion::getClassName(), NLAIAGENT::IVarName::getString(), NLAIC::IBasicType::getType(), and sint32. Referenced by NLAIAGENT::CActorScript::activate(), NLAIAGENT::CMessageScript::isClassInheritedFrom(), NLAIAGENT::CAgentScript::isClassInheritedFrom(), NLAISCRIPT::CAgentClass::isMessageFunc(), and NLAIAGENT::CActorScript::unActivate().
00679 { 00680 for(sint32 i = 0; i < (sint32)_VTable.size(); i ++) 00681 { 00682 #ifdef NL_DEBUG 00683 const NLAIAGENT::IObjectIA *o = _VTable[i]; 00684 #endif 00685 const NLAIAGENT::IVarName *thisName = _VTable[i]->getClassName(); 00686 if(thisName == NULL) 00687 { 00688 //thisName = 00689 const NLAIC::CIdentType *id = &_VTable[i]->getType(); 00690 if(id == NULL) 00691 { 00692 if(getClassName() != NULL) 00693 { 00694 if(*getClassName() == className) return i; 00695 else return -1; 00696 } 00697 else return -1; 00698 } 00699 else 00700 if(strcmp((const char *)*id , className.getString()) == 0) 00701 { 00702 return i; 00703 } 00704 } 00705 else 00706 { 00707 if(*(_VTable[i]->getClassName()) == className) 00708 { 00709 return i; 00710 } 00711 } 00712 } 00713 return -1; 00714 } |
|
|
Definition at line 825 of file interpret_object_agent.cpp. References NLAISCRIPT::IClassInterpret::getClassName().
00826 { 00827 const CAgentClass &i = (const CAgentClass &)a; 00828 return getClassName() == i.getClassName(); 00829 } |
|
If the result is true the object is loclal else its a representation of an object on the server. By the method return true.
Definition at line 356 of file baseai.cpp.
00357 { 00358 return true; 00359 } |
|
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 in NLAIAGENT::IBasicAgent, NLAIAGENT::IVector, NLAIAGENT::CLocalAgentMail, NLAIAGENT::INombreDefine, NLAIAGENT::CPairType, NLAIAGENT::IBaseGroupType, NLAIAGENT::CVectorGroupType, NLAIAGENT::CProxyAgentMail, NLAIAGENT::CAgentTimerHandle, NLAIAGENT::IListBasicManager, NLAIAGENT::CMessageScript, and NLAIAGENT::IMessageBase. Definition at line 206 of file baseai.cpp. References _CONSTRUCTOR_, _RUN_, _SEND_, param, r, NLAIAGENT::IObjectIA::run(), and NLAIAGENT::TQueue. Referenced by NLAIAGENT::CAgentWatchTimer::addAttrib(), NLAISCRIPT::CCompilateur::findMethode(), NLAISCRIPT::CAgentClass::isMember(), NLAIAGENT::CLocalAgentMail::isMember(), and NLAISCRIPT::CFindRunMsg::runOpCode().
00207 { 00208 static CStringVarName send(_SEND_); 00209 static CStringVarName constructor(_CONSTRUCTOR_); 00210 static CStringVarName run(_RUN_); 00211 static CStringVarName statM("GetStaticMember"); 00212 00213 if(*methodName == send) 00214 { 00215 TQueue r; 00216 CObjectType *c = new CObjectType(new NLAIC::CIdentType(NLAIC::CIdentType::VoidType)); 00217 r.push(CIdMethod(0,0.0,NULL,c)); 00218 return r; 00219 } 00220 else 00221 if(*methodName == constructor && !((const NLAISCRIPT::CParam &)param).size()) 00222 { 00223 TQueue r; 00224 CObjectType *c = new CObjectType(new NLAIC::CIdentType(NLAIC::CIdentType::VoidType)); 00225 r.push(CIdMethod(1,0.0,NULL,c)); 00226 return r; 00227 } 00228 else 00229 if(*methodName == run && !((const NLAISCRIPT::CParam &)param).size()) 00230 { 00231 TQueue r; 00232 CObjectType *c = new CObjectType(new NLAIC::CIdentType(NLAIC::CIdentType::VoidType)); 00233 r.push(CIdMethod(2,0.0,NULL,c)); 00234 return r; 00235 } 00236 if(*methodName == statM && ((const NLAISCRIPT::CParam &)param).size()) 00237 { 00238 TQueue r; 00239 CObjectType *c = new CObjectType(new NLAIC::CIdentType(*IAgent::IdAgent)); 00240 r.push(CIdMethod(3,0.0,NULL,c)); 00241 return r; 00242 } 00243 return TQueue(); 00244 } |
|
Definition at line 540 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, NLAISCRIPT::IAgentMultiClass::getBaseObjectInstance(), NLAISCRIPT::CAgentClass::getPrivateMember(), NLAIAGENT::IVarName::getString(), NLAIAGENT::IObjectIA::isMember(), param, q, sint32, and NLAIAGENT::TQueue. Referenced by NLAIAGENT::CActorScript::activate(), NLAIAGENT::CActorScript::failure(), NLAIAGENT::CActorScript::pause(), NLAIAGENT::CActorScript::restart(), NLAIAGENT::CActorScript::success(), and NLAIAGENT::CActorScript::unActivate().
00541 { 00542 00543 #ifdef NL_DEBUG 00544 if ( className != NULL ) 00545 const char *dbg_class_name = className->getString(); 00546 const char *dbg_method_name = methodName->getString(); 00547 #endif 00548 00549 NLAIAGENT::TQueue q; 00550 const IClassInterpret *classType = this; 00551 NLAIAGENT::CIdMethod k; 00552 00553 if( className != NULL ) 00554 { 00555 classType = NULL; 00556 for(sint32 i = 1; i < (sint32)_VTable.size(); i ++) 00557 { 00558 if(*_VTable[i]->getClassName() == *className) 00559 { 00560 classType = _VTable[i]; 00561 } 00562 } 00563 } 00564 00565 if( classType != NULL ) 00566 { 00567 q= getPrivateMember(className,methodName,param); 00568 } 00569 00570 if( !q.size() ) 00571 { 00572 return getBaseObjectInstance()->isMember(className,methodName,param); 00573 } 00574 return q; 00575 } |
|
Verifies if the preconditions are validated.
Definition at line 211 of file logic/interpret_object_operator.cpp. References NLAILOGIC::CFactBase::getAssertFacts(), propagate(), res, and sint32.
00212 { 00213 std::list<NLAILOGIC::CFact *> *facts = new std::list<NLAILOGIC::CFact *>; 00214 for (sint32 i = 0; i < (sint32) _Conds.size(); i++ ) 00215 { 00216 std::list<NLAILOGIC::CFact *> *fa = fb->getAssertFacts( _Conds[i] ); 00217 while ( fa->size() ) 00218 { 00219 facts->push_back( fa->front() ); 00220 fa->pop_front(); 00221 } 00222 delete fa; 00223 } 00224 std::list<NLAILOGIC::CFact *> *res = propagate( *facts ); 00225 bool is_valid = !res->empty(); 00226 while ( res->size() ) 00227 { 00228 #ifdef NL_DEBUG 00229 00230 #endif 00231 res->front()->release(); 00232 res->pop_front(); 00233 } 00234 delete res; 00235 00236 while ( facts->size() ) 00237 { 00238 facts->front()->release(); 00239 facts->pop_front(); 00240 } 00241 delete facts; 00242 00243 return is_valid; 00244 } |
|
Definition at line 743 of file logic/interpret_object_operator.cpp. References _CondCode, NLAISCRIPT::CCodeContext::Code, NLAIC::IBasicType::getType(), NLAIC::IPointerGestion::incRef(), NLAIAGENT::IObjetOp::isTrue(), r, NLAIC::IPointerGestion::release(), sint, NLAISCRIPT::CCodeContext::Stack, and uint32.
00744 { 00745 NLAISCRIPT::CCodeContext &context = (NLAISCRIPT::CCodeContext &)*c; 00746 00747 for ( int i = 0; i < (int) _CondCode.size(); i++ ) 00748 { 00749 NLAISCRIPT::IOpCode *opPtr = _CondCode[ i ]; 00750 00751 IObjectIA::CProcessResult r; 00752 if(opPtr != NULL) 00753 { 00754 NLAISCRIPT::IOpCode &op = *opPtr; 00755 NLAISCRIPT::CCodeBrancheRun *opTmp = context.Code; 00756 int ip; 00757 if(context.Code != NULL) ip = (uint32)*context.Code; 00758 else ip =0; 00759 context.Code = (NLAISCRIPT::CCodeBrancheRun *)&op; 00760 *context.Code = 0; 00761 00762 #ifdef NL_DEBUG 00763 sint sp = context.Stack.CIndexStackPointer::operator int (); 00764 #endif 00765 r = ((NLAISCRIPT::ICodeBranche *)opPtr)->run(context); 00766 00767 *context.Code = ip; 00768 context.Code = opTmp; 00769 00770 NLAIAGENT::IObjetOp *result = (NLAIAGENT::IObjetOp *)context.Stack[(int)context.Stack]; 00771 result->incRef(); 00772 context.Stack--; 00773 00774 #ifdef NL_DEBUG 00775 sint u = context.Stack.CIndexStackPointer::operator int (); 00776 if(sp != u) 00777 { 00778 00779 throw; 00780 } 00781 #endif 00782 00783 if ( result != NULL) 00784 { 00785 #ifdef NL_DEBUG 00786 const char *dbg_return_type = (const char *) result->getType(); 00787 00788 #endif 00789 bool br = !result->isTrue(); 00790 result->release(); 00791 00792 if ( br ) 00793 return false; 00794 } 00795 00796 } 00797 } 00798 return true; 00799 } |
|
Load the class from a stream. Implements NLAIC::IBasicInterface. Definition at line 783 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Inheritance, NLAISCRIPT::CAgentClass::_Methode, NLAIC::IPointerGestion::incRef(), NLAIC::IBasicInterface::load(), NLAISCRIPT::CMethodeName::load(), NLAISCRIPT::CComponent::load(), NLMISC::IStream::serial(), and sint32.
00784 { 00785 // Saves static components 00786 sint32 _NbComponents; 00787 is.serial( _NbComponents ); 00788 sint32 i; 00789 for ( i = 0; i < (sint32) _NbComponents ; i++ ) 00790 { 00791 NLAIC::CIdentTypeAlloc id; 00792 is.serial( id ); 00793 CComponent *comp = (CComponent *)id.allocClass(); 00794 comp->load(is); 00795 _Components.push_back( comp ); 00796 } 00797 00798 for ( i = 0; i < (sint32) _Methode.size(); i++) 00799 { 00800 _Methode[i].Method->release(); 00801 } 00802 _Methode.clear(); 00803 00804 // Loads class methods 00805 sint32 nb_methods; 00806 is.serial( nb_methods ); 00807 for ( i = 0; i < (sint32) nb_methods; i++) 00808 { 00809 NLAIC::CIdentTypeAlloc id; 00810 is.serial( id ); 00811 CMethodeName *methode = (CMethodeName *)id.allocClass(); 00812 methode->load(is); 00813 methode->incRef(); 00814 _Methode.push_back( CMethodType(methode)); 00815 } 00816 00817 NLAIC::CIdentTypeAlloc id; 00818 is.serial( id ); 00819 _Inheritance = (NLAIAGENT::IVarName *) id.allocClass(); 00820 _Inheritance->load( is ); 00821 _Inheritance->incRef(); 00822 } |
|
Definition at line 255 of file interpret_object_operator.h. References _TrigMsgPerf, and sint32.
00256 { 00257 return _TrigMsgPerf.size(); 00258 } |
|
This function allow a new instance, that mean that the class is a class factory. Reimplemented from NLAISCRIPT::CAgentClass. Definition at line 178 of file logic/interpret_object_operator.cpp. References COperatorClass().
00179 { 00180 NLAIC::IBasicType *instance = new COperatorClass(); 00181 return instance; 00182 } |
|
Lot of algo use this function to determine the equality between 2 class, in particular the extraction from stl list. the == operator call the bool isEqual(const IBasicObjectIA &a) const member method to determine the equality between tow class. Definition at line 134 of file baseai.cpp. References NLAIC::IBasicType::getType(), and NLAIAGENT::IBasicObjectIA::isEqual().
|
|
Priority of the operator.
Definition at line 450 of file logic/interpret_object_operator.cpp.
00451 {
00452 return 0.0;
00453 }
|
|
Definition at line 370 of file logic/interpret_object_operator.cpp. References getAssertPos(), and sint32. Referenced by isValid().
00371 { 00372 std::list<NLAILOGIC::CFact *> *conflicts = new std::list<NLAILOGIC::CFact *>; 00373 std::list< NLAILOGIC::CValueSet *> liaisons; 00374 NLAILOGIC::CValueSet *empty = new NLAILOGIC::CValueSet( _Vars.size() ); 00375 liaisons.push_back( empty ); 00376 00377 std::list<NLAILOGIC::CFact *>::iterator it_f = facts.begin(); 00378 while ( it_f != facts.end() ) 00379 { 00380 std::vector<sint32> pos_asserts; 00381 getAssertPos( (*it_f)->getAssert() , _Conds, pos_asserts); 00382 for (sint32 i = 0; i < (sint32) pos_asserts.size(); i++ ) 00383 { 00384 /* std::list<NLAILOGIC::CValueSet *> *links = propagate( liaisons, *it_f, _PosVarsCond[ pos_asserts[i] ] ); 00385 if ( links ) 00386 { 00387 while ( links->size() ) 00388 { 00389 for (sint32 i = 0; i < (sint32) _Concs.size(); i++ ) 00390 { 00391 NLAILOGIC::CFact *r = buildFromVars( _Concs[i], _PosVarsConc[i], links->front() ); 00392 char buf[1024]; 00393 r->getDebugString( buf ); 00394 // Tests if the fact is already in the conflicts list 00395 bool found = false; 00396 std::list<NLAILOGIC::CFact *>::iterator it_c = conflicts->begin(); 00397 while ( ! found && it_c != conflicts->end() ) 00398 { 00399 found = (**it_c) == *r; 00400 it_c++; 00401 } 00402 if ( !found ) 00403 { 00404 char buf[1024]; 00405 r->getDebugString( buf ); 00406 conflicts->push_back( r ); 00407 } 00408 } 00409 links->front()->release(); 00410 links->pop_front(); 00411 } 00412 delete links; 00413 } 00414 */ 00415 } 00416 it_f++; 00417 } 00418 00419 while ( liaisons.size() ) 00420 { 00421 liaisons.front()->release(); 00422 liaisons.pop_front(); 00423 } 00424 00425 return conflicts; 00426 } |
|
Adds a static component to an agent.
Definition at line 280 of file interpret_object_agent.cpp. References NLAIAGENT::CStringVarName::clone(), NLAIC::IBasicType::clone(), NLAISCRIPT::CComponent::ObjectName, NLAISCRIPT::CComponent::RegisterName, and sint32.
00281 { 00282 CComponent *c = new CComponent(); 00283 c->RegisterName = (NLAIAGENT::IVarName *)type_name.clone(); 00284 c->ObjectName = (NLAIAGENT::IVarName *)field_name.clone(); 00285 _Components.push_back(c); 00286 return _Components.size() - 1; 00287 } |
|
|
Definition at line 881 of file logic/interpret_object_operator.cpp. References _TrigMsgClass, _TrigMsgPerf, _TrigMsgPos, _TrigMsgVarname, getDebugString(), NLAISCRIPT::CAgentClass::getInheritedStaticMemberIndex(), NLAISCRIPT::CAgentClass::registerComponent(), sint32, and NLAIC::stringGetBuild().
00882 { 00883 try 00884 { 00885 00886 // Checks if a trigger with the same message or var doesn't already exist 00887 std::vector<std::string>::iterator it_s = _TrigMsgVarname.begin(); 00888 while ( it_s != _TrigMsgVarname.end() ) 00889 { 00890 if ( msg_varname == *it_s ) 00891 { 00892 std::string debugString; 00893 std::string text; 00894 getDebugString(debugString); 00895 text += NLAIC::stringGetBuild("MessageCond(%s) defined twice in operator class '%s'",msg_varname.c_str(), debugString.c_str()); 00896 throw NLAIE::CExceptionNotImplemented(text.c_str()); 00897 } 00898 it_s++; 00899 } 00900 00901 NLAIC::CIdentType id_class( msg_class.c_str() ); 00902 _TrigMsgClass.push_back( id_class ); 00903 _TrigMsgPerf.push_back( perf ); 00904 _TrigMsgVarname.push_back( msg_varname ); 00905 00906 // Looks in the class components if the var already exists 00907 sint32 id_var = getInheritedStaticMemberIndex( NLAIAGENT::CStringVarName((const char *) msg_varname.c_str()) ); 00908 00909 if ( id_var != -1 ) 00910 { 00911 // If it exists, stores its index 00912 _TrigMsgPos.push_back( id_var ); 00913 } 00914 else 00915 { 00916 // If it doesn't exist, registers the var as a component of the class 00917 NLAIAGENT::CStringVarName class_name( (const char *) msg_class.c_str() ); 00918 NLAIAGENT::CStringVarName var_name( (const char *) msg_varname.c_str() ); 00919 registerComponent( class_name, var_name ); 00920 _TrigMsgPos.push_back( getInheritedStaticMemberIndex( NLAIAGENT::CStringVarName((const char *) msg_varname.c_str()) ) ); 00921 } 00922 } 00923 catch (NLAIE::IException &err) 00924 { 00925 throw CExceptionHaveNoType( err.what() ); 00926 } 00927 } |
|
|
Some where Run method define the process of the agen. Implements NLAIAGENT::IObjectIA. Definition at line 34 of file interpret_object_agent.cpp.
00035 { 00036 return NLAIAGENT::IObjectIA::ProcessRun; 00037 } |
|
|
|
Some where Run method define the process of the agen. Reimplemented in NLAIAGENT::IAgent, and NLAIAGENT::CAgentScript. Definition at line 163 of file baseai.cpp. References NLAIC::IBasicType::getType(), and NLAIC::stringGetBuild(). Referenced by NLAIAGENT::IAgent::runChildrenStepByStep().
00164 { 00165 std::string text; 00166 text = NLAIC::stringGetBuild("const CProcessResult &IObjectIA::runStep() note implementaited for the '%s' interface",(const char *)getType()); 00167 throw NLAIE::CExceptionNotImplemented(text.c_str()); 00168 return IObjectIA::ProcessNotComplit; 00169 } |
|
Save the class in a stream. Implements NLAIC::IBasicInterface. Definition at line 760 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Inheritance, NLAISCRIPT::CAgentClass::_Methode, NLAIC::IBasicType::getType(), NLAIC::IBasicInterface::save(), NLMISC::IStream::serial(), sint32, and size.
00761 { 00762 // Saves static components 00763 sint32 size = _Components.size(); 00764 os.serial( size ); 00765 sint32 i; 00766 for ( i = 0; i < (sint32) _Components.size() ; i++ ) 00767 { 00768 _Components[i]->save( os ); 00769 } 00770 00771 // Saves class methods 00772 size = _Methode.size(); 00773 os.serial( size ); 00774 for ( i = 0; i < (sint32) _Methode.size(); i++) 00775 { 00776 os.serial( (NLAIC::CIdentType &)_Methode[i].Method->getType() ); 00777 _Methode[i].Method->save( os ); 00778 } 00779 os.serial( (NLAIC::CIdentType &) _Inheritance->getType() ); 00780 _Inheritance->save( os ); 00781 } |
|
This method allow to send a message to an compoment given by an string IVarName. Reimplemented in NLAIAGENT::CProxyAgentMail, NLAIAGENT::CAgentScript, and NLAIAGENT::IMessageBase. Definition at line 334 of file baseai.cpp. References NLAIAGENT::IVarName::getString(), NLAIC::IBasicType::getType(), and NLAIC::stringGetBuild().
00335 { 00336 std::string text; 00337 text = NLAIC::stringGetBuild("method 'sendMessage(%s,const IObjectIA &)' '%s' interface",name.getString(), (const char *)getType()); 00338 throw NLAIE::CExceptionNotImplemented(text.c_str()); 00339 return CProcessResult(); 00340 } |
|
The method sendMessage(const IObjectIA &msg) allow us to achive a message defined in msg. Reimplemented in NLAIAGENT::CActorScript, NLAIAGENT::CLocalAgentMail, NLAIAGENT::CProxyAgentMail, NLAIAGENT::CAgentScript, NLAIAGENT::CAgentTimerHandle, NLAIAGENT::IConnectIA, NLAIAGENT::IListManager, NLAIAGENT::CMainAgentScript, and NLAIAGENT::IMessageBase. Definition at line 342 of file baseai.cpp. References NLAIC::IBasicType::getType(), and NLAIC::stringGetBuild(). Referenced by NLAIAGENT::IObjectIA::runMethodeMember(), NLAIAGENT::CAgentScript::sendBroadCast(), NLAIAGENT::IMessageBase::sendMessage(), NLAIAGENT::IListManager::sendMessage(), and NLAIAGENT::CAgentScript::sendMessage().
00343 { 00344 std::string text; 00345 text = NLAIC::stringGetBuild("method 'sendMessage(const IObjectIA &)' '%s' interface", (const char *)getType()); 00346 throw NLAIE::CExceptionNotImplemented(text.c_str()); 00347 return CProcessResult(); 00348 } |
|
Reimplemented from NLAIC::IPointerGestion. Definition at line 328 of file abstract_interface.h. References NLAIC::IBasicInterface::load(), and NLAIC::IBasicInterface::save().
|
|
Set the base method count.
Definition at line 71 of file interpret_object_agent.h. References NLAISCRIPT::IAgentMultiClass::_BaseMethodCount, and sint32. Referenced by NLAISCRIPT::CActorClass::CActorClass(), NLAISCRIPT::CAgentClass::CAgentClass(), NLAISCRIPT::CFsmClass::CFsmClass(), NLAISCRIPT::CManagerClass::CManagerClass(), NLAISCRIPT::CMessageClass::CMessageClass(), COperatorClass(), and NLAISCRIPT::CSeqFsmClass::CSeqFsmClass().
00072 { 00073 _BaseMethodCount = n; 00074 } |
|
Set the C++ base class representative pointer. We have to incRef() before.
Definition at line 83 of file interpret_object_agent.h. References NLAISCRIPT::IAgentMultiClass::_BaseObjectInstance. Referenced by NLAISCRIPT::CActorClass::CActorClass(), NLAISCRIPT::CAgentClass::CAgentClass(), NLAISCRIPT::CCancelGoalMsgClass::CCancelGoalMsgClass(), NLAISCRIPT::CFactMsgClass::CFactMsgClass(), NLAISCRIPT::CFailureMsgClass::CFailureMsgClass(), NLAISCRIPT::CFsmClass::CFsmClass(), NLAISCRIPT::CGetValueMsgClass::CGetValueMsgClass(), NLAISCRIPT::CGoalMsgClass::CGoalMsgClass(), NLAISCRIPT::CManagerClass::CManagerClass(), NLAISCRIPT::CMessageClass::CMessageClass(), NLAISCRIPT::CMsgNotifyParentClass::CMsgNotifyParentClass(), NLAISCRIPT::COnChangeMsgClass::COnChangeMsgClass(), COperatorClass(), NLAISCRIPT::CSeqFsmClass::CSeqFsmClass(), NLAISCRIPT::CSetValueMsgClass::CSetValueMsgClass(), and NLAISCRIPT::CSuccessMsgClass::CSuccessMsgClass().
00084 { 00085 _BaseObjectInstance = o; 00086 } |
|
Definition at line 96 of file interpret_object.cpp. References NLAIC::IBasicType::clone(), and NLAIC::IPointerGestion::release(). Referenced by NLAISCRIPT::CCancelGoalMsgClass::CCancelGoalMsgClass(), NLAISCRIPT::CFactMsgClass::CFactMsgClass(), NLAISCRIPT::CFailureMsgClass::CFailureMsgClass(), NLAISCRIPT::CGetValueMsgClass::CGetValueMsgClass(), NLAISCRIPT::CGoalMsgClass::CGoalMsgClass(), NLAISCRIPT::CMsgNotifyParentClass::CMsgNotifyParentClass(), NLAISCRIPT::CSetValueMsgClass::CSetValueMsgClass(), and NLAISCRIPT::CSuccessMsgClass::CSuccessMsgClass().
00097 { 00098 if(_Name != NULL) 00099 { 00100 _Name->release(); 00101 } 00102 _Name = (NLAIAGENT::IVarName *)name.clone(); 00103 00104 } |
|
Sets the comment for the operator.
Definition at line 865 of file logic/interpret_object_operator.cpp.
|
|
Definition at line 953 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_ConstructorIndex, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), index, and sint32.
00954 { 00955 _ConstructorIndex = index + getBaseMethodCount(); 00956 } |
|
Definition at line 698 of file logic/interpret_object_operator.cpp. References _Goal, _GoalAssert, _GoalPosVar, _GoalVars, assert, NLAISCRIPT::CAgentClass::getComponentIndex(), NLAISCRIPT::CAgentClass::registerComponent(), NLAIC::IPointerGestion::release(), NLAILOGIC::CGoal::setArgs(), and sint32.
00699 { 00700 _GoalAssert = (const NLAIAGENT::IVarName *) assert->clone(); 00701 _GoalVars = args; 00702 00703 if ( _Goal != NULL ) 00704 { 00705 _Goal->release(); 00706 } 00707 00708 _Goal = new NLAILOGIC::CGoal( *(NLAIAGENT::CStringVarName *) assert->clone() ); 00709 00710 std::list<const NLAIAGENT::IVarName *>::iterator it_var = args.begin(); 00711 while ( it_var != args.end() ) 00712 { 00713 // Looks in the class components if the var already exists 00714 sint32 id_var = getComponentIndex( **it_var ); 00715 00716 if ( id_var != -1 ) 00717 { 00718 // If it exists, stores its index 00719 _GoalPosVar.push_back( id_var ); 00720 } 00721 else 00722 { 00723 // If it doesn't exist, registers the var as a component of the class 00724 NLAIAGENT::CStringVarName var_name("Var"); 00725 registerComponent( var_name , (const NLAIAGENT::CStringVarName &) **it_var ); 00726 // _Vars.push_back( (NLAILOGIC::IBaseVar *)(*it_cond)->clone() ); 00727 _GoalPosVar.push_back( getComponentIndex(**it_var) ); 00728 } 00729 it_var++; 00730 } 00731 00732 std::list<NLAIAGENT::IObjectIA *> arg_list; 00733 while ( !args.empty() ) 00734 { 00735 arg_list.push_back( (NLAIAGENT::IObjectIA *) args.front()->clone() ); 00736 ( (NLAIAGENT::IObjectIA *)args.front() )->release(); 00737 args.pop_front(); 00738 } 00739 00740 _Goal->setArgs( arg_list ); 00741 } |
|
Sets the goal the operator tries to achieve.
Definition at line 692 of file logic/interpret_object_operator.cpp. References _Goal, and NLAIAGENT::CStringVarName::clone().
00693 { 00694 00695 _Goal = new NLAILOGIC::CGoal( *(NLAIAGENT::CStringVarName *) g.clone()); 00696 } |
|
Returns the name of the base class of this class.
Implements NLAISCRIPT::IClassInterpret. Definition at line 836 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_Inheritance, NLAIC::IBasicType::clone(), and NLAIC::IPointerGestion::release(). Referenced by NLAISCRIPT::CCancelGoalMsgClass::CCancelGoalMsgClass(), NLAISCRIPT::CFactMsgClass::CFactMsgClass(), NLAISCRIPT::CFailureMsgClass::CFailureMsgClass(), NLAISCRIPT::CFsmClass::CFsmClass(), NLAISCRIPT::CGetValueMsgClass::CGetValueMsgClass(), NLAISCRIPT::CGoalMsgClass::CGoalMsgClass(), NLAISCRIPT::CMsgNotifyParentClass::CMsgNotifyParentClass(), NLAISCRIPT::COnChangeMsgClass::COnChangeMsgClass(), NLAISCRIPT::CSetValueMsgClass::CSetValueMsgClass(), and NLAISCRIPT::CSuccessMsgClass::CSuccessMsgClass().
00837 { 00838 if(_Inheritance != NULL) 00839 { 00840 _Inheritance->release(); 00841 } 00842 _Inheritance = (NLAIAGENT::IVarName *)name.clone(); 00843 00844 } |
|
Definition at line 243 of file interpret_object_operator.h.
00244 { 00245 _Priority = p; 00246 } |
|
set the absolut index of the run() method of this class.
Implements NLAISCRIPT::IClassInterpret. Definition at line 943 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_RunIndex, NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), index, and sint32.
00944 { 00945 _RunIndex = index + getBaseMethodCount(); 00946 } |
|
to cahnge a given components given by an index. Definition at line 268 of file baseai.h. References NLAIAGENT::IObjectIA::getStaticMemberIndex(). Referenced by NLAISCRIPT::CAffHeapMemberiOpCode::runOpCode(), NLAISCRIPT::CAffMemberiOpCode::runOpCode(), and NLAIAGENT::CLocalAgentMail::setStaticMember().
00269 { 00270 return setStaticMember(getStaticMemberIndex(compName),change); 00271 } |
|
to cahnge a given components given by a string. Reimplemented from NLAIAGENT::IObjectIA. Definition at line 974 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, NLAIC::IBasicType::getDebugString(), index, NLAISCRIPT::CComponent::ObjectName, NLAISCRIPT::CComponent::RegisterName, sint32, and NLAISCRIPT::CComponent::StaticValue.
00975 { 00976 #ifdef NL_DEBUG 00977 std::string buf; 00978 obj->getDebugString(buf); 00979 #endif 00980 sint32 nb_components = 0; 00981 std::vector<const CAgentClass *>::const_iterator it_bc = _VTable.begin(); 00982 while ( it_bc != _VTable.end() && nb_components <= index ) 00983 { 00984 nb_components = nb_components + (*it_bc)->getStaticMemberSize(); 00985 it_bc++; 00986 } 00987 it_bc--; 00988 CComponent *component = (*it_bc)->getComponent( index - ( nb_components - (*it_bc)->getStaticMemberSize() ) ); 00989 #ifdef NL_DEBUG 00990 std::string buf2, buf3; 00991 component->RegisterName->getDebugString(buf2); 00992 component->ObjectName->getDebugString(buf3); 00993 #endif 00994 00995 if(component->StaticValue != obj ) component->StaticValue = obj; 00996 return false; 00997 return true; 00998 } |
|
Definition at line 90 of file interpret_object.cpp. References NLAISCRIPT::IClassInterpret::_IdType, NLAIAGENT::IVarName::getString(), and NLAIC::IPointerGestion::release().
00091 { 00092 if(_IdType != NULL) _IdType->release(); 00093 _IdType = new NLAIC::CIdentType( name.getString(), CClassInterpretFactory( this ), NLAIC::CTypeOfObject::tAgent, 0); 00094 } |
|
Definition at line 83 of file interpret_object.cpp. References NLAISCRIPT::IClassInterpret::_IdType, and NLAIC::IPointerGestion::release(). Referenced by NLAISCRIPT::CAgentClass::CAgentClass(), and NLAISCRIPT::CCompilateur::RegisterClass().
|
|
Definition at line 233 of file interpret_object_operator.h. References _UpdateCycles, and sint32.
00234 { 00235 _UpdateCycles = cycles; 00236 } |
|
Build the table that translates an agent's message processing function index into it's child equivalent message processing function index. Builds components included inherited ones Counts the number of scripted components Implements NLAISCRIPT::IClassInterpret. Definition at line 721 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, and sint32. Referenced by NLAISCRIPT::CAgentClass::buildVMethode(), NLAIAGENT::CMessageScript::getMethode(), and NLAIAGENT::CAgentScript::getMethode().
00722 {
00723 return _VTable.size();
00724 }
|
|
Dependencies failure and success notification These functions are called by other operators or goals who failed or succeeded Definition at line 463 of file logic/interpret_object_operator.cpp.
00464 { 00465 } |
|
Own success and failure functions These functions tell other operators and goals that might be waiting for the completion of this one Definition at line 455 of file logic/interpret_object_operator.cpp.
00456 { 00457 } |
|
Definition at line 101 of file interpret_object_operator.h.
00101 {return NULL;}
|
|
Definition at line 246 of file logic/interpret_object_operator.cpp. References _Concs, getAssertPos(), NLAIC::IPointerGestion::release(), and sint32. Referenced by backward().
00247 { 00248 NLAILOGIC::CValueSet *unified = new NLAILOGIC::CValueSet( _Vars.size() ); 00249 std::list<NLAILOGIC::CFact *>::iterator it_f = facts.begin(); 00250 while ( it_f != facts.end() ) 00251 { 00252 std::vector<sint32> pos_assert; 00253 getAssertPos( (*it_f)->getAssert(), _Concs, pos_assert ); 00254 for (sint32 pos = 0; pos < (sint32) pos_assert.size(); pos++) 00255 { 00256 for ( sint32 ivar = 0; ivar < (sint32) _PosVarsConc[ pos_assert[pos] ].size(); ivar++ ) 00257 { 00258 sint32 l_pos = _PosVarsConc[ pos_assert[pos] ][ivar]; 00259 00260 NLAIAGENT::IObjectIA *l_val = (*unified)[ l_pos ]; 00261 NLAIAGENT::IObjectIA *r_val = (**it_f)[ ivar ]; 00262 00263 if ( !l_val ) 00264 { 00265 if ( r_val ) 00266 { 00267 unified->setValue( l_pos, r_val ); 00268 } 00269 } 00270 else 00271 { 00272 if ( r_val && ( l_val != r_val ) ) 00273 { 00274 unified->release(); 00275 return NULL; 00276 } 00277 } 00278 } 00279 } 00280 it_f++; 00281 } 00282 return unified; 00283 } |
|
Definition at line 285 of file logic/interpret_object_operator.cpp. References getAssertPos(), NLAIC::IPointerGestion::release(), and sint32. Referenced by forward().
00286 { 00287 NLAILOGIC::CValueSet *unified = new NLAILOGIC::CValueSet( _Vars.size() ); 00288 std::list<NLAILOGIC::CFact *>::iterator it_f = facts.begin(); 00289 while ( it_f != facts.end() ) 00290 { 00291 std::vector<sint32> pos_assert; 00292 getAssertPos( (*it_f)->getAssert(), _Conds, pos_assert ); 00293 for (sint32 pos = 0; pos < (sint32) pos_assert.size(); pos++) 00294 { 00295 for ( sint32 ivar = 0; ivar < (sint32) _PosVarsCond[ pos_assert[pos] ].size(); ivar++ ) 00296 { 00297 sint32 l_pos = _PosVarsCond[ pos_assert[pos] ][ivar]; 00298 00299 NLAIAGENT::IObjectIA *l_val = (*unified)[ l_pos ]; 00300 NLAIAGENT::IObjectIA *r_val = (**it_f)[ ivar ]; 00301 00302 if ( !l_val ) 00303 { 00304 if ( r_val ) 00305 { 00306 unified->setValue( l_pos, r_val ); 00307 } 00308 } 00309 else 00310 { 00311 if ( r_val && ( l_val != r_val ) ) 00312 { 00313 unified->release(); 00314 return NULL; 00315 } 00316 } 00317 } 00318 } 00319 it_f++; 00320 } 00321 return unified; 00322 } |
|
Tries to unify an instaciation of the operator's variables with a new CFact.
Definition at line 428 of file logic/interpret_object_operator.cpp. References NLAILOGIC::CValueSet::unify().
00429 { 00430 NLAILOGIC::CValueSet *result; 00431 00432 if ( (result = fp->unify( vals, pos_vals )) ) 00433 return result; 00434 else 00435 { 00436 delete result; 00437 return NULL; 00438 } 00439 } |
|
Definition at line 1000 of file interpret_object_agent.cpp. References NLAISCRIPT::CAgentClass::_VTable, NLAIC::IBasicType::getDebugString(), index, NLAISCRIPT::CComponent::ObjectName, NLAISCRIPT::CComponent::RegisterName, sint32, and NLAISCRIPT::CComponent::StaticValue. Referenced by NLAIAGENT::CAgentScript::runMethodBase().
01001 { 01002 #ifdef NL_DEBUG 01003 std::string buf; 01004 obj->getDebugString(buf); 01005 #endif 01006 sint32 nb_components = 0; 01007 std::vector<const CAgentClass *>::const_iterator it_bc = _VTable.begin(); 01008 while ( it_bc != _VTable.end() && nb_components <= index ) 01009 { 01010 nb_components = nb_components + (*it_bc)->getStaticMemberSize(); 01011 it_bc++; 01012 } 01013 it_bc--; 01014 CComponent *component = (*it_bc)->getComponent( index - ( nb_components - (*it_bc)->getStaticMemberSize() ) ); 01015 #ifdef NL_DEBUG 01016 std::string buf2, buf3; 01017 component->RegisterName->getDebugString(buf2); 01018 component->ObjectName->getDebugString(buf3); 01019 #endif 01020 01021 (*component->StaticValue) = *obj; 01022 } |
|
Definition at line 144 of file interpret_object_operator.h. Referenced by addBoolConc(). |
|
Initialisation from the grammar Definition at line 143 of file interpret_object_operator.h. Referenced by addBoolCond(). |
|
Definition at line 148 of file interpret_object_operator.h. Referenced by addFirstOrderConc(), buildLogicTables(), and initialiseFactBase(). |
|
Definition at line 147 of file interpret_object_operator.h. Referenced by buildLogicTables(), and initialiseFactBase(). |
|
Definition at line 59 of file interpret_object_operator.h. Referenced by COperatorClass(). |
|
Definition at line 146 of file interpret_object_operator.h. Referenced by addFirstOrderConc(), buildLogicTables(), and initialiseFactBase(). |
|
Definition at line 150 of file interpret_object_operator.h. Referenced by activatePostConditions(), addCodeConc(), and ~COperatorClass(). |
|
Pos of a precondition pattern's vars in the operator's vars table.
Definition at line 51 of file interpret_object_operator.h. Referenced by addPostcondition(), forward(), getConcs(), and unifyBackward(). |
|
Definition at line 145 of file interpret_object_operator.h. Referenced by buildLogicTables(), and initialiseFactBase(). |
|
Definition at line 149 of file interpret_object_operator.h. Referenced by addCodeCond(), isValidFonc(), and ~COperatorClass(). |
|
Variables of the operator.
Definition at line 48 of file interpret_object_operator.h. |
|
Definition at line 152 of file interpret_object_operator.h. Referenced by COperatorClass(). |
|
Definition at line 155 of file interpret_object_operator.h. Referenced by addFuzzyCond(), getFuzzySets(), and ~COperatorClass(). |
|
Definition at line 154 of file interpret_object_operator.h. Referenced by addFuzzyCond(), getFuzzyVars(), and ~COperatorClass(). |
|
Definition at line 40 of file interpret_object_operator.h. Referenced by COperatorClass(), getGoal(), setGoal(), and ~COperatorClass(). |
|
Goal the operator tris to validate.
Definition at line 42 of file interpret_object_operator.h. Referenced by setGoal(). |
|
Name of the goal's vars.
Definition at line 44 of file interpret_object_operator.h. Referenced by getGoalVarPos(), and setGoal(). |
|
Name of the goal's assert.
Definition at line 43 of file interpret_object_operator.h. Referenced by setGoal(). |
|
Type of the class.
Definition at line 98 of file interpret_object.h. Referenced by NLAISCRIPT::IClassInterpret::getType(), NLAISCRIPT::IClassInterpret::IClassInterpret(), NLAISCRIPT::IClassInterpret::setType(), and NLAISCRIPT::IClassInterpret::~IClassInterpret(). |
|
Postconditions asserts.
Definition at line 52 of file interpret_object_operator.h. |
|
Preconditions asserts.
Definition at line 49 of file interpret_object_operator.h. |
|
Definition at line 66 of file interpret_object_operator.h. Referenced by COperatorClass(). |
|
Description of the operator.
Definition at line 61 of file interpret_object_operator.h. |
|
Definition at line 62 of file interpret_object_operator.h. |
|
Definition at line 55 of file interpret_object_operator.h. Referenced by checkTriggerMsg(), and RegisterMessage(). |
|
Pos of a postcondition pattern's vars in the operator's vars table.
Definition at line 54 of file interpret_object_operator.h. Referenced by checkTriggerMsg(), NbMsgTrigger(), and RegisterMessage(). |
|
Definition at line 57 of file interpret_object_operator.h. Referenced by checkTriggerMsg(), and RegisterMessage(). |
|
Definition at line 56 of file interpret_object_operator.h. Referenced by RegisterMessage(). |
|
Definition at line 64 of file interpret_object_operator.h. Referenced by COperatorClass(), getUpdateEvery(), and setUpdateEvery(). |
|
Pos of the goal's var in the operato's static components.
Definition at line 46 of file interpret_object_operator.h. |
|
|
|
|
|
Define the an buzzy state for an agent all time in this state. Definition at line 147 of file baseai.cpp. |
|
Define the an end state for an agent all time in this state. Definition at line 148 of file baseai.cpp. |
|
Define the an error state for an agent all time in this state. Definition at line 149 of file baseai.cpp. |
|
Define the an idle state for an agent all time in this state. Definition at line 145 of file baseai.cpp. |
|
Define the an locked state for an agent all time in this state. Definition at line 146 of file baseai.cpp. |
|
Definition at line 144 of file baseai.cpp. |
|
Definition at line 143 of file baseai.cpp. |