aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/agent_script_cpp-source.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/agent_script_cpp-source.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/agent_script_cpp-source.html')
-rw-r--r--docs/doxygen/nel/agent_script_cpp-source.html1479
1 files changed, 1479 insertions, 0 deletions
diff --git a/docs/doxygen/nel/agent_script_cpp-source.html b/docs/doxygen/nel/agent_script_cpp-source.html
new file mode 100644
index 00000000..69b6a4ef
--- /dev/null
+++ b/docs/doxygen/nel/agent_script_cpp-source.html
@@ -0,0 +1,1479 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+ <TITLE>nevrax.org : docs</TITLE>
+ <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</HEAD>
+<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
+
+<!-- uplinks -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ </TR>
+</TABLE>
+
+<!-- banner Nevrax -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
+ <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
+</TABLE>
+
+<!-- main table -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+ <!------ Begin Box ------>
+ <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
+ <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
+ <TABLE cellspacing=0 cellpadding=1 border=0>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr>
+ </TABLE>
+ </TD></TR></TABLE></TD></TR></TABLE>
+ <!------ End Box ------>
+
+ </TD>
+ <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+<!-- title -->
+<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
+<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
+</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
+</td></tr></table>
+&nbsp;
+
+<!-- block -->
+<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD>
+ <TD><B>Documentation</B></TD>
+ <TD ALIGN=RIGHT>&nbsp;</td>
+</tr></table>
+<!-- Generated by Doxygen 1.2.2 on Mon Mar 5 22:00:39 2001 -->
+<center>
+<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
+<hr><h1>agent_script.cpp</h1><a href="agent_script_cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
+00006 <font class="comment">/* Copyright, 2000 Nevrax Ltd.
+</font>00007 <font class="comment"> *
+</font>00008 <font class="comment"> * This file is part of NEVRAX NEL.
+</font>00009 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify
+</font>00010 <font class="comment"> * it under the terms of the GNU General Public License as published by
+</font>00011 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)
+</font>00012 <font class="comment"> * any later version.
+</font>00013 <font class="comment">
+</font>00014 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but
+</font>00015 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of
+</font>00016 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+</font>00017 <font class="comment"> * General Public License for more details.
+</font>00018 <font class="comment">
+</font>00019 <font class="comment"> * You should have received a copy of the GNU General Public License
+</font>00020 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the
+</font>00021 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+</font>00022 <font class="comment"> * MA 02111-1307, USA.
+</font>00023 <font class="comment"> */</font>
+00024 <font class="preprocessor">#include "<a class="code" href="agent_script_h.html">nel/ai/agent/agent_script.h</a>"</font>
+00025 <font class="preprocessor">#include "<a class="code" href="agent_manager_h.html">nel/ai/agent/agent_manager.h</a>"</font>
+00026 <font class="preprocessor">#include "<a class="code" href="agent_local_mailer_h.html">nel/ai/agent/agent_local_mailer.h</a>"</font>
+00027 <font class="preprocessor">#include "<a class="code" href="interpret_object_agent_h.html">nel/ai/script/interpret_object_agent.h</a>"</font>
+00028 <font class="preprocessor">#include "<a class="code" href="codage_h.html">nel/ai/script/codage.h</a>"</font>
+00029 <font class="preprocessor">#include "<a class="code" href="type_def_h.html">nel/ai/script/type_def.h</a>"</font>
+00030 <font class="preprocessor">#include "<a class="code" href="object_unknown_h.html">nel/ai/script/object_unknown.h</a>"</font>
+00031 <font class="preprocessor">#include "<a class="code" href="agent_method_def_h.html">nel/ai/agent/agent_method_def.h</a>"</font>
+00032 <font class="preprocessor">#include "<a class="code" href="message_script_h.html">nel/ai/agent/message_script.h</a>"</font>
+00033 <font class="preprocessor">#include "<a class="code" href="interpret_object_message_h.html">nel/ai/script/interpret_object_message.h</a>"</font>
+00034 <font class="preprocessor">#include "<a class="code" href="interpret_object_agent_h.html">nel/ai/script/interpret_object_agent.h</a>"</font>
+00035 <font class="preprocessor">#include "<a class="code" href="agent_nombre_h.html">nel/ai/agent/agent_nombre.h</a>"</font>
+00036 <font class="preprocessor">#include "<a class="code" href="performative_h.html">nel/ai/agent/performative.h</a>"</font>
+00037 <font class="preprocessor">#include "<a class="code" href="msg_notify_h.html">nel/ai/agent/msg_notify.h</a>"</font>
+00038 <font class="preprocessor">#include "<a class="code" href="msg_goal_h.html">nel/ai/agent/msg_goal.h</a>"</font>
+00039 <font class="preprocessor">#include "<a class="code" href="factbase_h.html">nel/ai/logic/factbase.h</a>"</font>
+00040 <font class="preprocessor">#include "<a class="code" href="goal_h.html">nel/ai/logic/goal.h</a>"</font>
+00041 <font class="preprocessor">#include "<a class="code" href="key_agent_h.html">nel/ai/agent/key_agent.h</a>"</font>
+00042 <font class="preprocessor">#include "<a class="code" href="list_manager_h.html">nel/ai/agent/list_manager.h</a>"</font>
+00043
+00044
+00045
+00046 <font class="keyword">namespace</font> NLAIAGENT
+00047 {
+00048 <font class="keyword">static</font> CGroupType listBidon;
+00049
+<a name="l00050"></a><a class="code" href="namespace_NLAIAGENT.html#a11">00050</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__COperandSimpleListOr.html">NLAISCRIPT::COperandSimpleListOr</a> *msgType;
+<a name="l00051"></a><a class="code" href="namespace_NLAIAGENT.html#a12">00051</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__COperandSimpleListOr.html">NLAISCRIPT::COperandSimpleListOr</a> *msgPerf;
+<a name="l00052"></a><a class="code" href="namespace_NLAIAGENT.html#a13">00052</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> *SendParamMessageScript;
+<a name="l00053"></a><a class="code" href="namespace_NLAIAGENT.html#a14">00053</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> *SendCompParamMessageScript;
+<a name="l00054"></a><a class="code" href="namespace_NLAIAGENT.html#a15">00054</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a> *IdMsgNotifyParentClass;
+<a name="l00055"></a><a class="code" href="namespace_NLAIAGENT.html#a16">00055</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__COperandSimpleListOr.html">NLAISCRIPT::COperandSimpleListOr</a> *IdMsgNotifyParent;
+<a name="l00056"></a><a class="code" href="namespace_NLAIAGENT.html#a17">00056</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> *ParamRunParentNotify;
+<a name="l00057"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#p0">00057</a> CAgentScript::CMethodCall **CAgentScript::StaticMethod = NULL;
+00058
+<a name="l00061"></a><a class="code" href="namespace_NLAIAGENT.html#a18">00061</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a> *IdGoalMsgClass;
+<a name="l00062"></a><a class="code" href="namespace_NLAIAGENT.html#a19">00062</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__COperandSimpleListOr.html">NLAISCRIPT::COperandSimpleListOr</a> *IdGoalMsg;
+<a name="l00063"></a><a class="code" href="namespace_NLAIAGENT.html#a20">00063</a> <font class="keyword">static</font> <a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> *ParamGoalMsg;
+00065
+<a name="l00066"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#d0">00066</a> <font class="keywordtype">void</font> CAgentScript::initAgentScript()<font class="keyword">
+</font>00067 <font class="keyword"> </font>{
+00068
+00069 msgType = <font class="keyword">new</font> NLAISCRIPT::COperandSimpleListOr(3,
+00070 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(CMessageList::IdMessage),
+00071 <font class="keyword">new</font> NLAIC::CIdentType(CMessageVector::IdMessageVector),
+00072 <font class="keyword">new</font> NLAIC::CIdentType(NLAISCRIPT::CMessageClass::IdMessageClass));
+00073
+00074 msgPerf = <font class="keyword">new</font> NLAISCRIPT::COperandSimpleListOr(7,
+00075 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(CPExec::IdPExec),
+00076 <font class="keyword">new</font> NLAIC::CIdentType(CPAchieve::IdPAchieve),
+00077 <font class="keyword">new</font> NLAIC::CIdentType(CPAsk::IdPAsk),
+00078 <font class="keyword">new</font> NLAIC::CIdentType(CPBreak::IdPBreak),
+00079 <font class="keyword">new</font> NLAIC::CIdentType(CPTell::IdPTell),
+00080 <font class="keyword">new</font> NLAIC::CIdentType(CPKill::IdPKill),
+00081 <font class="keyword">new</font> NLAIC::CIdentType(CPError::IdPError));
+00082
+00083
+00084 SendParamMessageScript = <font class="keyword">new</font> NLAISCRIPT::CParam(2,msgPerf, msgType);
+00085
+00086 msgPerf-&gt;<a class="code" href="class_NLAIC__IPointerGestion.html#a2">incRef</a>();
+00087 msgType-&gt;<a class="code" href="class_NLAIC__IPointerGestion.html#a2">incRef</a>();
+00088
+00089 SendCompParamMessageScript = <font class="keyword">new</font> NLAISCRIPT::CParam(3,<font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a>(<font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(CStringType::IdStringType)),
+00090 msgPerf, msgType);
+00091
+00092 IdMsgNotifyParentClass = <font class="keyword">new</font> NLAISCRIPT::COperandSimple(<font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(NLAISCRIPT::CMsgNotifyParentClass::IdMsgNotifyParentClass));
+00093
+00094 IdMsgNotifyParent = <font class="keyword">new</font> NLAISCRIPT::COperandSimpleListOr(2,
+00095 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(NLAISCRIPT::CMsgNotifyParentClass::IdMsgNotifyParentClass),
+00096 <font class="keyword">new</font> NLAIC::CIdentType(CNotifyParentScript::IdNotifyParentScript));
+00097
+00098 ParamRunParentNotify = <font class="keyword">new</font> NLAISCRIPT::CParam(1,IdMsgNotifyParent);
+00099
+00101 <font class="comment">// Temp, to be transfered in CGDAgentScript (Goal Driven Agent)</font>
+00102
+00103 IdGoalMsgClass = <font class="keyword">new</font> NLAISCRIPT::COperandSimple(<font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(NLAISCRIPT::CGoalMsgClass::IdGoalMsgClass));
+00104
+00105 IdGoalMsg = <font class="keyword">new</font> NLAISCRIPT::COperandSimpleListOr(2,
+00106 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(NLAISCRIPT::CGoalMsgClass::IdGoalMsgClass),
+00107 <font class="keyword">new</font> NLAIC::CIdentType(CGoalMsg::IdGoalMsg));
+00108
+00109 ParamGoalMsg = <font class="keyword">new</font> NLAISCRIPT::CParam(1,IdGoalMsg);
+00111
+00112
+00113
+00114 StaticMethod = <font class="keyword">new</font> CAgentScript::CMethodCall *[CAgentScript::TLastM];
+00115
+00116 StaticMethod[CAgentScript::TRunAskParentNotify] = <font class="keyword">new</font> CAgentScript::CMethodCall( _RUNASK_,
+00117 CAgentScript::TRunAskParentNotify, ParamRunParentNotify,
+00118 CAgentScript::CheckAll,
+00119 1,
+00120 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(IdMsgNotifyParentClass));
+00121
+00122 IdMsgNotifyParentClass-&gt;<a class="code" href="class_NLAIC__IPointerGestion.html#a2">incRef</a>();
+00123 StaticMethod[CAgentScript::TRunTellParentNotify] = <font class="keyword">new</font> CAgentScript::CMethodCall( _RUNTEL_,
+00124 CAgentScript::TRunTellParentNotify, ParamRunParentNotify,
+00125 CAgentScript::CheckAll,
+00126 1,
+00127 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(IdMsgNotifyParentClass));
+00128
+00129 StaticMethod[CAgentScript::TSend] = <font class="keyword">new</font> CAgentScript::CMethodCall( _SEND_,
+00130 CAgentScript::TSend, SendParamMessageScript,
+00131 CAgentScript::CheckAll,
+00132 2,
+00133 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandVoid.html">NLAISCRIPT::COperandVoid</a>));
+00134
+00135 StaticMethod[CAgentScript::TSendComponent] = <font class="keyword">new</font> CAgentScript::CMethodCall( _SEND_,
+00136 CAgentScript::TSendComponent,
+00137 SendCompParamMessageScript,CAgentScript::CheckAll,
+00138 3,
+00139 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandVoid.html">NLAISCRIPT::COperandVoid</a>));
+00140
+00141 StaticMethod[CAgentScript::TGetChildTag] = <font class="keyword">new</font> CAgentScript::CMethodCall( _GETCHILD_,
+00142 CAgentScript::TGetChildTag,
+00143 NULL,
+00144 CAgentScript::CheckCount,
+00145 1,
+00146 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font>
+00147 <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a>(
+00148 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(CVectorGroupManager::IdVectorGroupManager))));
+00149 StaticMethod[CAgentScript::TAddChildTag] = <font class="keyword">new</font> CAgentScript::CMethodCall( _ADDCHILD_,
+00150 CAgentScript::TAddChildTag,
+00151 NULL,CAgentScript::CheckCount,
+00152 2,
+00153 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(
+00154 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a>(
+00155 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(DigitalType::IdDigitalType))));
+00156
+00157 StaticMethod[CAgentScript::TFather] = <font class="keyword">new</font> CAgentScript::CMethodCall( _FATHER_,
+00158 CAgentScript::TFather,
+00159 NULL,CAgentScript::CheckCount,
+00160 0,
+00161 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(
+00162 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a>(
+00163 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(CAgentScript::IdAgentScript))));
+00164
+00166 <font class="comment">// Temp, to be transfered in CGDAgentScript (Goal Driven Agent)</font>
+00167
+00168 StaticMethod[CAgentScript::TGoal] = <font class="keyword">new</font> CAgentScript::CMethodCall( _RUNACHIEVE_,
+00169 CAgentScript::TGoal, ParamGoalMsg,
+00170 CAgentScript::CheckAll,
+00171 1,
+00172 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(IdGoalMsgClass) );
+00174
+00175
+00176
+00177 StaticMethod[CAgentScript::TSelf] = <font class="keyword">new</font> CAgentScript::CMethodCall( _SELF_,
+00178 CAgentScript::TSelf,
+00179 NULL,CAgentScript::CheckCount,
+00180 0,
+00181 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>( <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a>(
+00182 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(CAgentScript::IdAgentScript))));
+00183
+00184 StaticMethod[CAgentScript::TGetName] = <font class="keyword">new</font> CAgentScript::CMethodCall( _GETNAME_,
+00185 CAgentScript::TGetName,
+00186 NULL,CAgentScript::CheckCount,
+00187 1,
+00188 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(
+00189 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a>(
+00190 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(CStringType::IdStringType))));
+00191
+00192 StaticMethod[CAgentScript::TRemoveChild] = <font class="keyword">new</font> CAgentScript::CMethodCall( _REMOVECHILD_,
+00193 CAgentScript::TRemoveChild,
+00194 NULL,CAgentScript::CheckCount,
+00195 0,
+00196 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(
+00197 <font class="keyword">new</font> <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a>(
+00198 <font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(DigitalType::IdDigitalType))));
+00199
+00200
+00201 }
+00202
+<a name="l00203"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#d1">00203</a> <font class="keywordtype">void</font> CAgentScript::releaseAgentScript()<font class="keyword">
+</font>00204 <font class="keyword"> </font>{
+00205 SendParamMessageScript-&gt;<a class="code" href="class_NLAIC__IPointerGestion.html#a3">release</a>();
+00206 <font class="comment">//IdMsgNotifyParentClass-&gt;release();
+</font>00208 <font class="comment"> // Temp, to be transfered in CGDAgentScript (Goal Driven Agent)</font>
+00209 <font class="comment">// IdGoalMsgClass-&gt;release();</font>
+00210 <font class="comment">// IdGoalMsg-&gt;release();</font>
+00211 ParamGoalMsg-&gt;<a class="code" href="class_NLAIC__IPointerGestion.html#a3">release</a>();
+00213
+00214 ParamRunParentNotify-&gt;<a class="code" href="class_NLAIC__IPointerGestion.html#a3">release</a>();
+00215 SendCompParamMessageScript-&gt;<a class="code" href="class_NLAIC__IPointerGestion.html#a3">release</a>();
+00216 sint i;
+00217 <font class="keywordflow">for</font>(i = 0; i &lt; CAgentScript::TLastM; i++)
+00218 <font class="keyword">delete</font> StaticMethod[i];
+00219 <font class="keyword">delete</font> StaticMethod;
+00220 }
+00221
+00222 <font class="comment">/*CAgentScript::CMethodCall CAgentScript::StaticMethod[] =
+</font>00223 <font class="comment"> {
+</font>00224 <font class="comment">
+</font>00225 <font class="comment">
+</font>00226 <font class="comment"> CAgentScript::CMethodCall( _ADDCHILD_,
+</font>00227 <font class="comment"> CAgentScript::TAddChildTag,
+</font>00228 <font class="comment"> NULL,CAgentScript::CheckCount,
+</font>00229 <font class="comment"> 2,
+</font>00230 <font class="comment"> new NLAISCRIPT::CObjectUnknown(new NLAISCRIPT::COperandSimple(new NLAIC::CIdentType(DigitalType::IdDigitalType)))),
+</font>00231 <font class="comment">
+</font>00232 <font class="comment"> CAgentScript::CMethodCall( _FATHER_,
+</font>00233 <font class="comment"> CAgentScript::TFather,
+</font>00234 <font class="comment"> NULL,CAgentScript::CheckCount,
+</font>00235 <font class="comment"> 0,
+</font>00236 <font class="comment"> new NLAISCRIPT::CObjectUnknown(new NLAISCRIPT::COperandSimple(new NLAIC::CIdentType(CAgentScript::IdAgentScript)))),
+</font>00237 <font class="comment">
+</font>00238 <font class="comment"> CAgentScript::CMethodCall( _SELF_,
+</font>00239 <font class="comment"> CAgentScript::TSelf,
+</font>00240 <font class="comment"> NULL,CAgentScript::CheckCount,
+</font>00241 <font class="comment"> 0,
+</font>00242 <font class="comment"> new NLAISCRIPT::CObjectUnknown(new NLAISCRIPT::COperandSimple(new NLAIC::CIdentType(CAgentScript::IdAgentScript)))),
+</font>00243 <font class="comment">
+</font>00244 <font class="comment"> CAgentScript::CMethodCall( _GETNAME_,
+</font>00245 <font class="comment"> CAgentScript::TGetName,
+</font>00246 <font class="comment"> NULL,CAgentScript::CheckCount,
+</font>00247 <font class="comment"> 1,
+</font>00248 <font class="comment"> new NLAISCRIPT::CObjectUnknown(new NLAISCRIPT::COperandSimple(new NLAIC::CIdentType(CAgentScript::IdAgentScript)))),
+</font>00249 <font class="comment">
+</font>00250 <font class="comment"> CAgentScript::CMethodCall( _REMOVECHILD_,
+</font>00251 <font class="comment"> CAgentScript::TRemoveChild,
+</font>00252 <font class="comment"> NULL,CAgentScript::CheckCount,
+</font>00253 <font class="comment"> 0,
+</font>00254 <font class="comment"> new NLAISCRIPT::CObjectUnknown(new NLAISCRIPT::COperandSimple(new NLAIC::CIdentType(DigitalType::IdDigitalType))))
+</font>00255 <font class="comment">
+</font>00256 <font class="comment"> };*/</font>
+00257
+<a name="l00258"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a0">00258</a> CAgentScript::CAgentScript(<font class="keyword">const</font> CAgentScript &amp;a): IAgentManager(a)
+00259 {
+00260 <font class="keywordflow">if</font> ( a._AgentClass )
+00261 {
+00262 _AgentClass = a._AgentClass;
+00263 a._AgentClass-&gt;incRef();
+00264 }
+00265
+00266 _NbComponents = a._NbComponents;
+00267 _Components = <font class="keyword">new</font> IObjectIA *[ _NbComponents ];
+00268 <font class="comment">//sint32 nb_scripted = 0;</font>
+00269 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00270 {
+00271 _Components[i] = (IObjectIA *)a._Components[i]-&gt;clone();
+00272
+00273 <font class="keywordflow">if</font>(((<font class="keyword">const</font> <a class="code" href="class_NLAIC__CTypeOfObject.html">NLAIC::CTypeOfObject</a> &amp;)_Components[i]-&gt;getType()) &amp; NLAIC::CTypeOfObject::tAgentInterpret)
+00274 {
+00276 ((CAgentScript *)_Components[i])-&gt;setParent( (<font class="keyword">const</font> IWordNumRef *) *<font class="keyword">this</font>);
+00277 <font class="comment">//( (CScriptMailBox *) ((CAgentScript *)_Components[i])-&gt;getLocalMailBox() )-&gt;setIndex(nb_scripted);</font>
+00278 <font class="comment">//nb_scripted++;</font>
+00279 }
+00280 }
+00281
+00282 <font class="comment">/*if( a._ScriptMail)
+</font>00283 <font class="comment"> {
+</font>00284 <font class="comment"> _ScriptMail = (IMailBox *)a._ScriptMail-&gt;clone();
+</font>00285 <font class="comment"> _ScriptMail-&gt;setParent( (const IWordNumRef *) *this );
+</font>00286 <font class="comment"> }
+</font>00287 <font class="comment"> else
+</font>00288 <font class="comment"> {
+</font>00289 <font class="comment"> _ScriptMail = new CScriptMailBox((const IWordNumRef *) *this);
+</font>00290 <font class="comment"> }*/</font>
+00291
+00292 _AgentManager = a._AgentManager;
+00293 <font class="comment">//if(_AgentManager) _AgentManager-&gt;incRef();</font>
+00294
+00295 std::vector&lt;NLAILOGIC::IBaseOperator *&gt;::const_iterator it_o = a._Operators.begin();
+00296 <font class="keywordflow">while</font> ( it_o != a._Operators.end() )
+00297 {
+00298 addOperator( *it_o );
+00299 it_o++;
+00300 }
+00301 }
+00302
+<a name="l00303"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a1">00303</a> CAgentScript::CAgentScript(IAgentManager *manager) : IAgentManager( NULL ), _AgentClass( NULL )
+00304 {
+00305 _Components = NULL;
+00306 _NbComponents = 0;
+00307 _AgentManager = manager;
+00308 <font class="comment">//MangerIsReferenced = false;</font>
+00309 <font class="comment">//_ScriptMail = new CScriptMailBox((const IWordNumRef *) *this);</font>
+00310 }
+00311
+<a name="l00312"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a2">00312</a> CAgentScript::CAgentScript(IAgentManager *manager, IBasicAgent *father,<font class="comment">//The agent's father </font>
+00313 std::list&lt;IObjectIA *&gt; &amp;components, <font class="comment">//Static components </font>
+00314 <a class="code" href="class_NLAISCRIPT__CAgentClass.html">NLAISCRIPT::CAgentClass</a> *agent_class ) <font class="comment">//Class</font>
+00315
+00316 : IAgentManager(father), _AgentClass( agent_class )<font class="keyword">
+</font>00317 <font class="keyword"> </font>{
+00318 <font class="keywordflow">if</font> ( _AgentClass )
+00319 _AgentClass-&gt;incRef();
+00320
+00321 <font class="comment">// Creates the static components array</font>
+00322 _NbComponents = components.size();
+00323 _Components = <font class="keyword">new</font> IObjectIA *[ _NbComponents ];
+00324 std::list&lt;IObjectIA *&gt;::iterator it_c = components.begin();
+00325 <font class="keywordtype">int</font> id_c = 0;
+00326 <font class="comment">//sint32 nb_scripted = 0;</font>
+00327 _AgentManager = manager;
+00328 <font class="keywordflow">while</font> ( it_c != components.end() )
+00329 {
+00330 IObjectIA *o = (IObjectIA *)*it_c;
+00331 _Components[id_c] = o;
+00332
+00333 <font class="keywordflow">if</font>(((<font class="keyword">const</font> <a class="code" href="class_NLAIC__CTypeOfObject.html">NLAIC::CTypeOfObject</a> &amp;)o-&gt;getType()) &amp; NLAIC::CTypeOfObject::tAgentInterpret)
+00334 {
+00335 ((CAgentScript *)o)-&gt;setParent( (<font class="keyword">const</font> IWordNumRef *) *<font class="keyword">this</font>);
+00336 <font class="comment">//( (CScriptMailBox *) ((CAgentScript *)_Components[id_c])-&gt;getLocalMailBox() )-&gt;setIndex( nb_scripted );</font>
+00337 <font class="comment">//nb_scripted++;</font>
+00338 }
+00339
+00340 it_c++;
+00341 id_c++;
+00342 }
+00343 <font class="comment">//_ScriptMail = new CScriptMailBox( (const IWordNumRef *) *this);</font>
+00344
+00345 }
+00346
+<a name="l00347"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a3">00347</a> CAgentScript::~CAgentScript()<font class="keyword">
+</font>00348 <font class="keyword"> </font>{
+00349 <font class="keywordflow">if</font> ( _AgentClass )
+00350 _AgentClass-&gt;release();
+00351
+00352 <font class="comment">// destruction of static components</font>
+00353 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00354 _Components[i]-&gt;release();
+00355 <font class="keyword">delete</font>[] _Components;
+00356
+00357 <font class="comment">//if(_AgentManager != NULL) _AgentManager-&gt;release();</font>
+00358
+00359 <font class="comment">//if ( _ScriptMail != NULL ) _ScriptMail-&gt;release();</font>
+00360 }
+00361
+<a name="l00362"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a17">00362</a> <font class="keywordtype">void</font> CAgentScript::setAgentManager(IAgentManager *manager)<font class="keyword">
+</font>00363 <font class="keyword"> </font>{
+00364 <font class="comment">//if(_AgentManager != NULL) _AgentManager-&gt;release();</font>
+00365 _AgentManager = manager;
+00366 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00367 {
+00368 <font class="keywordflow">if</font>(((<font class="keyword">const</font> <a class="code" href="class_NLAIC__CTypeOfObject.html">NLAIC::CTypeOfObject</a> &amp;)_Components[i]-&gt;getType()) &amp; NLAIC::CTypeOfObject::tAgentInterpret)
+00369 {
+00370 <font class="comment">//_AgentManager-&gt;incRef();</font>
+00371 ((CAgentScript *)_Components[i])-&gt;setAgentManager(_AgentManager);
+00372 }
+00373 }
+00374
+00375 }
+00376
+<a name="l00377"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a16">00377</a> sint32 CAgentScript::getChildMessageIndex(<font class="keyword">const</font> IMessageBase *msg, sint32 child_index )<font class="keyword">
+</font>00378 <font class="keyword"> </font>{
+00379 <font class="keywordflow">return</font> _AgentClass-&gt;getChildMessageIndex( msg, child_index );
+00380 }
+00381
+<a name="l00382"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a34">00382</a> <font class="keywordtype">void</font> CAgentScript::setStaticMember(sint32 index,IObjectIA *op)<font class="keyword">
+</font>00383 <font class="keyword"> </font>{
+00384 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00385 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( index &gt;= _NbComponents )
+00386 {
+00387 <font class="keywordflow">throw</font> NLAIE::CExceptionIndexError();
+00388 }
+00389 <font class="preprocessor">#endif
+</font>00390 <font class="preprocessor"></font> _Components[ index ]-&gt;release();
+00391 _Components[ index ] = op;
+00392
+00393
+00394 <font class="keywordflow">if</font>(((<font class="keyword">const</font> <a class="code" href="class_NLAIC__CTypeOfObject.html">NLAIC::CTypeOfObject</a> &amp;) op-&gt;getType()) &amp; NLAIC::CTypeOfObject::tAgentInterpret)
+00395 {
+00396 ((CAgentScript *)op)-&gt;setParent( (<font class="keyword">const</font> IWordNumRef *) *<font class="keyword">this</font>);
+00397 <font class="comment">//( (CScriptMailBox *) ((CAgentScript *)op)-&gt;getLocalMailBox() )-&gt;setIndex( index );</font>
+00398 }
+00399 }
+00400
+<a name="l00401"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a31">00401</a> sint32 CAgentScript::getStaticMemberSize()<font class="keyword"> const
+</font>00402 <font class="keyword"> </font>{
+00403 <font class="keywordflow">return</font> _AgentClass-&gt;getStaticMemberSize();
+00404 }
+00405
+00406
+<a name="l00407"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a33">00407</a> <font class="keyword">const</font> IObjectIA *CAgentScript::getStaticMember(sint32 index)<font class="keyword"> const
+</font>00408 <font class="keyword"> </font>{
+00409 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00410 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( index &gt;= _NbComponents )
+00411 {
+00412 <font class="keywordflow">throw</font> NLAIE::CExceptionIndexError();
+00413 }
+00414 <font class="preprocessor">#endif
+</font>00415 <font class="preprocessor"></font> <font class="keywordflow">return</font> _Components[ index ];
+00416 }
+00417
+<a name="l00418"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a12">00418</a> <a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> *CAgentScript::getMethode(sint32 inheritance,sint32 index)<font class="keyword">
+</font>00419 <font class="keyword"> </font>{
+00420 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00421 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( index &gt;= _AgentClass-&gt;getMethodIndexSize())
+00422 {
+00423 <font class="keywordflow">throw</font> NLAIE::CExceptionIndexError();
+00424 }
+00425
+00426 <font class="keywordflow">if</font> ( inheritance &gt;= _AgentClass-&gt;sizeVTable())
+00427 {
+00428 <font class="keywordflow">throw</font> NLAIE::CExceptionIndexError();
+00429 }
+00430 <font class="preprocessor">#endif
+</font>00431 <font class="preprocessor"></font> <font class="keywordflow">return</font> (<a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> *)_AgentClass-&gt;getBrancheCode(inheritance,index).getCode();
+00432 }
+00433
+<a name="l00434"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a13">00434</a> <a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> *CAgentScript::getMethode(sint32 index)<font class="keyword">
+</font>00435 <font class="keyword"> </font>{
+00436 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00437 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class_name = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) getType();
+00438 <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_base_class_name = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) _AgentClass-&gt;getType();
+00439
+00440 <font class="keywordflow">if</font> ( index &gt;= _AgentClass-&gt;getMethodIndexSize())
+00441 {
+00442 <font class="keywordflow">throw</font> NLAIE::CExceptionIndexError();
+00443 }
+00444 <font class="preprocessor">#endif
+</font>00445 <font class="preprocessor"></font> <font class="keywordflow">return</font> (<a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> *)_AgentClass-&gt;getBrancheCode(index).getCode();
+00446 }
+00447
+<a name="l00448"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a45">00448</a> <font class="keywordtype">void</font> CAgentScript::save(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;os)<font class="keyword">
+</font>00449 <font class="keyword"> </font>{
+00450 IBasicAgent::save(os);
+00451 sint32 size = _NbComponents;
+00452 os.<a class="code" href="class_NLMISC__IStream.html#a3">serial</a>( size );
+00453 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00454 {
+00455 os.<a class="code" href="class_NLMISC__IStream.html#a3">serial</a>( (<a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a> &amp;) _Components[i]-&gt;getType() );
+00456 _Components[i]-&gt;save(os);
+00457 }
+00458 }
+00459
+<a name="l00460"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a44">00460</a> <font class="keywordtype">void</font> CAgentScript::load(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;is)<font class="keyword">
+</font>00461 <font class="keyword"> </font>{
+00462 IBasicAgent::load(is);
+00463
+00464 <font class="comment">// Loads static components</font>
+00465 sint32 size;
+00466 is.<a class="code" href="class_NLMISC__IStream.html#a3">serial</a>( size );
+00467 _NbComponents = size;
+00468
+00469 <font class="keywordflow">if</font>(_Components)
+00470 {
+00471 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00472 _Components[i]-&gt;release();
+00473 <font class="keyword">delete</font>[] _Components;
+00474 }
+00475 _Components = <font class="keyword">new</font> IObjectIA *[ _NbComponents ];
+00476
+00477 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00478 {
+00479 <a class="code" href="class_NLAIC__CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> id;
+00480 is.<a class="code" href="class_NLMISC__IStream.html#a3">serial</a>( id );
+00481 IObjectIA *tmp_c = (IObjectIA *)id.<a class="code" href="class_NLAIC__CIdentTypeAlloc.html#a3">allocClass</a>();
+00482 tmp_c-&gt;load(is);
+00483 _Components[i] = tmp_c;
+00484 }
+00485 }
+00486
+<a name="l00487"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a38">00487</a> sint32 CAgentScript::getMethodIndexSize()<font class="keyword"> const
+</font>00488 <font class="keyword"> </font>{
+00489 <font class="keywordflow">return</font> _AgentClass-&gt;getMethodIndexSize();
+00490 }
+00491
+<a name="l00492"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a46">00492</a> <font class="keyword">const</font> <a class="code" href="class_NLAIC__IBasicType.html">NLAIC::IBasicType</a> *CAgentScript::clone()<font class="keyword"> const
+</font>00493 <font class="keyword"> </font>{
+00494 CAgentScript *result = <font class="keyword">new</font> CAgentScript(*<font class="keyword">this</font>);
+00495 <font class="keywordflow">return</font> result;
+00496 }
+00497
+<a name="l00498"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a47">00498</a> <font class="keyword">const</font> <a class="code" href="class_NLAIC__IBasicType.html">NLAIC::IBasicType</a> *CAgentScript::newInstance()<font class="keyword"> const
+</font>00499 <font class="keyword"> </font>{
+00500 CAgentScript *instance;
+00501 <font class="keywordflow">if</font> ( _AgentClass )
+00502 {
+00503 instance = (CAgentScript *) _AgentClass-&gt;buildNewInstance();
+00504 }
+00505 <font class="keywordflow">else</font>
+00506 {
+00507 instance = <font class="keyword">new</font> CAgentScript(NULL);
+00508 }
+00509 <font class="keywordflow">return</font> instance;
+00510 }
+00511
+<a name="l00512"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a48">00512</a> <font class="keywordtype">void</font> CAgentScript::getDebugString(<font class="keywordtype">char</font> *t)<font class="keyword"> const
+</font>00513 <font class="keyword"> </font>{
+00514 sprintf(t,<font class="stringliteral">"class type &lt;%s&gt; "</font>,(<font class="keyword">const</font> <font class="keywordtype">char</font> *)getType());
+00515 <font class="keywordflow">if</font> ( _AgentClass )
+00516 sprintf(&amp;t[strlen(t)],<font class="stringliteral">"&lt;%s&gt; (scripted) -StaticComponents:\n"</font>,(<font class="keyword">const</font> <font class="keywordtype">char</font> *)_AgentClass-&gt;getType());
+00517 <font class="keywordflow">else</font>
+00518 sprintf(&amp;t[strlen(t)],<font class="stringliteral">"&lt;undefined_class&gt; (scripted) -StaticComponents:\n"</font>);
+00519
+00520 <font class="keywordtype">char</font> buf[1024*8];
+00521 <font class="keywordflow">for</font> (<font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00522 {
+00523 strcat(t, <font class="stringliteral">"\t\t"</font>);
+00524 <font class="keywordflow">if</font> ( _AgentClass-&gt;getComponentName(i) )
+00525 {
+00526 strcat(t, _AgentClass-&gt;getComponentName(i) );
+00527 }
+00528 <font class="keywordflow">else</font>
+00529 strcat(t, <font class="stringliteral">"&lt;unnamed&gt;"</font>);
+00530
+00531 strcat(t, <font class="stringliteral">"\t\t"</font>);
+00532 _Components[i]-&gt;getDebugString(buf);
+00533 strcat(t, <font class="stringliteral">"[ "</font>);
+00534 strcat(t, buf);
+00535 strcat(t, <font class="stringliteral">" ]"</font>);
+00536 <font class="keywordflow">if</font>(i != (_NbComponents-1)) strcat(t, <font class="stringliteral">"\n"</font>);
+00537 }
+00538 }
+00539
+<a name="l00540"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a25">00540</a> <font class="keywordtype">bool</font> CAgentScript::isEqual(<font class="keyword">const</font> IBasicObjectIA &amp;a)<font class="keyword"> const
+</font>00541 <font class="keyword"> </font>{
+00542 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00543 }
+00544
+<a name="l00545"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a21">00545</a> <font class="keywordtype">void</font> CAgentScript::onKill(IConnectIA *a)<font class="keyword">
+</font>00546 <font class="keyword"> </font>{
+00547 <font class="comment">//eraseFromList&lt;IBasicAgent *&gt;(&amp;_AgentList,(IBasicAgent *)a); </font>
+00548 IAgent::onKill(a);
+00549 }
+00550
+<a name="l00551"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a7">00551</a> IObjectIA::CProcessResult CAgentScript::getDynamicAgent(IBaseGroupType *g)<font class="keyword">
+</font>00552 <font class="keyword"> </font>{
+00553 CStringType *s = (CStringType *)g-&gt;get();
+00554 <font class="comment">//tsetDefNameAgent::iterator i = _DynamicAgentName.find(*s);</font>
+00555 IObjectIA::CProcessResult r;
+00556 r.ResultState = IObjectIA::ProcessIdle;
+00557
+00558 std::pair&lt;tsetDefNameAgent::iterator,tsetDefNameAgent::iterator&gt; p = _DynamicAgentName.equal_range(CKeyAgent(*s));
+00559 <font class="keywordflow">if</font>(p.first != p.second)
+00560 {
+00561 sint size = _DynamicAgentName.count(CKeyAgent(*s));
+00562 sint n = 0;
+00563 CVectorGroupManager *x;
+00564 <font class="keywordflow">while</font>(p.first != p.second)
+00565 {
+00566 x = <font class="keyword">new</font> CVectorGroupManager(size);
+00567 x-&gt;set(n++, *p.first-&gt;Itr);
+00568 p.first++;
+00569 }
+00570
+00571 r.Result = x;
+00572 r.Result-&gt;incRef();
+00573 <font class="keywordflow">return</font> r;
+00574
+00575 }
+00576 r.Result = &amp;DigitalType::NullOperator;
+00577 r.Result-&gt;incRef();
+00578 <font class="keywordflow">return</font> r;
+00579 }
+00580
+<a name="l00581"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a10">00581</a> IObjectIA::CProcessResult CAgentScript::runAskParentNotify(IBaseGroupType *g)<font class="keyword">
+</font>00582 <font class="keyword"> </font>{
+00583 CNotifyParentScript *m = <font class="keyword">new</font> CNotifyParentScript((IBasicAgent *)getParent());
+00584 m-&gt;setPerformatif(IMessageBase::PTell);
+00585 this-&gt;incRef();
+00586 m-&gt;setSender(<font class="keyword">this</font>);
+00587 IObjectIA::CProcessResult r;
+00588 r.Result = m;
+00589 <font class="keywordflow">return</font> r;
+00590 }
+00591
+<a name="l00592"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a11">00592</a> IObjectIA::CProcessResult CAgentScript::runTellParentNotify(IBaseGroupType *g)<font class="keyword">
+</font>00593 <font class="keyword"> </font>{
+00594 sint i;
+00595
+00596 CNotifyParentScript *m = <font class="keyword">new</font> CNotifyParentScript(<font class="keyword">this</font>);
+00597 m-&gt;setPerformatif(IMessageBase::PTell);
+00598 this-&gt;incRef();
+00599 m-&gt;setSender(<font class="keyword">this</font>);
+00600
+00601 <font class="keywordflow">for</font>(i = 0; i &lt; _NbComponents; i++)
+00602 {
+00603 <font class="keywordflow">if</font>(_Components[i] != NULL)
+00604 {
+00605 CNotifyParentScript *msg = (CNotifyParentScript *)m-&gt;clone();
+00606 <font class="keywordflow">try</font>
+00607 {
+00608 _Components[i]-&gt;sendMessage(msg);
+00609 }
+00610 <font class="keywordflow">catch</font>(<a class="code" href="class_NLAIE__IException.html">NLAIE::IException</a> &amp;)
+00611 {
+00612 msg-&gt;release();
+00613 }
+00614 }
+00615 }
+00616 IObjectIA::CProcessResult r;
+00617 r.Result = m;
+00618 <font class="keywordflow">return</font> r;
+00619 }
+00620
+<a name="l00621"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a6">00621</a> IObjectIA::CProcessResult CAgentScript::addDynamicAgent(IBaseGroupType *g)<font class="keyword">
+</font>00622 <font class="keyword"> </font>{
+00623 CIteratorContener i = g-&gt;getIterator();
+00624 CStringType &amp;s = (CStringType &amp;)*i++;
+00625 IBasicAgent *o = (IBasicAgent *)i++;
+00626
+00627 IObjectIA::CProcessResult r;
+00628 r.ResultState = IObjectIA::ProcessIdle;
+00629
+00630 o-&gt;setParent( (<font class="keyword">const</font> IWordNumRef *) *<font class="keyword">this</font> );
+00631 CNotifyParentScript *m = <font class="keyword">new</font> CNotifyParentScript(<font class="keyword">this</font>);
+00632 this-&gt;incRef();
+00633 m-&gt;setSender(<font class="keyword">this</font>);
+00634 m-&gt;setPerformatif(IMessageBase::PTell);
+00635 ((IObjectIA *)o)-&gt;sendMessage(m);
+00636
+00637 _DynamicAgentName.insert(CKeyAgent(s,addChild(o)));
+00638
+00639 r.Result = NULL;
+00640
+00641 <font class="keywordflow">return</font> r;
+00642 }
+00643
+<a name="l00644"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a8">00644</a> IObjectIA::CProcessResult CAgentScript::getDynamicName(<a class="code" href="class_NLAIAGENT__IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *g)<font class="keyword">
+</font>00645 <font class="keyword"> </font>{
+00646 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00647 <font class="preprocessor"></font> <font class="keywordtype">char</font> txt[1024*8];
+00648 g-&gt;<a class="code" href="class_NLAIC__IBasicType.html#a5">getDebugString</a>(txt);
+00649 <font class="preprocessor">#endif
+</font>00650 <font class="preprocessor"></font>
+00651 IObjectIA::CProcessResult r;
+00652 <font class="keyword">const</font> IObjectIA *o = ((CLocalAgentMail *)g-&gt;<a class="code" href="class_NLAIAGENT__IBaseGroupType.html#a23">get</a>())-&gt;getHost();
+00653 tsetDefNameAgent::iterator i = _DynamicAgentName.begin();
+00654
+00655 <font class="keywordflow">while</font>(i != _DynamicAgentName.end())
+00656 {
+00657 CKeyAgent key = *i;
+00658 <font class="keywordflow">if</font>( o == *key.Itr )
+00659 {
+00660 CStringType *s = <font class="keyword">new</font> CStringType(key.Name);
+00661 r.Result = s;
+00662 <font class="keywordflow">return</font> r;
+00663 }
+00664 i ++;
+00665 }
+00666 r.Result = <font class="keyword">new</font> CStringType(CStringVarName(<font class="stringliteral">"Unknown"</font>));
+00667 <font class="keywordflow">return</font> r;
+00668 }
+<a name="l00669"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a9">00669</a> IObjectIA::CProcessResult CAgentScript::removeDynamic(<a class="code" href="class_NLAIAGENT__IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *g)<font class="keyword">
+</font>00670 <font class="keyword"> </font>{
+00671 CStringType *s = (CStringType *)g-&gt;<a class="code" href="class_NLAIAGENT__IBaseGroupType.html#a23">get</a>();
+00672 tsetDefNameAgent::iterator i = _DynamicAgentName.find(CKeyAgent(*s));
+00673 IObjectIA::CProcessResult r;
+00674 r.ResultState = IObjectIA::ProcessIdle;
+00675
+00676 <font class="keywordflow">if</font>(i != _DynamicAgentName.end())
+00677 {
+00678 <font class="comment">//removeChild((*i).second);</font>
+00679 <font class="comment">//r.Result = new DigitalType(1.0);</font>
+00680 <font class="comment">//return r;</font>
+00681 <font class="keywordflow">throw</font>;
+00682 }
+00683 r.Result = &amp;DigitalType::NullOperator;
+00684 r.Result-&gt;incRef();
+00685 <font class="keywordflow">return</font> r;
+00686 }
+00687
+<a name="l00688"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a27">00688</a> IObjectIA::CProcessResult CAgentScript::sendMethod(IObjectIA *param)<font class="keyword">
+</font>00689 <font class="keyword"> </font>{
+00690 INombreDefine *p = (INombreDefine *)((IBaseGroupType *)param)-&gt;popFront();
+00691 IMessageBase *msg = (IMessageBase *)((IBaseGroupType *)param)-&gt;popFront();
+00692 msg-&gt;setPerformatif((IMessageBase::TPerformatif)(sint)p-&gt;getNumber());
+00693 p-&gt;release();
+00694 <font class="keywordflow">return</font> sendMessage(msg);
+00695 }
+00696
+<a name="l00697"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a28">00697</a> IObjectIA::CProcessResult CAgentScript::sendMethodCompoment(IObjectIA *param)<font class="keyword">
+</font>00698 <font class="keyword"> </font>{
+00699 IMessageBase *msg = (IMessageBase *)((IBaseGroupType *)param)-&gt;pop();
+00700 <font class="keywordflow">return</font> sendMessage(msg);
+00701 }
+00702
+<a name="l00703"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a42">00703</a> IObjectIA::CProcessResult CAgentScript::sendMessage(<font class="keyword">const</font> IVarName &amp;compName,IObjectIA *msg)<font class="keyword">
+</font>00704 <font class="keyword"> </font>{
+00705 IObjectIA *comp = (IObjectIA *)getStaticMember(getStaticMemberIndex(compName));
+00706 <font class="keywordflow">if</font>(comp != NULL)
+00707 {
+00708 comp-&gt;sendMessage(msg);
+00709 }
+00710 <font class="keywordflow">return</font> IObjectIA::CProcessResult();
+00711 }
+00712
+<a name="l00713"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a41">00713</a> IObjectIA::CProcessResult CAgentScript::sendMessage(IObjectIA *m)<font class="keyword">
+</font>00714 <font class="keyword"> </font>{
+00715 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00716 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *txt = (<font class="keyword">const</font> <font class="keywordtype">char</font> *)m-&gt;getType();
+00717 <font class="preprocessor">#endif
+</font>00718 <font class="preprocessor"></font> IMessageBase *msg = (IMessageBase *)m;
+00719 this-&gt;incRef();
+00720 msg-&gt;setReceiver(<font class="keyword">this</font>);
+00721 <font class="comment">//if(msg-&gt;getMethodIndex() &lt; 0)</font>
+00722 {
+00723 <font class="comment">/* _ScriptMail-&gt;addMessage(msg);
+</font>00724 <font class="comment"> }
+</font>00725 <font class="comment"> else
+</font>00726 <font class="comment"> {*/</font>
+00727 <font class="keywordflow">if</font>( ((<font class="keyword">const</font> <a class="code" href="class_NLAIC__CTypeOfObject.html">NLAIC::CTypeOfObject</a> &amp;)m-&gt;getType()) &amp; NLAIC::CTypeOfObject::tAgentInterpret)
+00728 {
+00729 <font class="keywordtype">char</font> runMsg[1024];
+00730 strcpy(runMsg,_RUN_);
+00731 <font class="keywordflow">switch</font>(msg-&gt;getPerformatif())
+00732 {
+00733 <font class="keywordflow">case</font> IMessageBase::PExec:
+00734 strcat(runMsg,<font class="stringliteral">"Exec"</font>);
+00735 <font class="keywordflow">break</font>;
+00736 <font class="keywordflow">case</font> IMessageBase::PAchieve:
+00737 strcat(runMsg,<font class="stringliteral">"Achieve"</font>);
+00738 <font class="keywordflow">break</font>;
+00739 <font class="keywordflow">case</font> IMessageBase::PAsk:
+00740 strcat(runMsg,<font class="stringliteral">"Ask"</font>);
+00741 <font class="keywordflow">break</font>;
+00742 <font class="keywordflow">case</font> IMessageBase::PTell:
+00743 strcat(runMsg,<font class="stringliteral">"Tell"</font>);
+00744 <font class="keywordflow">break</font>;
+00745 <font class="keywordflow">case</font> IMessageBase::PBreak:
+00746 strcat(runMsg,<font class="stringliteral">"Break"</font>);
+00747 <font class="keywordflow">break</font>;
+00748 <font class="keywordflow">case</font> IMessageBase::PKill:
+00749 strcat(runMsg,<font class="stringliteral">"Kill"</font>);
+00750 <font class="keywordflow">break</font>;
+00751 <font class="keywordflow">case</font> IMessageBase::PError:
+00752 strcat(runMsg,<font class="stringliteral">"Error"</font>);
+00753 <font class="keywordflow">break</font>;
+00754 }
+00755
+00756 <a class="code" href="class_NLAISCRIPT__COperandSimple.html">NLAISCRIPT::COperandSimple</a> *t = <font class="keyword">new</font> NLAISCRIPT::COperandSimple(<font class="keyword">new</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a>(m-&gt;getType()));
+00757 <a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> p(1,t);
+00758
+00759 CStringVarName tmp_name = CStringVarName(runMsg);
+00760 tQueue r = isMember(NULL,&amp;tmp_name,p);
+00761 <font class="keywordflow">if</font>(r.size())
+00762 {
+00763 <a class="code" href="class_NLAIAGENT__CIdMethod.html">NLAIAGENT::CIdMethod</a> m = r.top();
+00764 msg-&gt;setMethodIndex(0,m.Index);
+00765 <font class="comment">//_ScriptMail-&gt;addMessage(msg);</font>
+00766 }
+00767 <font class="comment">//else return IAgent::sendMessage(msg);</font>
+00768 }
+00769 <font class="comment">//else return IAgent::sendMessage(msg); </font>
+00770 }
+00771 <font class="keywordflow">return</font> IAgent::sendMessage(msg);
+00772 <font class="comment">//return IObjectIA::CProcessResult();</font>
+00773 }
+00774
+<a name="l00775"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a20">00775</a> <font class="keywordtype">void</font> CAgentScript::runChildren()<font class="keyword">
+</font>00776 <font class="keyword"> </font>{
+00777 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00778 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *classBase = (<font class="keyword">const</font> <font class="keywordtype">char</font> *)getType();
+00779 <font class="preprocessor">#endif
+</font>00780 <font class="preprocessor"></font> <font class="comment">// Activation des agents de la partie statique</font>
+00781 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; _NbComponents; i++ )
+00782 {
+00783 IObjectIA *o = _Components[i];
+00784 o-&gt;run();
+00785 }
+00786
+00787 <font class="comment">// Activation des fils</font>
+00788 IAgent::runChildren();
+00789 }
+00790
+<a name="l00791"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a23">00791</a> <font class="keywordtype">void</font> CAgentScript::processMessages(IMessageBase *msg,IObjectIA *c)<font class="keyword">
+</font>00792 <font class="keyword"> </font>{
+00793 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00794 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *txt = (<font class="keyword">const</font> <font class="keywordtype">char</font> *)msg-&gt;getType();
+00795 <font class="preprocessor">#endif
+</font>00796 <font class="preprocessor"></font> <a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;context = (<a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;)*c;
+00797 IBaseGroupType *param = <font class="keyword">new</font> CGroupType();
+00798 msg-&gt;incRef();
+00799 param-&gt;push(msg);
+00800 context.Stack ++;
+00801 context.Stack[(<font class="keywordtype">int</font>)context.Stack] = param;
+00802
+00803 <font class="keywordtype">int</font> indexM = msg-&gt;getMethodIndex() - getBaseMethodCount();
+00804 <font class="keywordflow">if</font>(indexM &gt;= 0)
+00805 {
+00806 IObjectIA *code = getMethode(indexM);
+00807 <font class="keywordflow">if</font>(code == NULL)
+00808 {
+00809 getMail()-&gt;popMessage();
+00810 <font class="keywordflow">return</font>;
+00811 }
+00812 }
+00813
+00814 <a class="code" href="class_NLAISCRIPT__IMethodContext.html">NLAISCRIPT::IMethodContext</a> *methodContex;
+00815
+00816 <font class="keywordflow">if</font> (context.ContextDebug.Active)
+00817 {
+00818 context.ContextDebug.Param.push_back(&amp;listBidon);
+00819 listBidon.incRef();
+00820 methodContex = <font class="keyword">new</font> NLAISCRIPT::CMethodContextDebug();
+00821 }
+00822 <font class="keywordflow">else</font>
+00823 {
+00824 methodContex = <font class="keyword">new</font> NLAISCRIPT::CMethodContext();
+00825 }
+00826 <font class="keyword">const</font> IObjectIA *self = context.Self;
+00827 context.Self = <font class="keyword">this</font>;
+00828 <a class="code" href="class_NLAISCRIPT__CCallMethod.html">NLAISCRIPT::CCallMethod</a> opCall(methodContex,msg-&gt;getHeritanceIndex(),msg-&gt;getMethodIndex());
+00829 opCall.<a class="code" href="class_NLAISCRIPT__CCallMethod.html#a2">runOpCode</a>(context);
+00830 context.Self = self;
+00831 IMessageBase *returnMsg = (IMessageBase *)context.Stack[(<font class="keywordtype">int</font>)context.Stack];
+00832 returnMsg-&gt;incRef();
+00833 context.Stack--;
+00834 <font class="keywordflow">switch</font>(msg-&gt;getPerformatif())
+00835 {
+00836 <font class="keywordflow">case</font> IMessageBase::PExec:
+00837 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL)
+00838 {
+00839 IMessageBase *o = (IMessageBase *)returnMsg-&gt;clone();
+00840 o-&gt;setMethodIndex(-1,-1);
+00841 this-&gt;incRef();
+00842 o-&gt;setSender(<font class="keyword">this</font>);
+00843 ((IObjectIA *)msg-&gt;getContinuation())-&gt;incRef();
+00844 o-&gt;setReceiver((IObjectIA *)msg-&gt;getContinuation());
+00845 ((IObjectIA *)msg-&gt;getContinuation())-&gt;sendMessage(o);
+00846 }
+00847 <font class="keywordflow">break</font>;
+00848 <font class="keywordflow">case</font> IMessageBase::PAchieve:
+00849 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL)
+00850 {
+00851 IMessageBase *o = (IMessageBase *)returnMsg-&gt;clone();
+00852 o-&gt;setMethodIndex(-1,-1);
+00853 this-&gt;incRef();
+00854 o-&gt;setSender(<font class="keyword">this</font>);
+00855 ((IObjectIA *)msg-&gt;getContinuation())-&gt;incRef();
+00856 o-&gt;setReceiver((IObjectIA *)msg-&gt;getContinuation());
+00857 ((IObjectIA *)msg-&gt;getContinuation())-&gt;sendMessage(o);
+00858 }
+00859 <font class="keywordflow">break</font>;
+00860 <font class="keywordflow">case</font> IMessageBase::PAsk:
+00861 {
+00862 IMessageBase *o = (IMessageBase *)returnMsg-&gt;clone();
+00863 o-&gt;setMethodIndex(-1,-1);
+00864 this-&gt;incRef();
+00865 o-&gt;setSender(<font class="keyword">this</font>);
+00866 o-&gt;setPerformatif(IMessageBase::PTell);
+00867 <font class="keywordflow">if</font>(returnMsg-&gt;getSender() != NULL) ((IObjectIA *)returnMsg-&gt;getSender())-&gt;incRef();
+00868 o-&gt;setReceiver((IObjectIA *)returnMsg-&gt;getSender());
+00869 ((IObjectIA *)msg-&gt;getSender())-&gt;sendMessage(o);
+00870
+00871
+00872 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL)
+00873 {
+00874 IMessageBase *o = (IMessageBase *)returnMsg-&gt;clone();
+00875 o-&gt;setMethodIndex(-1,-1);
+00876 this-&gt;incRef();
+00877 o-&gt;setSender(<font class="keyword">this</font>);
+00878 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL) ((IObjectIA *)msg-&gt;getContinuation())-&gt;incRef();
+00879 o-&gt;setReceiver((IObjectIA *)msg-&gt;getContinuation());
+00880 o-&gt;setPerformatif(IMessageBase::PTell);
+00881 ((IObjectIA *)msg-&gt;getContinuation())-&gt;sendMessage(o);
+00882 }
+00883 }
+00884 <font class="keywordflow">break</font>;
+00885 <font class="keywordflow">case</font> IMessageBase::PTell:
+00886 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL)
+00887 {
+00888 IMessageBase *o = (IMessageBase *)returnMsg-&gt;clone();
+00889 o-&gt;setMethodIndex(-1,-1);
+00890 this-&gt;incRef();
+00891 o-&gt;setSender(<font class="keyword">this</font>);
+00892 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL) ((IObjectIA *)msg-&gt;getContinuation())-&gt;incRef();
+00893 o-&gt;setReceiver((IObjectIA *)msg-&gt;getContinuation());
+00894 ((IObjectIA *)msg-&gt;getContinuation())-&gt;sendMessage(o);
+00895 }
+00896 <font class="keywordflow">break</font>;
+00897 <font class="keywordflow">case</font> IMessageBase::PBreak:
+00898 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL)
+00899 {
+00900 IMessageBase *o = (IMessageBase *)returnMsg-&gt;clone();
+00901 o-&gt;setMethodIndex(-1,-1);
+00902 this-&gt;incRef();
+00903 o-&gt;setSender(<font class="keyword">this</font>);
+00904 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL) ((IObjectIA *)msg-&gt;getContinuation())-&gt;incRef();
+00905 o-&gt;setReceiver((IObjectIA *)msg-&gt;getContinuation());
+00906 ((IObjectIA *)msg-&gt;getContinuation())-&gt;sendMessage(o);
+00907 }
+00908 <font class="keywordflow">break</font>;
+00909 <font class="keywordflow">case</font> IMessageBase::PKill:
+00910 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL)
+00911 {
+00912 IMessageBase *o = (IMessageBase *)returnMsg-&gt;clone();
+00913 o-&gt;setMethodIndex(-1,-1);
+00914 this-&gt;incRef();
+00915 o-&gt;setSender(<font class="keyword">this</font>);
+00916 <font class="keywordflow">if</font>(msg-&gt;getContinuation() != NULL) ((IObjectIA *)msg-&gt;getContinuation())-&gt;incRef();
+00917 o-&gt;setReceiver((IObjectIA *)msg-&gt;getContinuation());
+00918 ((IObjectIA *)msg-&gt;getContinuation())-&gt;sendMessage(o);
+00919 }
+00920 <font class="keywordflow">break</font>;
+00921
+00922 }
+00923 returnMsg-&gt;release();
+00924 }
+00925
+<a name="l00926"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a22">00926</a> <font class="keywordtype">void</font> CAgentScript::processMessages()<font class="keyword">
+</font>00927 <font class="keyword"> </font>{
+00928 IObjectIA *c;
+00929 <font class="keywordflow">if</font>( _AgentManager != NULL) c = (IObjectIA *)_AgentManager-&gt;getAgentContext();
+00930 <font class="keywordflow">else</font> c = NULL;
+00931 <font class="keywordflow">while</font>(getMail()-&gt;getMessageCount())
+00932 {
+00933 IMessageBase &amp;msg = (IMessageBase &amp;)getMail()-&gt;getMessage();
+00934 <font class="keywordflow">if</font>(msg.getMethodIndex() &gt;= 0)
+00935 {
+00936 processMessages(&amp;msg,c);
+00937 getMail()-&gt;popMessage();
+00938 }
+00939 <font class="keywordflow">else</font>
+00940 {
+00941 IAgent::processMessages();
+00942 }
+00943 }
+00944 }
+00945
+<a name="l00946"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a24">00946</a> IObjectIA::CProcessResult CAgentScript::runActivity()<font class="keyword">
+</font>00947 <font class="keyword"> </font>{
+00948
+00949 <a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> *context = (<a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> *)_AgentManager-&gt;getAgentContext();
+00950 context-&gt;Self = <font class="keyword">this</font>;
+00951 runMethodeMember(_AgentClass-&gt;getRunMethod(), context);
+00952
+00953 <font class="keywordflow">return</font> ProcessRun;
+00954 }
+00955
+<a name="l00956"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a26">00956</a> <font class="keywordtype">bool</font> CAgentScript::haveActivity()<font class="keyword"> const
+</font>00957 <font class="keyword"> </font>{
+00958 <font class="keywordflow">return</font> (_AgentClass-&gt;getRunMethod() &gt;= 0);
+00959 }
+00960
+<a name="l00961"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a43">00961</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;CAgentScript::run()<font class="keyword">
+</font>00962 <font class="keyword"> </font>{
+00963 setState(processBuzzy,NULL);
+00964
+00965 <font class="preprocessor">#ifdef NL_DEBUG
+</font>00966 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class_name = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) getType();
+00967 <font class="comment">//const NLAIAGENT::IRefrence *dbg_mail_parent = _ScriptMail-&gt;getParent();</font>
+00968 <font class="preprocessor">#endif
+</font>00969 <font class="preprocessor"></font>
+00970 <font class="comment">//_ScriptMail-&gt;run();</font>
+00971 getMail()-&gt;run();
+00972 runChildren();
+00973
+00974 processMessages();
+00975
+00976 <font class="keywordflow">if</font>(haveActivity()) runActivity();
+00977
+00978 setState(processIdle,NULL);
+00979 <font class="keywordflow">return</font> getState();
+00980 }
+00981
+<a name="l00982"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a4">00982</a> <font class="keywordtype">void</font> CAgentScript::addOperator(<a class="code" href="class_NLAILOGIC__IBaseOperator.html">NLAILOGIC::IBaseOperator</a> *op)<font class="keyword">
+</font>00983 <font class="keyword"> </font>{
+00984 _Operators.push_back(op);
+00985 }
+00986
+<a name="l00987"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a5">00987</a> <font class="keywordtype">void</font> CAgentScript::remOperator(<a class="code" href="class_NLAILOGIC__IBaseOperator.html">NLAILOGIC::IBaseOperator</a> *op)<font class="keyword">
+</font>00988 <font class="keyword"> </font>{
+00989 std::vector&lt;NLAILOGIC::IBaseOperator *&gt;::iterator it_o = _Operators.begin();
+00990 <font class="keywordflow">while</font> ( it_o != _Operators.end() )
+00991 {
+00992 <font class="keywordflow">if</font> ( op == *it_o )
+00993 {
+00994 _Operators.erase( it_o );
+00995 <font class="keywordflow">return</font>;
+00996 }
+00997 it_o++;
+00998 }
+00999 <font class="keywordtype">char</font> buf[2048];
+01000 op-&gt;<a class="code" href="class_NLAIC__IBasicType.html#a5">getDebugString</a>(buf);
+01001 <font class="keywordflow">throw</font> NLAIE::CExceptionObjectNotFoundError(buf);
+01002 }
+01003
+<a name="l01004"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a49">01004</a> <font class="keyword">const</font> <a class="code" href="class_NLAIC__CIdentType.html">NLAIC::CIdentType</a> &amp;CAgentScript::getType()<font class="keyword"> const
+</font>01005 <font class="keyword"> </font>{
+01006 <font class="keywordflow">if</font> ( _AgentClass )
+01007 <font class="keywordflow">return</font> _AgentClass-&gt;getType();
+01008 <font class="keywordflow">else</font>
+01009 <font class="keywordflow">return</font> IdAgentScript;
+01010 }
+01011
+<a name="l01012"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a29">01012</a> IObjectIA::CProcessResult CAgentScript::runMethodBase(<font class="keywordtype">int</font> heritance, <font class="keywordtype">int</font> index,IObjectIA *o)<font class="keyword">
+</font>01013 <font class="keyword"> </font>{
+01014 <font class="keywordflow">switch</font>(index - IAgent::getMethodIndexSize())
+01015 {
+01016 <font class="keywordflow">case</font> TSend:
+01017 {
+01018 <font class="keywordflow">return</font> sendMethod(o);
+01019 }
+01020
+01021 <font class="keywordflow">case</font> TSendComponent:
+01022 {
+01023 <font class="keywordflow">return</font> sendMethodCompoment(o);
+01024 }
+01025
+01026 <font class="keywordflow">case</font> TGetChildTag:
+01027 {
+01028 <font class="keywordflow">return</font> getDynamicAgent((IBaseGroupType *)o);
+01029 }
+01030
+01031 <font class="keywordflow">case</font> TAddChildTag:
+01032 {
+01033 <font class="keywordflow">return</font> addDynamicAgent((IBaseGroupType *)o);
+01034 }
+01035 <font class="keywordflow">case</font> TFather:
+01036 {
+01037 IObjectIA::CProcessResult a;
+01038 a.Result = (IObjectIA *)getParent();
+01039 a.Result-&gt;incRef();
+01040 <font class="keywordflow">return</font> a;
+01041 }
+01042
+01043 <font class="keywordflow">case</font> TSelf:
+01044 {
+01045 IObjectIA::CProcessResult a;
+01046 a.Result = <font class="keyword">new</font> CLocalAgentMail(<font class="keyword">this</font>);
+01047 <font class="keywordflow">return</font> a;
+01048 }
+01049 <font class="keywordflow">case</font> TGetName:
+01050 {
+01051 <font class="keywordflow">return</font> getDynamicName((IBaseGroupType *)o);
+01052 }
+01053
+01054 <font class="keywordflow">case</font> TRemoveChild:
+01055 {
+01056 <font class="keywordflow">return</font> removeDynamic((IBaseGroupType *)o);
+01057 }
+01058
+01059 <font class="keywordflow">case</font> TRunAskParentNotify:
+01060 {
+01061 <font class="keywordflow">return</font> runAskParentNotify((IBaseGroupType *)o);
+01062 }
+01063
+01064 <font class="keywordflow">case</font> TRunTellParentNotify:
+01065 {
+01066 <font class="keywordflow">return</font> runTellParentNotify((IBaseGroupType *)o);
+01067 }
+01069 <font class="comment">// Temp, to be transfered in CGDAgentScript (Goal Driven Agent)</font>
+01070
+01071 <font class="keywordflow">case</font> TGoal:
+01072 {
+01073 <font class="keywordflow">return</font> runGoalMsg((IBaseGroupType *)o);
+01074 }
+01076
+01077
+01078 <font class="keywordflow">default</font>:
+01079 <font class="keywordflow">return</font> IAgent::runMethodeMember(index,o);
+01080
+01081 }
+01082
+01083 }
+01084
+<a name="l01085"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a30">01085</a> IObjectIA::CProcessResult CAgentScript::runMethodBase(<font class="keywordtype">int</font> index,IObjectIA *o)<font class="keyword">
+</font>01086 <font class="keyword"> </font>{
+01087 <font class="keywordflow">switch</font>(index - IAgent::getMethodIndexSize())
+01088 {
+01089 <font class="keywordflow">case</font> TSend:
+01090 {
+01091 <font class="keywordflow">return</font> sendMethod(o);
+01092 }
+01093
+01094 <font class="keywordflow">case</font> TSendComponent:
+01095 {
+01096 <font class="keywordflow">return</font> sendMethodCompoment(o);
+01097 }
+01098
+01099 <font class="keywordflow">case</font> TGetChildTag:
+01100 {
+01101 <font class="keywordflow">return</font> getDynamicAgent((IBaseGroupType *)o);
+01102 }
+01103
+01104 <font class="keywordflow">case</font> TAddChildTag:
+01105 {
+01106 <font class="keywordflow">return</font> addDynamicAgent((IBaseGroupType *)o);
+01107 }
+01108 <font class="keywordflow">case</font> TFather:
+01109 {
+01110 IObjectIA::CProcessResult a;
+01111 a.Result = (IObjectIA *)getParent();
+01112 a.Result-&gt;incRef();
+01113 <font class="keywordflow">return</font> a;
+01114 }
+01115
+01116 <font class="keywordflow">case</font> TSelf:
+01117 {
+01118 IObjectIA::CProcessResult a;
+01119 a.Result = <font class="keyword">new</font> CLocalAgentMail(<font class="keyword">this</font>);
+01120 <font class="keywordflow">return</font> a;
+01121 }
+01122 <font class="keywordflow">case</font> TGetName:
+01123 {
+01124 <font class="keywordflow">return</font> getDynamicName((IBaseGroupType *)o);
+01125 }
+01126
+01127 <font class="keywordflow">case</font> TRunAskParentNotify:
+01128 {
+01129 <font class="keywordflow">return</font> runAskParentNotify((IBaseGroupType *)o);
+01130 }
+01131
+01132 <font class="keywordflow">case</font> TRunTellParentNotify:
+01133 {
+01134 <font class="keywordflow">return</font> runTellParentNotify((IBaseGroupType *)o);
+01135 }
+01136
+01138 <font class="comment">// Temp, to be transfered in CGDAgentScript (Goal Driven Agent)</font>
+01139
+01140 <font class="keywordflow">case</font> TGoal:
+01141 {
+01142 <font class="keywordflow">return</font> runGoalMsg((IBaseGroupType *)o);
+01143 }
+01145
+01146 <font class="keywordflow">default</font>:
+01147 <font class="keywordflow">return</font> IAgent::runMethodeMember(index,o);
+01148 }
+01149 }
+01150
+<a name="l01151"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a18">01151</a> <font class="keywordtype">int</font> CAgentScript::getBaseMethodCount()<font class="keyword"> const
+</font>01152 <font class="keyword"> </font>{
+01153 <font class="keywordflow">return</font> IAgentManager::getBaseMethodCount() + CAgentScript::TLastM;
+01154 }
+01155
+<a name="l01156"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a39">01156</a> IObjectIA::CProcessResult CAgentScript::runMethodeMember(sint32 inheritance, sint32 index, IObjectIA *c)<font class="keyword">
+</font>01157 <font class="keyword"> </font>{
+01158
+01159 <font class="keywordflow">if</font>(c-&gt;getType() != NLAISCRIPT::CCodeContext::IdCodeContext)
+01160 {
+01161 <font class="keywordflow">return</font> IAgent::runMethodeMember(inheritance,index, c);
+01162 }
+01163
+01164 <a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> *opPtr = NULL;
+01165 <a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;context = (<a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;)*c;
+01166
+01167 <font class="keywordtype">int</font> i = index - getBaseMethodCount();
+01168 <font class="keywordflow">if</font>(i &lt; 0)
+01169 {
+01170 <font class="keywordflow">if</font> (context.ContextDebug.Active)
+01171 {
+01172 context.ContextDebug.Param.push_back(&amp;listBidon);
+01173 listBidon.incRef();
+01174 }
+01175
+01176 IObjectIA::CProcessResult r = runMethodBase(index,(IObjectIA *)context.Param.back());
+01177 <font class="keywordflow">if</font>(r.Result != NULL)
+01178 {
+01179 context.Stack++;
+01180 context.Stack[(<font class="keywordtype">int</font>)context.Stack] = r.Result;
+01181 }
+01182 r.Result = NULL;
+01183 <font class="keywordflow">return</font> r;
+01184 }
+01185 <font class="keywordflow">else</font>
+01186 {
+01187 opPtr = getMethode(inheritance,i);
+01188 }
+01189
+01190 IObjectIA::CProcessResult r;
+01191 <font class="keywordflow">if</font>(opPtr != NULL)
+01192 {
+01193 <a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> &amp;op = *opPtr;
+01194 <a class="code" href="class_NLAISCRIPT__CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *opTmp = context.Code;
+01195 <font class="keywordtype">int</font> ip = (uint32)*context.Code;
+01196 context.Code = (<a class="code" href="class_NLAISCRIPT__CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *)&amp;op;
+01197 *context.Code = 0;
+01198
+01199 <font class="comment">/*TProcessStatement k = IObjectIA::ProcessIdle;
+</font>01200 <font class="comment">
+</font>01201 <font class="comment"> while(k != IObjectIA::ProcessEnd)
+</font>01202 <font class="comment"> {
+</font>01203 <font class="comment"> k = op.run(context);
+</font>01204 <font class="comment"> }*/</font>
+01205
+01206 r = ((<a class="code" href="class_NLAISCRIPT__ICodeBranche.html">NLAISCRIPT::ICodeBranche</a> *)opPtr)-&gt;run(context);
+01207 <font class="comment">// If we are in Debug Mode</font>
+01208 <font class="keywordflow">if</font> (context.ContextDebug.Active)
+01209 {
+01210 context.ContextDebug.callStackPop();
+01211 }
+01212 *context.Code = ip;
+01213 context.Code = opTmp;
+01214 }
+01215 <font class="keywordflow">return</font> r;
+01216 }
+01217
+<a name="l01218"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a40">01218</a> IObjectIA::CProcessResult CAgentScript::runMethodeMember(sint32 index, IObjectIA *c)<font class="keyword">
+</font>01219 <font class="keyword"> </font>{
+01220 <font class="keywordflow">if</font>(c-&gt;getType() != NLAISCRIPT::CCodeContext::IdCodeContext)
+01221 {
+01222 <font class="keywordflow">return</font> IAgent::runMethodeMember(index, c);
+01223 }
+01224
+01225 <a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> *opPtr = NULL;
+01226 <a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;context = (<a class="code" href="class_NLAISCRIPT__CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;)*c;
+01227
+01228 <font class="keywordtype">int</font> i = index - getBaseMethodCount();
+01229 <font class="keywordflow">if</font>(i &lt; 0)
+01230 {
+01231 <font class="keywordflow">if</font> (context.ContextDebug.Active)
+01232 {
+01233 context.ContextDebug.Param.push_back(&amp;listBidon);
+01234 listBidon.incRef();
+01235 }
+01236
+01237 IObjectIA::CProcessResult r = runMethodBase(index,(IObjectIA *)context.Param.back());
+01238 <font class="keywordflow">if</font>(r.Result != NULL)
+01239 {
+01240 context.Stack++;
+01241 context.Stack[(<font class="keywordtype">int</font>)context.Stack] = r.Result;
+01242 }
+01243 r.Result = NULL;
+01244 <font class="keywordflow">return</font> r;
+01245 }
+01246 <font class="keywordflow">else</font>
+01247 {
+01248 opPtr = getMethode(i);
+01249 }
+01250 IObjectIA::CProcessResult r;
+01251 <font class="keywordflow">if</font>(opPtr != NULL)
+01252 {
+01253 <a class="code" href="class_NLAISCRIPT__IOpCode.html">NLAISCRIPT::IOpCode</a> &amp;op = *opPtr;<font class="comment">//getMethode(inheritance,i);</font>
+01254 <a class="code" href="class_NLAISCRIPT__CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *opTmp = context.Code;
+01255 <font class="keywordtype">int</font> ip = (uint32)*context.Code;
+01256 context.Code = (<a class="code" href="class_NLAISCRIPT__CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *)opPtr;
+01257 *context.Code = 0;
+01258
+01259 <font class="comment">/*TProcessStatement k = IObjectIA::ProcessIdle;
+</font>01260 <font class="comment">
+</font>01261 <font class="comment"> while(k != IObjectIA::ProcessEnd)
+</font>01262 <font class="comment"> {
+</font>01263 <font class="comment"> k = op.run(context);
+</font>01264 <font class="comment"> }*/</font>
+01265 r = ((<a class="code" href="class_NLAISCRIPT__ICodeBranche.html">NLAISCRIPT::ICodeBranche</a> *)opPtr)-&gt;run(context);
+01266
+01267 <font class="comment">// If we are in Debug Mode</font>
+01268 <font class="keywordflow">if</font> (context.ContextDebug.Active)
+01269 {
+01270 context.ContextDebug.callStackPop();
+01271 }
+01272
+01273 *context.Code = ip;
+01274 context.Code = opTmp;
+01275 }
+01276 <font class="keywordflow">return</font> r;
+01277 }
+01278
+<a name="l01279"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a35">01279</a> tQueue CAgentScript::getPrivateMember(<font class="keyword">const</font> IVarName *className,<font class="keyword">const</font> IVarName *methodName,<font class="keyword">const</font> IObjectIA &amp;param)<font class="keyword"> const
+</font>01280 <font class="keyword"> </font>{
+01281 sint i;
+01282 CAgentScript::TMethodNumDef index = CAgentScript::TLastM;
+01283 <font class="keywordflow">for</font>(i = 0; i &lt; CAgentScript::TLastM; i ++)
+01284 {
+01285 <font class="keywordflow">if</font>(CAgentScript::StaticMethod[i]-&gt;MethodName == *methodName)
+01286 {
+01287 index = (CAgentScript::TMethodNumDef)CAgentScript::StaticMethod[i]-&gt;Index;
+01288 <font class="keywordflow">switch</font>(CAgentScript::StaticMethod[i]-&gt;CheckArgType)
+01289 {
+01290 <font class="keywordflow">case</font> CAgentScript::CheckAll:
+01291 {
+01292 <font class="keywordtype">double</font> d = ((<a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> &amp;)*CAgentScript::StaticMethod[i]-&gt;ArgType).eval((<a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> &amp;)param);
+01293 <font class="keywordflow">if</font>(d &gt;= 0.0)
+01294 {
+01295 tQueue r;
+01296 CAgentScript::StaticMethod[i]-&gt;ReturnValue-&gt;incRef();
+01297 r.push(CIdMethod( (IAgent::getMethodIndexSize() + CAgentScript::StaticMethod[i]-&gt;Index),
+01298 0.0,
+01299 NULL,
+01300 CAgentScript::StaticMethod[i]-&gt;ReturnValue));
+01301 <font class="keywordflow">return</font> r;
+01302 }
+01303 }
+01304 index = CAgentScript::TLastM;
+01305 <font class="keywordflow">break</font>;
+01306
+01307
+01308 <font class="keywordflow">case</font> CAgentScript::CheckCount:
+01309 {
+01310 <font class="keywordflow">if</font>(((<a class="code" href="class_NLAISCRIPT__CParam.html">NLAISCRIPT::CParam</a> &amp;)param).size() == CAgentScript::StaticMethod[i]-&gt;ArgCount)
+01311 {
+01312 tQueue r;
+01313 CAgentScript::StaticMethod[i]-&gt;ReturnValue-&gt;incRef();
+01314 r.push(CIdMethod( (IAgent::getMethodIndexSize() + CAgentScript::StaticMethod[i]-&gt;Index),
+01315 0.0,
+01316 NULL,
+01317 CAgentScript::StaticMethod[i]-&gt;ReturnValue ));
+01318 <font class="keywordflow">return</font> r;
+01319 }
+01320 }
+01321 index = CAgentScript::TLastM;
+01322 <font class="keywordflow">break</font>;
+01323
+01324 <font class="keywordflow">case</font> CAgentScript::DoNotCheck:
+01325 {
+01326 tQueue r;
+01327 CAgentScript::StaticMethod[i]-&gt;ReturnValue-&gt;incRef();
+01328 r.push(CIdMethod( (IAgent::getMethodIndexSize() + CAgentScript::StaticMethod[i]-&gt;Index),
+01329 0.0,
+01330 NULL,
+01331 CAgentScript::StaticMethod[i]-&gt;ReturnValue));
+01332 <font class="keywordflow">return</font> r;
+01333 }
+01334 index = CAgentScript::TLastM;
+01335 <font class="keywordflow">break</font>;
+01336 }
+01337 }
+01338 }
+01339 <font class="keywordflow">return</font> tQueue();
+01340 }
+01341
+<a name="l01342"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a36">01342</a> tQueue CAgentScript::isMember(<font class="keyword">const</font> IVarName *className,<font class="keyword">const</font> IVarName *methodName,<font class="keyword">const</font> IObjectIA &amp;param)<font class="keyword"> const
+</font>01343 <font class="keyword"> </font>{
+01344 <font class="preprocessor">#ifdef NL_DEBUG
+</font>01345 <font class="preprocessor"></font> <font class="keywordtype">char</font> nameM[1024*4];
+01346 <font class="keywordtype">char</font> nameP[1024*4];
+01347 <font class="keywordtype">char</font> name[1024*8];
+01348 methodName-&gt;getDebugString(nameM);
+01349 param.getDebugString(nameP);
+01350 sprintf(name,<font class="stringliteral">"%s%s"</font>,nameM,nameP);
+01351
+01352 <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class_name = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) getType();
+01353 <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_base_class_name = NULL;
+01354 <font class="keywordflow">if</font>(_AgentClass) dbg_base_class_name = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) _AgentClass-&gt;getType();
+01355 <font class="preprocessor">#endif
+</font>01356 <font class="preprocessor"></font>
+01357
+01358 <font class="keywordflow">if</font>(className == NULL)
+01359 {
+01360
+01361 tQueue r;
+01362 <font class="keywordflow">if</font>(_AgentClass != NULL) r = _AgentClass-&gt;getPrivateMember(className,methodName,param);
+01363
+01364 <font class="keywordflow">if</font>(r.size()) <font class="keywordflow">return</font> r;
+01365 <font class="keywordflow">else</font>
+01366 {
+01367 r = getPrivateMember(className,methodName,param);
+01368 <font class="keywordflow">if</font>(r.size()) <font class="keywordflow">return</font> r;
+01369 <font class="keywordflow">else</font>
+01370 {
+01371 <font class="keywordflow">return</font> IAgent::isMember(className,methodName,param);
+01372 }
+01373 }
+01374
+01375 }
+01376 <font class="keywordflow">else</font>
+01377 <font class="keywordflow">if</font>(*className == CStringVarName(<font class="stringliteral">"Agent"</font>))
+01378 {
+01379 tQueue r;
+01380 r = getPrivateMember(className,methodName,param);
+01381 <font class="keywordflow">if</font>(r.size()) <font class="keywordflow">return</font> r;
+01382 <font class="keywordflow">else</font>
+01383 {
+01384 r = _AgentClass-&gt;getPrivateMember(className,methodName,param);
+01385
+01386 <font class="keywordflow">if</font>(r.size()) <font class="keywordflow">return</font> r;
+01387 <font class="keywordflow">else</font>
+01388 {
+01389 <font class="keywordflow">return</font> IAgent::isMember(className,methodName,param);
+01390 }
+01391
+01392 }
+01393
+01394 }
+01395 <font class="keywordflow">return</font> tQueue();
+01396 }
+01397
+<a name="l01398"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a37">01398</a> sint32 CAgentScript::isClassInheritedFrom(<font class="keyword">const</font> IVarName &amp;name)<font class="keyword"> const
+</font>01399 <font class="keyword"> </font>{
+01400 <font class="keywordflow">return</font> _AgentClass-&gt;isClassInheritedFrom( name );
+01401 }
+01402
+<a name="l01403"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a32">01403</a> sint32 CAgentScript::getStaticMemberIndex(<font class="keyword">const</font> IVarName &amp;name)<font class="keyword"> const
+</font>01404 <font class="keyword"> </font>{
+01405 <font class="keywordflow">return</font> _AgentClass-&gt;getInheritedStaticMemberIndex(name);
+01406 }
+01407
+01409 <font class="comment">// Temp, to be transfered in CGDAgentScript (Goal Driven Agent)</font>
+01410
+<a name="l01411"></a><a class="code" href="class_NLAIAGENT__CAgentScript.html#a51">01411</a> IObjectIA::CProcessResult CAgentScript::runGoalMsg(IBaseGroupType *g)<font class="keyword">
+</font>01412 <font class="keyword"> </font>{
+01413 <a class="code" href="class_NLAILOGIC__CGoal.html">NLAILOGIC::CGoal</a> *goal = (<a class="code" href="class_NLAILOGIC__CGoal.html">NLAILOGIC::CGoal</a> *) g-&gt;<a class="code" href="class_NLAIAGENT__IBaseGroupType.html#a23">get</a>();
+01414 <font class="preprocessor">#ifdef NL_DEBUG
+</font>01415 <font class="preprocessor"></font> <font class="keywordtype">char</font> buffer[1024 * 2];
+01416 goal-&gt;<a class="code" href="class_NLAILOGIC__CGoal.html#a15">getDebugString</a>( buffer );
+01417 <font class="preprocessor">#endif
+</font>01418 <font class="preprocessor"></font> _GoalStack.push_back( goal );
+01419
+01420 IObjectIA::CProcessResult r;
+01421 r.Result = NULL;
+01422 <font class="keywordflow">return</font> r;
+01423 }
+01425 }
+</div></pre>
+
+<!-- footer -->
+<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
+</TD>
+<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>