aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/operator__script_8cpp-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/operator__script_8cpp-source.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/operator__script_8cpp-source.html')
-rw-r--r--docs/doxygen/nel/operator__script_8cpp-source.html966
1 files changed, 966 insertions, 0 deletions
diff --git a/docs/doxygen/nel/operator__script_8cpp-source.html b/docs/doxygen/nel/operator__script_8cpp-source.html
new file mode 100644
index 00000000..c553a45e
--- /dev/null
+++ b/docs/doxygen/nel/operator__script_8cpp-source.html
@@ -0,0 +1,966 @@
+<!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.14 -->
+<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>operator_script.cpp</h1><a href="operator__script_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="preprocessor">#include "<a class="code" href="operator__script_8h.html">nel/ai/logic/operator_script.h</a>"</font>
+00002 <font class="preprocessor">#include "<a class="code" href="agent__script_8h.html">nel/ai/agent/agent_script.h</a>"</font>
+00003 <font class="preprocessor">#include "<a class="code" href="object__type_8h.html">nel/ai/agent/object_type.h</a>"</font>
+00004 <font class="preprocessor">#include "<a class="code" href="codage_8h.html">nel/ai/script/codage.h</a>"</font>
+00005 <font class="preprocessor">#include "<a class="code" href="interpret__object__operator_8h.html">nel/ai/logic/interpret_object_operator.h</a>"</font>
+00006 <font class="preprocessor">#include "<a class="code" href="comp__handle_8h.html">nel/ai/agent/comp_handle.h</a>"</font>
+00007 <font class="preprocessor">#include "<a class="code" href="fuzzyset_8h.html">nel/ai/fuzzy/fuzzyset.h</a>"</font>
+00008 <font class="preprocessor">#include "<a class="code" href="valueset_8h.html">nel/ai/logic/valueset.h</a>"</font>
+00009 <font class="preprocessor">#include "<a class="code" href="factbase_8h.html">nel/ai/logic/factbase.h</a>"</font>
+00010 <font class="preprocessor">#include "<a class="code" href="agent__proxy__mailer_8h.html">nel/ai/agent/agent_proxy_mailer.h</a>"</font>
+00011 <font class="preprocessor">#include "<a class="code" href="msg__goal_8h.html">nel/ai/agent/msg_goal.h</a>"</font>
+00012 <font class="preprocessor">#include "<a class="code" href="interpret__object__message_8h.html">nel/ai/script/interpret_object_message.h</a>"</font>
+00013
+00014 <font class="keyword">namespace </font>NLAIAGENT
+00015 {
+00016 <font class="keyword">static</font> CGroupType <a class="code" href="namespaceNLAIAGENT.html#a12">listBidon</a>;
+00017
+<a name="l00018"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a1">00018</a> COperatorScript::COperatorScript(<font class="keyword">const</font> COperatorScript &amp;a) : CActorScript(a)
+00019 {
+00020 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = a._CurrentGoal;
+00021 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o3">_CyclesBeforeUpdate</a> = a._CyclesBeforeUpdate;
+00022 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o5">_IsActivable</a> = a._IsActivable;
+00023 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a> = a._Maintain;
+00024 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o8">_Priority</a> = 0;
+00025 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a> = a._Exclusive;
+00026 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o9">_BasePriority</a> = a._BasePriority;
+00027 }
+00028
+<a name="l00029"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a2">00029</a> COperatorScript::COperatorScript(IAgentManager *manager,
+00030 IBasicAgent *father,
+00031 <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a> &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>,
+00032 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *actor_class )
+00033 : CActorScript(manager, father, components, actor_class )
+00034 {
+00035 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = NULL;
+00036 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o3">_CyclesBeforeUpdate</a> = 0;
+00037 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o5">_IsActivable</a> = <font class="keyword">false</font>;
+00038 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a> = <font class="keyword">false</font>;
+00039 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o8">_Priority</a> = 0;
+00040 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a> = <font class="keyword">true</font>;
+00041 }
+00042
+<a name="l00043"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a0">00043</a> COperatorScript::COperatorScript(IAgentManager *manager, <font class="keywordtype">bool</font> stay_alive) : CActorScript( manager )
+00044 {
+00045 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = NULL;
+00046 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o3">_CyclesBeforeUpdate</a> = 0;
+00047 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o5">_IsActivable</a> = <font class="keyword">false</font>;
+00048 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a> = <font class="keyword">false</font>;
+00049 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o8">_Priority</a> = 0;
+00050 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a> = <font class="keyword">true</font>;
+00051 }
+00052
+<a name="l00053"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a3">00053</a> COperatorScript::~COperatorScript()
+00054 {
+00055 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00056 <font class="preprocessor"></font> <font class="comment">//const char *className = (const char *)getType();</font>
+00057 <font class="preprocessor">#endif</font>
+00058 <font class="preprocessor"></font> std::vector&lt;NLAIAGENT::IObjectIA *&gt;::iterator it_val = <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o0">_VarValues</a>.begin();
+00059 <font class="keywordflow">while</font> ( it_val != <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o0">_VarValues</a>.end() )
+00060 {
+00061 (*it_val)-&gt;release();
+00062 it_val++;
+00063 }
+00064 }
+00065
+<a name="l00066"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a21">00066</a> <font class="keywordtype">void</font> COperatorScript::onKill(IConnectIA *a)
+00067 {
+00068 CActorScript::onKill(a);
+00069 }
+00070
+<a name="l00071"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a6">00071</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *COperatorScript::clone()<font class="keyword"> const</font>
+00072 <font class="keyword"> </font>{
+00073 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a0">COperatorScript</a> *m = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a0">COperatorScript</a>(*<font class="keyword">this</font>);
+00074 <font class="keywordflow">return</font> m;
+00075 }
+00076
+<a name="l00077"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a7">00077</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *COperatorScript::newInstance()<font class="keyword"> const</font>
+00078 <font class="keyword"> </font>{
+00079 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a0">COperatorScript</a> *instance;
+00080 <font class="keywordflow">if</font> ( _AgentClass )
+00081 {
+00082 instance = (<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a0">COperatorScript</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a>-&gt;<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a6">buildNewInstance</a>();
+00083 }
+00084 <font class="keywordflow">else</font>
+00085 {
+00086 instance = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a0">COperatorScript</a>(NULL);
+00087 }
+00088 <font class="keywordflow">return</font> instance;
+00089 }
+00090
+<a name="l00091"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a8">00091</a> <font class="keywordtype">void</font> COperatorScript::getDebugString(std::string &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>)<font class="keyword"> const</font>
+00092 <font class="keyword"> </font>{
+00093 <font class="keywordflow">if</font> ( _AgentClass )
+00094 <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a>-&gt;<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a9">getDebugString</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>);
+00095 <font class="keywordflow">else</font>
+00096 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"&lt;COperatorScript&gt;"</font>;
+00097 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"&lt;"</font>;
+00098
+00099 <font class="keywordflow">if</font> ( _IsActivated )
+00100 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"activated&gt;"</font>;
+00101 <font class="keywordflow">else</font>
+00102 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"idle&gt;"</font>;
+00103 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">" &lt;P "</font>;
+00104 std::string text;
+00105 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"%f"</font>, <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a4">priority</a>() );
+00106 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += text;
+00107 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"\n\t"</font>;
+00108
+00109 <font class="keywordflow">if</font>( <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n2">_AgentManager</a> != NULL)
+00110 {
+00111 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a> p;
+00112 <font class="keyword">static</font> CStringVarName debugStringF(<font class="stringliteral">"GetDebugString"</font>);
+00113
+00114 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z144_19">isMember</a>(NULL,&amp;debugStringF,p);
+00115 <font class="keywordflow">if</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.size())
+00116 {
+00117 <a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> *c = (<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> *)<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n2">_AgentManager</a>-&gt;getAgentContext()-&gt;clone();
+00118 <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a> m = <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.top();
+00119 <font class="comment">//msg-&gt;setMethodIndex(0,m.Index); </font>
+00120 c-&gt;<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m3">Self</a> = <font class="keyword">this</font>;
+00121
+00122 IBaseGroupType *<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a> = <font class="keyword">new</font> CGroupType();
+00123 (*c).Stack ++;
+00124 (*c).Stack[(int)(*c).Stack] = <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>;
+00125 <a class="code" href="classNLAISCRIPT_1_1IMethodContext.html">NLAISCRIPT::IMethodContext</a> *methodContex = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CMethodContext.html">NLAISCRIPT::CMethodContext</a>();
+00126 <a class="code" href="classNLAISCRIPT_1_1CCallMethod.html">NLAISCRIPT::CCallMethod</a> opCall(methodContex,0,m.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m0">Index</a>);
+00127 opCall.<a class="code" href="classNLAISCRIPT_1_1CCallMethod.html#a2">runOpCode</a>(*c);
+00128 <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a> *returnMsg = (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a> *)c-&gt;<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>[(int)(*c).Stack];
+00129 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += returnMsg-&gt;<a class="code" href="classNLAIAGENT_1_1CStringType.html#a10">getStr</a>().getString();
+00130 (*c).Stack--;
+00131 c-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00132 }
+00133 }
+00134 }
+00135
+<a name="l00136"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a9">00136</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">COperatorScript::isEqual</a>(<font class="keyword">const</font> IBasicObjectIA &amp;a)<font class="keyword"> const</font>
+00137 <font class="keyword"> </font>{
+00138 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00139 }
+00140
+<a name="l00141"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">00141</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;COperatorScript::getType()<font class="keyword"> const</font>
+00142 <font class="keyword"> </font>{
+00143 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z142_18">getFactoryClass</a>() != NULL )
+00144 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z142_18">getFactoryClass</a>()-&gt;<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a5">getType</a>();
+00145 <font class="keywordflow">else</font>
+00146 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">IdOperatorScript</a>;
+00147 }
+00148
+<a name="l00149"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a14">00149</a> <font class="keywordtype">void</font> COperatorScript::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;os)
+00150 {
+00151 CAgentScript::save(os);
+00152 <font class="comment">// TODO</font>
+00153 }
+00154
+<a name="l00155"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a15">00155</a> <font class="keywordtype">void</font> COperatorScript::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is)
+00156 {
+00157 CAgentScript::load(is);
+00158 <font class="comment">// TODO</font>
+00159 }
+00160
+00161 <font class="comment">// This is where the activation of the operator and its children is controled...</font>
+<a name="l00162"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a11">00162</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;COperatorScript::run()
+00163 {
+00164
+00165 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00166 <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> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00167 std::string dbg_goal;
+00168 <font class="preprocessor">#endif</font>
+00169 <font class="preprocessor"></font>
+00170 <font class="comment">// Checks the goal and preconditions after a certain number of cycles (defined in the script using the UdpateEvery keyword)</font>
+00171 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o3">_CyclesBeforeUpdate</a> == 0 )
+00172 {
+00173 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o5">_IsActivable</a> = <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a10">checkActivation</a>();
+00174 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o3">_CyclesBeforeUpdate</a> = ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getUpdateEvery();
+00175 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a5">calcPriority</a>();
+00176 }
+00177 <font class="keywordflow">else</font>
+00178 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o3">_CyclesBeforeUpdate</a>--;
+00179
+00180 <font class="keywordflow">if</font> ( _IsActivable ) <font class="comment">// If the goal exists and the preconditions are validated</font>
+00181 {
+00182 <font class="keywordflow">if</font> ( ! <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n0">_IsActivated</a> ) <font class="comment">// If the operator wasn't activated before, initialises the current goal and runs the OnActivate() function</font>
+00183 {
+00184 <font class="comment">// Registers to the goal and gets the args</font>
+00185 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> == NULL &amp;&amp; ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getGoal() != NULL )
+00186 {
+00187 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a24">selectGoal</a>(); <font class="comment">// Select a goal among possible ones</font>
+00188 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00189 <font class="preprocessor"></font> {
+00190 <font class="comment">// static sint untrucMerdic = 0;</font>
+00191 <font class="comment">// nlinfo("_CurrentGoal = 0x%4x, at untrucMerdic = %d",_CurrentGoal, untrucMerdic ++);</font>
+00192 }
+00193 <font class="preprocessor">#endif</font>
+00194 <font class="preprocessor"></font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a>-&gt;<a class="code" href="classNLAILOGIC_1_1CGoal.html#a7">addSuccessor</a>( (<a class="code" href="classNLAIAGENT_1_1IBasicAgent.html#b0">IBasicAgent</a> *) <font class="keyword">this</font> ); <font class="comment">// Adds the operator to the list of operators launched for this goal</font>
+00195 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a23">linkGoalArgs</a>( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> ); <font class="comment">// Instanciates the goal's args values into the operator's components</font>
+00196 }
+00197
+00198 <font class="keywordflow">if</font> ( ( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> != NULL &amp;&amp; <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a>-&gt;<a class="code" href="classNLAILOGIC_1_1IGoal.html#a9">isSelected</a>() ) || ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getGoal() == NULL)
+00199 {
+00200 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#a5">activate</a>();
+00201 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a34">execOnActivate</a>(); <font class="comment">// Execs onActivate() function in the script if defined, otherwise the C++ one inherited from CActorScript.</font>
+00202 }
+00203 }
+00204 <font class="keywordflow">else</font>
+00205 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a35">checkPause</a>(); <font class="comment">// Check if the agent must be paused / restarted</font>
+00206
+00207 <font class="comment">// If the operator is activated and not paused, runs it (including its children), </font>
+00208 <font class="comment">// otherwise just process messages</font>
+00209 <font class="keywordflow">if</font> ( _IsActivated )
+00210 {
+00211 <font class="keywordflow">if</font>( !<a class="code" href="classNLAIAGENT_1_1CActorScript.html#n2">_IsPaused</a> )
+00212 <font class="keywordflow">return</font> CAgentScript::run();
+00213 <font class="keywordflow">else</font>
+00214 {
+00215 CActorScript::processMessages();
+00216 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00217 }
+00218 }
+00219 <font class="keywordflow">else</font>
+00220 CActorScript::processMessages();
+00221 }
+00222 <font class="keywordflow">else</font>
+00223 {
+00224 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n0">_IsActivated</a> == <font class="keyword">true</font> ) <font class="comment">// If the operator is curently activated, unactivates it</font>
+00225 {
+00226 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#a7">unActivate</a>();
+00227 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = NULL;
+00228 }
+00229 CActorScript::processMessages();
+00230 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00231 }
+00232 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00233 }
+00234
+00235
+<a name="l00236"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a34">00236</a> <font class="keywordtype">void</font> COperatorScript::execOnActivate()
+00237 {
+00238 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00239 <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> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00240 <font class="preprocessor">#endif</font>
+00241 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n3">_OnActivateIndex</a> != -1 ) <font class="comment">// if found, runs the script's OnActivate() function declared in the operator class</font>
+00242 {
+00243 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z142_17">getAgentManager</a>() != NULL )
+00244 {
+00245 <a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> *context = (<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z142_17">getAgentManager</a>()-&gt;getAgentContext();
+00246 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00247 <font class="preprocessor"></font> sint sp = context-&gt;<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>.CIndexStackPointer::operator int ();
+00248 <font class="preprocessor">#endif</font>
+00249 <font class="preprocessor"></font> context-&gt;<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m3">Self</a> = <font class="keyword">this</font>;
+00250 IObjectIA::CProcessResult <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z144_23">runMethodeMember</a>( <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n3">_OnActivateIndex</a> , context);
+00251 <font class="keywordflow">if</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result != NULL)
+00252 {
+00253 <font class="keywordflow">throw</font>;
+00254 }
+00255
+00256 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00257 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( sp != context-&gt;<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>.CIndexStackPointer::operator int () )
+00258 {
+00259 <font class="keywordflow">throw</font>;
+00260 }
+00261 <font class="preprocessor">#endif</font>
+00262 <font class="preprocessor"></font> <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n3">_OnActivateIndex</a> = -1;
+00263 }
+00264 }
+00265 <font class="keywordflow">else</font>
+00266 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#a6">onActivate</a>(); <font class="comment">// Otherwise runs the C++ virtual one (inherited from CActorScript)</font>
+00267 }
+00268
+<a name="l00269"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a35">00269</a> <font class="keywordtype">void</font> COperatorScript::checkPause()
+00270 {
+00271 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00272 <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> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00273 <font class="preprocessor">#endif</font>
+00274 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( (<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> != NULL) )
+00275 {
+00276 <font class="keywordflow">if</font> ( !<a class="code" href="classNLAIAGENT_1_1CActorScript.html#n2">_IsPaused</a> &amp;&amp; !<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a>-&gt;<a class="code" href="classNLAILOGIC_1_1IGoal.html#a9">isSelected</a>() )
+00277 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#a29">pause</a>();
+00278 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n2">_IsPaused</a> &amp;&amp; <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a>-&gt;<a class="code" href="classNLAILOGIC_1_1IGoal.html#a9">isSelected</a>() )
+00279 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#a30">restart</a>();
+00280 }
+00281 }
+00282
+00283 <font class="comment">// This function selects a goals among the ones the operator can process</font>
+00284 <font class="comment">// Actualy returns the first of the list (can be overriden to implement more complex mechanisms)</font>
+<a name="l00285"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a24">00285</a> <a class="code" href="classNLAILOGIC_1_1CGoal.html">NLAILOGIC::CGoal</a> *COperatorScript::selectGoal()
+00286 {
+00287 <font class="keywordflow">if</font> ( !<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.empty() )
+00288 {
+00289 <font class="comment">// TODO: instantiate each goal's variables and compute priority.</font>
+00290 <font class="comment">// then select the highest priority goal.</font>
+00291 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.front();
+00292 }
+00293
+00294 <font class="keywordflow">else</font>
+00295 <font class="keywordflow">return</font> NULL;
+00296 }
+00297
+00298 <font class="comment">// Check if the owner of the operator has a goal the operator could process and if the preconditions are validated</font>
+<a name="l00299"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a10">00299</a> <font class="keywordtype">bool</font> COperatorScript::checkActivation()
+00300 {
+00301 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00302 <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> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00303 <font class="preprocessor">#endif</font>
+00304 <font class="preprocessor"></font>
+00305 <font class="comment">// If not in maintain mode and the operator has already been activated, keeps it activated.</font>
+00306 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n0">_IsActivated</a> &amp;&amp; <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> != NULL &amp;&amp; !<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a>)
+00307 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00308
+00309 <font class="keywordflow">if</font> ( ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getGoal() != NULL)
+00310 {
+00311 <font class="comment">// if ( _CurrentGoal != NULL )</font>
+00312 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a32">lookForGoals</a>();
+00313
+00314 <font class="comment">// If no goal is posted corresponding to this operator's one, returns false</font>
+00315 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.empty() )
+00316 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00317
+00318 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CGoal *&gt;</a>::iterator it_goal = <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.begin();
+00319 <font class="keywordflow">while</font> ( it_goal != <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.end() )
+00320 {
+00321 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a23">linkGoalArgs</a>( *it_goal );
+00322 <font class="keywordflow">if</font> ( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a33">checkPreconditions</a>() == <font class="keyword">true</font> )
+00323 {
+00324 <a class="code" href="classNLAILOGIC_1_1CGoal.html">NLAILOGIC::CGoal</a> *goal = *it_goal;
+00325 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.clear();
+00326 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.push_back( goal );
+00327 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00328 }
+00329 it_goal++;
+00330 }
+00331 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00332 }
+00333 <font class="keywordflow">else</font>
+00334 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a33">checkPreconditions</a>();
+00335 }
+00336
+00337 <font class="comment">// Looks for the goals the operator could process in the father's goal stack</font>
+<a name="l00338"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a32">00338</a> <font class="keywordtype">void</font> COperatorScript::lookForGoals()
+00339 {
+00340 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00341 <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> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00342 <font class="preprocessor">#endif</font>
+00343 <font class="preprocessor"></font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.clear();
+00344 <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#a1">CAgentScript</a> *father = (<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#a1">CAgentScript</a> *) <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>();
+00345 <font class="keyword">const</font> std::vector&lt;NLAILOGIC::CGoal *&gt; *goals = father-&gt;getGoalStack();
+00346
+00347 <font class="keywordtype">int</font> i;
+00348 <font class="keywordflow">for</font> ( i = 0; i &lt; (int) goals-&gt;size(); i++ )
+00349 {
+00350 <font class="keywordflow">if</font> ( (*( (*goals)[i])) == *( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getGoal() )
+00351 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o4">_ActivatedGoals</a>.push_back( (*goals)[i] );
+00352 }
+00353 }
+00354
+00355 <font class="comment">// Checks the boolean scripted funcs conditions</font>
+<a name="l00356"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a33">00356</a> <font class="keywordtype">bool</font> COperatorScript::checkPreconditions()
+00357 {
+00358 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00359 <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> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00360 <font class="preprocessor">#endif</font>
+00361 <font class="preprocessor"></font> <font class="comment">// Checks for message triggers</font>
+00362 <font class="keywordflow">if</font> ( ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;NbMsgTrigger() != 0 &amp;&amp; !<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a38">checkTrigMsg</a>() )
+00363 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00364
+00365 <a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> *context = (<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z142_17">getAgentManager</a>()-&gt;getAgentContext();
+00366 context-&gt;<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m3">Self</a> = <font class="keyword">this</font>;
+00367 <font class="keywordflow">return</font> ((<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *)<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a>)-&gt;isValidFonc( context );
+00368 }
+00369
+00370 <font class="comment">// Called by the goal when canceled: removes all childs and unactivates the operator.</font>
+<a name="l00371"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a25">00371</a> <font class="keywordtype">void</font> COperatorScript::cancel()
+00372 {
+00373 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = NULL;
+00374 CActorScript::cancel();
+00375 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = NULL;
+00376 }
+00377
+00378 <font class="comment">// The priority of an operator is calculated as follow:</font>
+00379 <font class="comment">// </font>
+00380 <font class="comment">// - If the operator is not activable (no corresponding goal and / or preconditions are not validated), return 0</font>
+00381 <font class="comment">// - If fuzzy conds exist, returns their truth value multiplied by the operator's class priority (defined in the script using the Priority keyword)</font>
+00382 <font class="comment">// - If no fuzzy conds, return 1 * the operator's class priority (defined in the script using the Priority keyword)</font>
+<a name="l00383"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a5">00383</a> <font class="keywordtype">void</font> COperatorScript::calcPriority()
+00384 {
+00385 <font class="keywordtype">int</font> i;
+00386 <font class="keywordtype">double</font> pri = 1.0;
+00387 <font class="keywordflow">for</font> ( i = 0; i &lt; (int) ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a>)-&gt;getFuzzyVars().size(); i++)
+00388 {
+00389 CComponentHandle var_handle( *(<font class="keyword">const</font> IVarName *)( ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getFuzzySets() )[i],(<a class="code" href="classNLAIAGENT_1_1IAgent.html#b0">IAgent</a> *)<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>(), <font class="keyword">true</font> );
+00390 CComponentHandle set_handle( *(<font class="keyword">const</font> IVarName *)( ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getFuzzyVars() )[i],(<a class="code" href="classNLAIAGENT_1_1IAgent.html#b0">IAgent</a> *)<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>(), <font class="keyword">true</font> );
+00391 CComponentHandle this_var_handle( *(<font class="keyword">const</font> IVarName *)( ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getFuzzySets() )[i], <font class="keyword">this</font>, <font class="keyword">true</font> );
+00392
+00393 <a class="code" href="classNLAIFUZZY_1_1IFuzzySet.html">NLAIFUZZY::IFuzzySet</a> *set = (<a class="code" href="classNLAIFUZZY_1_1IFuzzySet.html">NLAIFUZZY::IFuzzySet</a> *) set_handle.getValue();
+00394 DigitalType *var = (DigitalType *) var_handle.getValue();
+00395
+00396 <font class="keywordflow">if</font> ( var == NULL )
+00397 var = (DigitalType *) this_var_handle.getValue();
+00398
+00399 <font class="comment">// Min</font>
+00400 <font class="keywordflow">if</font> ( set != NULL &amp;&amp; var != NULL )
+00401 {
+00402 <font class="keywordtype">double</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = var-&gt;getNumber();
+00403 <font class="keywordtype">double</font> membership = set-&gt;<a class="code" href="classNLAIFUZZY_1_1IFuzzySet.html#a3">membership</a>( <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> );
+00404 <font class="keywordflow">if</font> ( membership &lt; pri )
+00405 pri = membership;
+00406 }
+00407 }
+00408
+00409 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00410 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00411 <font class="preprocessor">#endif</font>
+00412 <font class="preprocessor"></font>
+00413 <font class="comment">// float class_pri = ( (NLAISCRIPT::COperatorClass *) _AgentClass)-&gt;getPriority();</font>
+00414
+00415 <font class="keywordflow">if</font> (! <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o5">_IsActivable</a> )
+00416 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o8">_Priority</a> = 0.0;
+00417 <font class="keywordflow">else</font>
+00418 <font class="comment">// _Priority = (float)pri * class_pri;</font>
+00419 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o8">_Priority</a> = (float)pri * <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o9">_BasePriority</a>;
+00420 }
+00421
+<a name="l00422"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a4">00422</a> <font class="keywordtype">float</font> COperatorScript::priority()<font class="keyword"> const</font>
+00423 <font class="keyword"> </font>{
+00424 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o8">_Priority</a>;
+00425 }
+00426
+<a name="l00427"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a28">00427</a> <a class="code" href="classNLAILOGIC_1_1CFact.html">NLAILOGIC::CFact</a> *COperatorScript::buildFromVars(<a class="code" href="classNLAILOGIC_1_1IBaseAssert.html">NLAILOGIC::IBaseAssert</a> *<a class="code" href="debug_8h.html#a15">assert</a>, std::vector&lt;sint32&gt; &amp;pl, <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *vars)
+00428 {
+00429 <a class="code" href="classNLAILOGIC_1_1CFact.html">NLAILOGIC::CFact</a> *result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFact.html">NLAILOGIC::CFact</a>( assert); <font class="comment">// TODO:: pas besoin du nombre dans ce constructeur puisqu'on a l'assert</font>
+00430 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) pl.size() ; i++ )
+00431 {
+00432 result-&gt;<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a8">setValue</a>( i, (*vars)[ pl[i] ] );
+00433 }
+00434 <font class="keywordflow">return</font> result;
+00435 }
+00436
+00437 <font class="comment">// Tries to unify a new first order logic fact with current instanciations of the operator's vars</font>
+<a name="l00438"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a29">00438</a> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CValueSet *&gt;</a> *COperatorScript::propagate(<a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CValueSet *&gt;</a> &amp;liaisons, <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *fact, std::vector&lt;sint32&gt; &amp;pos_vals)
+00439 {
+00440 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CValueSet *&gt;</a> *conflits = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CValueSet *&gt;</a>;
+00441 std::list&lt;NLAILOGIC::CValueSet *&gt; buf_liaisons;
+00442 <font class="comment">// Pour chaque liaison...</font>
+00443 <a class="code" href="classstd_1_1list.html">std::list&lt; NLAILOGIC::CValueSet *&gt;</a>::iterator it_l = liaisons.begin();
+00444
+00445 <font class="keywordflow">while</font> ( it_l != liaisons.end() )
+00446 {
+00447 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a> = *it_l;
+00448
+00449 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *result = <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a31">unifyLiaison</a>( l, fact, pos_vals );
+00450 <font class="keywordflow">if</font> ( result )
+00451 {
+00452 <font class="keywordflow">if</font> ( result-&gt;<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a15">undefined</a>() == 0 )
+00453 {
+00454 conflits-&gt;push_back( result );
+00455 }
+00456 <font class="keywordflow">else</font>
+00457 buf_liaisons.push_back( result );
+00458 }
+00459 it_l++;
+00460 }
+00461
+00462 <font class="keywordflow">while</font> ( buf_liaisons.size() )
+00463 {
+00464 liaisons.push_back( buf_liaisons.front() );
+00465 buf_liaisons.pop_front();
+00466 }
+00467
+00468 <font class="keywordflow">return</font> conflits;
+00469 }
+00470
+00471
+00472 <font class="comment">// Tries to unify a list of new first order logic facts with current instanciations of the operator's vars</font>
+<a name="l00473"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a30">00473</a> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *COperatorScript::propagate(<a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> &amp;facts)
+00474 {
+00475 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *conflicts = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a>;
+00476 <a class="code" href="classstd_1_1list.html">std::list&lt; NLAILOGIC::CValueSet *&gt;</a> liaisons;
+00477 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *empty = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a>( ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *)<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a>)-&gt;getVars().<a class="code" href="cf__lexical_8cpp.html#a94">size</a>() );
+00478 liaisons.push_back( empty );
+00479
+00480 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *op_class = (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a>;
+00481
+00482 std::list&lt;NLAILOGIC::CFact *&gt;::iterator it_f = facts.begin();
+00483 <font class="keywordflow">while</font> ( it_f != facts.end() )
+00484 {
+00485 std::vector&lt;sint32&gt; pos_asserts;
+00486 op_class-&gt;<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a11">getAssertPos</a>( (*it_f)-&gt;getAssert() , op_class-&gt;<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a49">getConds</a>(), pos_asserts);
+00487 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) pos_asserts.size(); i++ )
+00488 {
+00489 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CValueSet *&gt;</a> *links = <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a29">propagate</a>( liaisons, *it_f, op_class-&gt;<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a51">getPosVarsConds</a>()[ pos_asserts[i] ] );
+00490 <font class="keywordflow">if</font> ( links )
+00491 {
+00492 <font class="keywordflow">while</font> ( links-&gt;size() )
+00493 {
+00494 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) op_class-&gt;<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a50">getConcs</a>().size(); i++ )
+00495 {
+00496 <a class="code" href="classNLAILOGIC_1_1CFact.html">NLAILOGIC::CFact</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a28">buildFromVars</a>( op_class-&gt;<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a50">getConcs</a>()[i], op_class-&gt;<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a52">getPosVarsConcs</a>()[i], links-&gt;front() );
+00497 std::string buf;
+00498 r-&gt;<a class="code" href="classNLAILOGIC_1_1CFact.html#a16">getDebugString</a>( buf );
+00499 <font class="comment">// Tests if the fact is already in the conflicts list</font>
+00500 <font class="keywordtype">bool</font> found = <font class="keyword">false</font>;
+00501 std::list&lt;NLAILOGIC::CFact *&gt;::iterator it_c = conflicts-&gt;begin();
+00502 <font class="keywordflow">while</font> ( ! found &amp;&amp; it_c != conflicts-&gt;end() )
+00503 {
+00504 found = (**it_c) == *r;
+00505 it_c++;
+00506 }
+00507 <font class="keywordflow">if</font> ( !found )
+00508 {
+00509 std::string buf;
+00510 r-&gt;<a class="code" href="classNLAILOGIC_1_1CFact.html#a16">getDebugString</a>( buf );
+00511 conflicts-&gt;push_back( r );
+00512 }
+00513 }
+00514 links-&gt;front()-&gt;release();
+00515 links-&gt;pop_front();
+00516 }
+00517 <font class="keyword">delete</font> links;
+00518 }
+00519 }
+00520 it_f++;
+00521 }
+00522
+00523 <font class="keywordflow">while</font> ( liaisons.size() )
+00524 {
+00525 liaisons.front()-&gt;release();
+00526 liaisons.pop_front();
+00527 }
+00528 <font class="keywordflow">return</font> conflicts;
+00529 }
+00530
+00531
+00532 <font class="comment">// Simple unifcation between two first order logic patterns</font>
+<a name="l00533"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a31">00533</a> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *COperatorScript::unifyLiaison( <font class="keyword">const</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *fp, <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *vals, std::vector&lt;sint32&gt; &amp;pos_vals)
+00534 {
+00535 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *result;
+00536
+00537 <font class="keywordflow">if</font> ( (result = fp-&gt;<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a9">unify</a>( vals, pos_vals )) )
+00538 <font class="keywordflow">return</font> result;
+00539 <font class="keywordflow">else</font>
+00540 {
+00541 <font class="keywordflow">return</font> NULL;
+00542 }
+00543 }
+00544
+00545 <font class="comment">// Instanciates a goals's args as static components of the operator</font>
+<a name="l00546"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a23">00546</a> <font class="keywordtype">void</font> COperatorScript::linkGoalArgs(<a class="code" href="classNLAILOGIC_1_1CGoal.html">NLAILOGIC::CGoal</a> *g)
+00547 {
+00548 std::vector&lt;NLAIAGENT::IObjectIA *&gt;::const_iterator it_arg = g-&gt;<a class="code" href="classNLAILOGIC_1_1CGoal.html#a6">getArgs</a>().begin();
+00549 std::vector&lt;sint32&gt;::iterator it_pos = ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;getGoalVarPos().begin();
+00550 <font class="keywordflow">while</font> ( it_arg != g-&gt;<a class="code" href="classNLAILOGIC_1_1CGoal.html#a6">getArgs</a>().end() )
+00551 {
+00552 <font class="keywordflow">if</font>(!<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z144_17">setStaticMember</a>( *it_pos, *it_arg ))
+00553 (*it_arg)-&gt;incRef();
+00554 it_arg++;
+00555 it_pos++;
+00556 }
+00557 }
+00558
+00559 <font class="comment">// Function called when a launched actor succeded</font>
+<a name="l00560"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a26">00560</a> <font class="keywordtype">void</font> COperatorScript::onSuccess( IObjectIA *msg)
+00561 {
+00562 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00563 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00564 <font class="preprocessor">#endif</font>
+00565 <font class="preprocessor"></font> <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> == NULL)
+00566 <font class="keywordflow">return</font>;
+00567 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a>-&gt;<a class="code" href="classNLAILOGIC_1_1CGoal.html#a9">operatorSuccess</a>( <font class="keyword">this</font> );
+00568 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = NULL;
+00569 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#a7">unActivate</a>();
+00570 }
+00571
+00572 <font class="comment">// Function called when a lauched actor failed</font>
+<a name="l00573"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a27">00573</a> <font class="keywordtype">void</font> COperatorScript::onFailure( IObjectIA *)
+00574 {
+00575
+00576 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00577 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00578 <font class="preprocessor">#endif</font>
+00579 <font class="preprocessor"></font>
+00580 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> == NULL)
+00581 <font class="keywordflow">return</font>;
+00582 <font class="comment">// Tells the goal the operator failed</font>
+00583 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a>-&gt;<a class="code" href="classNLAILOGIC_1_1CGoal.html#a10">operatorFailure</a>( <font class="keyword">this</font> );
+00584 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o2">_CurrentGoal</a> = NULL;
+00585 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#a7">unActivate</a>();
+00586 }
+00587
+<a name="l00588"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a16">00588</a> IObjectIA::CProcessResult COperatorScript::runMethodBase(<font class="keywordtype">int</font> <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>,<font class="keywordtype">int</font> heritance, IObjectIA *<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)
+00589 {
+00590 IObjectIA::CProcessResult <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00591
+00592 <font class="keywordflow">switch</font> ( index )
+00593 {
+00594 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t0">fid_modeachieve</a>:
+00595 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a> = <font class="keyword">false</font>;
+00596 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00597 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00598 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00599
+00600 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t1">fid_modemaintain</a>:
+00601 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a> = <font class="keyword">true</font>;
+00602 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00603 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00604 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00605
+00606 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t5">fid_isActivable</a>:
+00607 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00608 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a>( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o5">_IsActivable</a> );
+00609 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00610
+00611 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t2">fid_isPaused</a>:
+00612 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00613 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a>( <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n2">_IsPaused</a> );
+00614 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00615
+00616 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t3">fid_getPriority</a>:
+00617 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00618 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1DigitalType.html">NLAIAGENT::DigitalType</a>( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a4">priority</a>() );
+00619 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00620
+00621 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t4">fid_setPriority</a>:
+00622 {
+00623 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a37">setPriority</a>(((<a class="code" href="classNLAIAGENT_1_1DigitalType.html">NLAIAGENT::DigitalType</a> *)((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *) <a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;get())-&gt;<a class="code" href="namespaceNLAIAGENT.html#a48">getValue</a>());
+00624 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00625 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00626 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00627 }
+00628
+00629 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t6">fid_background</a>:
+00630 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a> = <font class="keyword">false</font>;
+00631 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00632 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00633 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00634
+00635 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t7">fid_exclusive</a>:
+00636 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a> = <font class="keyword">true</font>;
+00637 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00638 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00639 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00640
+00641 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t8">fid_achieve</a>:
+00642 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00643 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00644 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00645
+00646 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t9">fid_order</a>:
+00647 {
+00648 <a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *receivers = (<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *) ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;getFront();
+00649 ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;popFront();
+00650 <a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *goal = (<a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *) ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;getFront();
+00651 ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;popFront();
+00652 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a39">order</a>( receivers, goal );
+00653 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00654 }
+00655 }
+00656 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00657 }
+00658
+<a name="l00659"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a17">00659</a> IObjectIA::CProcessResult COperatorScript::runMethodBase(<font class="keywordtype">int</font> <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>,IObjectIA *<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)
+00660 {
+00661 <font class="keywordtype">int</font> i = <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> - CActorScript::getMethodIndexSize();
+00662
+00663
+00664 IObjectIA::CProcessResult <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00665 std::vector&lt;CStringType *&gt; handles;
+00666
+00667
+00668 <font class="keywordflow">switch</font>( i )
+00669 {
+00670 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t1">fid_modemaintain</a>:
+00671 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a> = <font class="keyword">true</font>;
+00672 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00673 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00674 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00675
+00676 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t0">fid_modeachieve</a>:
+00677 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o7">_Maintain</a> = <font class="keyword">false</font>;
+00678 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00679 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00680 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00681
+00682 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t5">fid_isActivable</a>:
+00683 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00684 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a>( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o5">_IsActivable</a> );
+00685 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00686
+00687 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t2">fid_isPaused</a>:
+00688 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00689 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a>( <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n2">_IsPaused</a> );
+00690 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00691
+00692 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t3">fid_getPriority</a>:
+00693 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00694 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1DigitalType.html">NLAIAGENT::DigitalType</a>( <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a4">priority</a>() );
+00695 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00696
+00697 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t4">fid_setPriority</a>:
+00698 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o8">_Priority</a> = ((<a class="code" href="classNLAIAGENT_1_1DigitalType.html">NLAIAGENT::DigitalType</a> *)((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *) <a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;get())-&gt;getValue();
+00699 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00700 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00701 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00702
+00703 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t6">fid_background</a>:
+00704 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a> = <font class="keyword">false</font>;
+00705 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00706 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00707 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00708
+00709 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t7">fid_exclusive</a>:
+00710 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a> = <font class="keyword">true</font>;
+00711 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.ResultState = NLAIAGENT::processIdle;
+00712 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Result = NULL;
+00713 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00714
+00715 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t9">fid_order</a>:
+00716 {
+00717 <a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *receivers = (<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *) ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;getFront();
+00718 ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;popFront();
+00719 <a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *goal = (<a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *) ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;getFront();
+00720 ((<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>)-&gt;popFront();
+00721 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a39">order</a>( receivers, goal );
+00722 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00723 }
+00724
+00725 }
+00726 <font class="keywordflow">return</font> CActorScript::runMethodBase(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a357">params</a>);
+00727 }
+00728
+<a name="l00729"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a20">00729</a> <font class="keywordtype">int</font> COperatorScript::getBaseMethodCount()<font class="keyword"> const</font>
+00730 <font class="keyword"> </font>{
+00731 <font class="keywordflow">return</font> CActorScript::getBaseMethodCount() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t10">fid_last</a>;
+00732 }
+00733
+<a name="l00734"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a18">00734</a> <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> COperatorScript::getPrivateMember(<font class="keyword">const</font> IVarName *className,<font class="keyword">const</font> IVarName *name,<font class="keyword">const</font> IObjectIA &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>)<font class="keyword"> const</font>
+00735 <font class="keyword"> </font>{
+00736
+00737 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00738 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_func_name = name-&gt;getString();
+00739 <font class="preprocessor">#endif</font>
+00740 <font class="preprocessor"></font>
+00741 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> result;
+00742
+00743 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> modeachieve_name(<font class="stringliteral">"SetModeAchieve"</font>);
+00744 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> modemaintain_name(<font class="stringliteral">"SetModeMaintain"</font>);
+00745 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> ispaused_name(<font class="stringliteral">"IsPaused"</font>);
+00746 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> isactivable_name(<font class="stringliteral">"IsActivable"</font>);
+00747 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> priority_name(<font class="stringliteral">"GetPriority"</font>);
+00748 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> set_priority_name(<font class="stringliteral">"SetPriority"</font>);
+00749 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> exclusive_name(<font class="stringliteral">"SetExclusive"</font>);
+00750 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> background_name(<font class="stringliteral">"SetBackground"</font>);
+00751 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> order_name(<font class="stringliteral">"Order"</font>);
+00752
+00753
+00754 <font class="keywordflow">if</font> ( *name == modeachieve_name )
+00755 {
+00756 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00757 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t0">fid_modeachieve</a>, 0.0,NULL, r_type ) );
+00758 }
+00759
+00760 <font class="keywordflow">if</font> ( *name == modemaintain_name )
+00761 {
+00762 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00763 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t1">fid_modemaintain</a> , 0.0,NULL, r_type ) );
+00764 }
+00765
+00766 <font class="keywordflow">if</font> ( *name == ispaused_name )
+00767 {
+00768 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00769 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t2">fid_isPaused</a> , 0.0,NULL, r_type ) );
+00770 }
+00771
+00772
+00773 <font class="keywordflow">if</font> ( *name == isactivable_name )
+00774 {
+00775 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00776 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t5">fid_isActivable</a> , 0.0,NULL, r_type ) );
+00777 }
+00778
+00779 <font class="keywordflow">if</font> ( *name == priority_name )
+00780 {
+00781 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00782 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t3">fid_getPriority</a> , 0.0,NULL, r_type ) );
+00783 }
+00784
+00785 <font class="keywordflow">if</font> ( *name == set_priority_name )
+00786 {
+00787 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIAGENT_1_1DigitalType.html#p1">NLAIAGENT::DigitalType::IdDigitalType</a> ) );
+00788 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t4">fid_setPriority</a> , 0.0,NULL, r_type ) );
+00789 }
+00790
+00791 <font class="keywordflow">if</font> ( *name == exclusive_name )
+00792 {
+00793 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00794 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t7">fid_exclusive</a> , 0.0,NULL, r_type ) );
+00795 }
+00796
+00797 <font class="keywordflow">if</font> ( *name == background_name )
+00798 {
+00799 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00800 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t6">fid_background</a> , 0.0,NULL, r_type ) );
+00801 }
+00802
+00803 <font class="keywordflow">if</font> ( *name == order_name )
+00804 {
+00805 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *r_type = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( <a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a> ) );
+00806 result.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t9">fid_order</a> , 0.0,NULL, r_type ) );
+00807 }
+00808
+00809 <font class="keywordflow">if</font> ( result.empty() )
+00810 <font class="keywordflow">return</font> CActorScript::getPrivateMember(className, name, <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>);
+00811 <font class="keywordflow">else</font>
+00812 <font class="keywordflow">return</font> result;
+00813 }
+00814
+<a name="l00815"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a19">00815</a> sint32 COperatorScript::getMethodIndexSize()<font class="keyword"> const</font>
+00816 <font class="keyword"> </font>{
+00817 <font class="keywordflow">return</font> CActorScript::getMethodIndexSize() + <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#t11t10">fid_last</a>;
+00818 }
+00819
+<a name="l00820"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a36">00820</a> <font class="keywordtype">bool</font> COperatorScript::isExclusive()
+00821 {
+00822 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00823 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_exclusive = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a13">getType</a>();
+00824 <font class="preprocessor">#endif</font>
+00825 <font class="preprocessor"></font> <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o6">_Exclusive</a>;
+00826 }
+00827
+<a name="l00828"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a38">00828</a> <font class="keywordtype">bool</font> COperatorScript::checkTrigMsg()
+00829 {
+00830 <a class="code" href="classNLAIAGENT_1_1IBasicAgent.html#b0">IBasicAgent</a> *father = (<a class="code" href="classNLAIAGENT_1_1IBasicAgent.html#b0">IBasicAgent</a> *) <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>();
+00831 <font class="keywordflow">if</font> ( father != NULL )
+00832 {
+00833 IMailBox *mailbox = father-&gt;getMail();
+00834 <font class="keywordflow">if</font> ( mailbox != NULL )
+00835 {
+00836 <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a>::const_iterator it_msg;
+00837 <font class="keyword">const</font> <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a> &amp;msg_list = mailbox-&gt;getMesseageListe();
+00838
+00839 it_msg = msg_list.begin();
+00840 <font class="keywordflow">while</font> ( it_msg != msg_list.end() )
+00841 {
+00842 IMessageBase *msg = (<a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *)*it_msg;
+00843 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00844 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a> = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) msg-&gt;getType();
+00845 <font class="preprocessor">#endif</font>
+00846 <font class="preprocessor"></font>
+00847 sint32 msg_comp_pos = ( (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html">NLAISCRIPT::COperatorClass</a> *) <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#n4">_AgentClass</a> )-&gt;checkTriggerMsg( msg );
+00848 <font class="keywordflow">if</font> ( msg_comp_pos == -1)
+00849 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00850 <font class="keywordflow">else</font>
+00851 {
+00852 <font class="keywordflow">if</font>(!<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#z144_17">setStaticMember</a>( msg_comp_pos, (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *) msg ))
+00853 msg-&gt;incRef();
+00854 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00855 }
+00856 it_msg++;
+00857 }
+00858 }
+00859 }
+00860 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00861 }
+00862
+<a name="l00863"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a39">00863</a> <font class="keywordtype">void</font> COperatorScript::order( <a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *receivers, <a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *order)
+00864 {
+00865 <a class="code" href="classNLAIAGENT_1_1CActorScript.html#n9">_NbAnswers</a> = receivers-&gt;<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_12">size</a>();
+00866 <font class="keywordflow">while</font> ( receivers-&gt;<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_12">size</a>() )
+00867 {
+00868 <a class="code" href="classNLAIAGENT_1_1CGoalMsg.html">NLAIAGENT::CGoalMsg</a> *msg = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CGoalMsg.html">NLAIAGENT::CGoalMsg</a>();
+00869 <a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *goal = (<a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *) order-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>();
+00870 msg-&gt;<a class="code" href="classNLAIAGENT_1_1IListBasicManager.html#z161_4">set</a>( 0, (<a class="code" href="classNLAILOGIC_1_1IGoal.html">NLAILOGIC::IGoal</a> *) goal );
+00871 goal-&gt;<a class="code" href="classNLAILOGIC_1_1IGoal.html#a19">setSender</a>( <font class="keyword">this</font> );
+00872 msg-&gt;<a class="code" href="classNLAIAGENT_1_1IMessageBase.html#z165_0">setSender</a>( <font class="keyword">this</font> );
+00873 msg-&gt;<a class="code" href="classNLAIAGENT_1_1IMessageBase.html#a9">setPerformatif</a>( <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s2">NLAIAGENT::IMessageBase::PAchieve</a> );
+00874 <a class="code" href="classNLAIAGENT_1_1CProxyAgentMail.html">NLAIAGENT::CProxyAgentMail</a> *member = (<a class="code" href="classNLAIAGENT_1_1CProxyAgentMail.html">NLAIAGENT::CProxyAgentMail</a> *) receivers-&gt;<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_11">getFront</a>()-&gt;clone();
+00875 member-&gt;<a class="code" href="classNLAIAGENT_1_1CProxyAgentMail.html#z141_6">sendMessage</a>( (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *) msg );
+00876 receivers-&gt;<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_9">popFront</a>();
+00877 }
+00878 }
+00879
+<a name="l00880"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a12">00880</a> <font class="keywordtype">void</font> COperatorScript::processMessages(<a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *msg,<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *o)
+00881 {
+00882 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00883 <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;<a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>();
+00884 <font class="preprocessor">#endif</font>
+00885 <font class="preprocessor"></font> CAgentScript::processMessages(msg,o);
+00886 }
+00887
+<a name="l00888"></a><a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a37">00888</a> <font class="keywordtype">void</font> COperatorScript::setPriority(<font class="keywordtype">float</font> prio)
+00889 {
+00890 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html#o9">_BasePriority</a> = prio;
+00891 }
+00892 }
+</pre></div>
+
+<!-- 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>