#include <interpret_actor.h>
Inheritance diagram for NLAISCRIPT::CActorClass:
Public Member Functions | |
virtual NLAIAGENT::IObjectIA * | buildNewInstance () const |
Instanciates an object of the class. | |
CActorClass () | |
CActorClass (const CActorClass &) | |
CActorClass (const NLAIAGENT::IVarName &, const NLAIAGENT::IVarName &) | |
CActorClass (const NLAIC::CIdentType &) | |
CActorClass (const NLAIAGENT::IVarName &) | |
virtual TQueue | canProcessMessage (const IVarName &) |
virtual void | classIsMounted () |
Registers a new static component. | |
const NLAIC::IBasicType * | clone () const |
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. | |
sint32 | findMethod (const NLAIAGENT::IVarName &name, const CParam &CParam) const |
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. | |
sint32 | getConstructorIndex () |
virtual void | getDebugString (std::string &) const |
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 |
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 |
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 *) |
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 void | load (NLMISC::IStream &) |
const NLAIC::IBasicType * | newInstance () const |
bool | operator== (const IBasicObjectIA &classType) const |
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. | |
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 &) |
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 | updateStaticMember (sint32, NLAIAGENT::IObjectIA *) |
virtual | ~CActorClass () |
Static Public Attributes | |
const NLAIC::CIdentType | IdActorClass |
const NLAIC::CIdentType | IdAgentClass |
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. |
|
Definition at line 10 of file interpret_actor.cpp. References NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00010 : CAgentClass(n) 00011 { 00012 setBaseMethodCount(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))->getBaseMethodCount()); 00013 setBaseObjectInstance(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))); 00014 } |
|
Definition at line 16 of file interpret_actor.cpp. References NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), id, NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00016 : CAgentClass(id) 00017 { 00018 setBaseMethodCount(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))->getBaseMethodCount()); 00019 setBaseObjectInstance(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))); 00020 } |
|
Definition at line 22 of file interpret_actor.cpp. References NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00022 : CAgentClass( inheritance ) 00023 { 00024 setBaseMethodCount(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))->getBaseMethodCount()); 00025 setBaseObjectInstance(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))); 00026 } |
|
Definition at line 28 of file interpret_actor.cpp. References NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance().
00028 : CAgentClass( c ) 00029 { 00030 setBaseMethodCount(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))->getBaseMethodCount()); 00031 setBaseObjectInstance(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))); 00032 } |
|
Definition at line 34 of file interpret_actor.cpp. References NLAISCRIPT::IAgentMultiClass::getBaseMethodCount(), NLAISCRIPT::IAgentMultiClass::setBaseMethodCount(), and NLAISCRIPT::IAgentMultiClass::setBaseObjectInstance(). Referenced by clone(), and newInstance().
00035 { 00036 setBaseMethodCount(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))->getBaseMethodCount()); 00037 setBaseObjectInstance(((NLAIAGENT::CActorScript *)(NLAIAGENT::CActorScript::IdActorScript.getFactory()->getClass()))); 00038 } |
|
Definition at line 68 of file interpret_actor.cpp.
00069 { 00070 } |
|
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 } |
|
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 } |
|
Instanciates an object of the class.
Reimplemented from NLAISCRIPT::CAgentClass. Reimplemented in NLAISCRIPT::CFsmClass, and NLAISCRIPT::CSeqFsmClass. Definition at line 57 of file interpret_actor.cpp. References components, and NLAISCRIPT::CAgentClass::createBaseClassComponents().
00058 { 00059 // Création des composants statiques 00060 std::list<NLAIAGENT::IObjectIA *> components; 00061 createBaseClassComponents( components ); 00062 00063 // Création du message 00064 NLAIAGENT::CActorScript *instance = new NLAIAGENT::CActorScript( NULL, NULL ,components, (CActorClass *) this ); 00065 return instance; 00066 } |
|
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 } |
|
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. Reimplemented in NLAISCRIPT::CFsmClass, and NLAISCRIPT::CSeqFsmClass. Definition at line 41 of file interpret_actor.cpp. References CActorClass().
00042 { 00043 NLAIC::IBasicType *clone = new CActorClass(*this); 00044 return clone; 00045 } |
|
|
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 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 } |
|
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(), CActorClass(), NLAISCRIPT::CAgentClass::CAgentClass(), NLAISCRIPT::CFsmClass::CFsmClass(), NLAISCRIPT::CManagerClass::CManagerClass(), NLAISCRIPT::CMessageClass::CMessageClass(), NLAISCRIPT::COperatorClass::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 NLAISCRIPT::COperatorClass::compileFactPattern(), NLAIAGENT::CAgentScript::runMethodBase(), and NLAISCRIPT::COperatorClass::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 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. Reimplemented in NLAISCRIPT::CFsmClass. Definition at line 53 of file interpret_actor.cpp. References t.
00054 { 00055 } |
|
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(), NLAISCRIPT::COperatorClass::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 } |
|
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 } |
|
|
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 } |
|
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 } |
|
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 } |
|
This function allow a new instance, that mean that the class is a class factory. Reimplemented from NLAISCRIPT::CAgentClass. Reimplemented in NLAISCRIPT::CFsmClass, and NLAISCRIPT::CSeqFsmClass. Definition at line 47 of file interpret_actor.cpp. References CActorClass().
00048 { 00049 NLAIC::IBasicType *instance = new CActorClass(); 00050 return instance; 00051 } |
|
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().
|
|
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 } |
|
|
|
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 CActorClass(), NLAISCRIPT::CAgentClass::CAgentClass(), NLAISCRIPT::CFsmClass::CFsmClass(), NLAISCRIPT::CManagerClass::CManagerClass(), NLAISCRIPT::CMessageClass::CMessageClass(), NLAISCRIPT::COperatorClass::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 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(), NLAISCRIPT::COperatorClass::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 } |
|
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 } |
|
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 } |
|
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().
|
|
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 }
|
|
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 } |
|
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(). |
|
|
|
|
|
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. |