aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/logic_2interpret__object__operator_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/logic_2interpret__object__operator_8cpp-source.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/logic_2interpret__object__operator_8cpp-source.html')
-rw-r--r--docs/doxygen/nel/logic_2interpret__object__operator_8cpp-source.html1010
1 files changed, 1010 insertions, 0 deletions
diff --git a/docs/doxygen/nel/logic_2interpret__object__operator_8cpp-source.html b/docs/doxygen/nel/logic_2interpret__object__operator_8cpp-source.html
new file mode 100644
index 00000000..7c93c13f
--- /dev/null
+++ b/docs/doxygen/nel/logic_2interpret__object__operator_8cpp-source.html
@@ -0,0 +1,1010 @@
+<!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>interpret_object_operator.cpp</h1><a href="logic_2interpret__object__operator_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="preprocessor">#include "<a class="code" href="registry__class_8h.html">nel/ai/c/registry_class.h</a>"</font>
+00002 <font class="preprocessor">#include "<a class="code" href="actor__script_8h.html">nel/ai/agent/actor_script.h</a>"</font>
+00003 <font class="preprocessor">#include "<a class="code" href="lexsupport_8h.html">nel/ai/script/lexsupport.h</a>"</font>
+00004 <font class="preprocessor">#include "<a class="code" href="interpret__object__operator_8h.html">nel/ai/logic/interpret_object_operator.h</a>"</font>
+00005 <font class="preprocessor">#include "<a class="code" href="operator__script_8h.html">nel/ai/logic/operator_script.h</a>"</font>
+00006 <font class="preprocessor">#include "<a class="code" href="fact_8h.html">nel/ai/logic/fact.h</a>"</font>
+00007 <font class="preprocessor">#include "<a class="code" href="factbase_8h.html">nel/ai/logic/factbase.h</a>"</font>
+00008 <font class="preprocessor">#include "<a class="code" href="varset_8h.html">nel/ai/logic/varset.h</a>"</font>
+00009 <font class="preprocessor">#include "<a class="code" href="codage_8h.html">nel/ai/script/codage.h</a>"</font>
+00010
+00011
+00012 <font class="preprocessor">#ifdef NL_DEBUG </font>
+00013 <font class="preprocessor"></font><font class="preprocessor">#ifdef NL_OS_WINDOWS</font>
+00014 <font class="preprocessor"></font><font class="preprocessor">#include "windows.h"</font>
+00015 <font class="preprocessor">#endif</font>
+00016 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
+00017 <font class="preprocessor"></font>
+00018 <font class="keyword">namespace </font>NLAISCRIPT
+00019 {
+00020 <font class="preprocessor">#ifdef NL_DEBUG </font>
+00021 <font class="preprocessor"></font> <font class="keyword">extern</font> <font class="keywordtype">bool</font> NL_AI_DEBUG_SERVER;
+00022 <font class="preprocessor">#endif</font>
+<a name="l00023"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a23">00023</a> <font class="preprocessor"></font> COperatorClass::COperatorClass(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &amp;n) : CAgentClass(n)
+00024 {
+00025 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass()))-&gt;<a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>());
+00026 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass())));
+00027 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = NULL;
+00028 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> = NULL;
+00029 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a>();
+00030 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o16">_UpdateCycles</a> = 0;
+00031 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o17">_Priority</a> = 1;
+00032 }
+00033
+<a name="l00034"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a24">00034</a> COperatorClass::COperatorClass(<font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>): CAgentClass(<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>)
+00035 {
+00036 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass()))-&gt;<a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>());
+00037 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass())));
+00038 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = NULL;
+00039 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> = NULL;
+00040 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a>();
+00041 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o16">_UpdateCycles</a> = 0;
+00042 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o17">_Priority</a> = 1;
+00043 }
+00044
+<a name="l00045"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a25">00045</a> COperatorClass::COperatorClass(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &amp;n, <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &amp;inheritance) : CAgentClass( inheritance )
+00046 {
+00047 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass()))-&gt;<a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>());
+00048 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass())));
+00049 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = NULL;
+00050 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> = NULL;
+00051 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a>();
+00052 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o16">_UpdateCycles</a> = 0;
+00053 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o17">_Priority</a> = 1;
+00054 }
+00055
+<a name="l00056"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a26">00056</a> COperatorClass::COperatorClass(<font class="keyword">const</font> COperatorClass &amp;c) : CAgentClass( c )
+00057 {
+00058 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass()))-&gt;<a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>());
+00059 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass())));
+00060 <font class="keywordflow">if</font> ( c._Goal != NULL)
+00061 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = (<a class="code" href="classNLAILOGIC_1_1CGoal.html">NLAILOGIC::CGoal</a> *) c._Goal-&gt;<a class="code" href="classNLAILOGIC_1_1CGoal.html#a12">clone</a>();
+00062 <font class="keywordflow">else</font>
+00063 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = NULL;
+00064
+00065 <font class="keywordflow">if</font> ( c._Comment != NULL )
+00066 {
+00067 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> = <font class="keyword">new</font> <font class="keywordtype">char</font>[ strlen( c._Comment ) ];
+00068 strcpy( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a>, c._Comment );
+00069 }
+00070 <font class="keywordflow">else</font>
+00071 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> = NULL;
+00072
+00073 <font class="keywordflow">if</font> ( c._FactBase != NULL)
+00074 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a> = (<a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a> *) c._FactBase-&gt;<a class="code" href="classNLAILOGIC_1_1CFactBase.html#a7">clone</a>();
+00075 <font class="keywordflow">else</font>
+00076 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a>();
+00077
+00078 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o16">_UpdateCycles</a> = c._UpdateCycles;
+00079 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o17">_Priority</a> = c._Priority;
+00080
+00081 }
+00082
+<a name="l00083"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a27">00083</a> COperatorClass::COperatorClass()
+00084 {
+00085 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass()))-&gt;<a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>());
+00086 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *)(<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#p0">NLAIAGENT::COperatorScript::IdOperatorScript</a>.getFactory()-&gt;getClass())));
+00087 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = NULL;
+00088 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> = NULL;
+00089 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a>();
+00090 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o16">_UpdateCycles</a> = 0;
+00091 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o17">_Priority</a> = 1;
+00092 }
+00093
+<a name="l00094"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a28">00094</a> COperatorClass::~COperatorClass()
+00095 {
+00096 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> != NULL )
+00097 <font class="keyword">delete</font>[] <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a>;
+00098
+00099 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a> != NULL )
+00100 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a>-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00101
+00102 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> != NULL )
+00103 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a>-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00104
+00105
+00106 std::vector&lt;NLAIAGENT::IVarName *&gt;::iterator it_fvar = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m9">_FuzzyVars</a>.begin();
+00107 <font class="keywordflow">while</font> ( it_fvar != <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m9">_FuzzyVars</a>.end() )
+00108 {
+00109 (*it_fvar)-&gt;release();
+00110 it_fvar++;
+00111 }
+00112
+00113 it_fvar = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m10">_FuzzySets</a>.begin();
+00114 <font class="keywordflow">while</font> ( it_fvar != <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m10">_FuzzySets</a>.end() )
+00115 {
+00116 (*it_fvar)-&gt;release();
+00117 it_fvar++;
+00118 }
+00119
+00120 std::vector&lt; IOpCode *&gt;::iterator it_code = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m6">_CondCode</a>.begin();
+00121 <font class="keywordflow">while</font> ( it_code != <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m6">_CondCode</a>.end() )
+00122 {
+00123 (*it_code)-&gt;release();
+00124 it_code++;
+00125 }
+00126
+00127 it_code = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m7">_ConcCode</a>.begin();
+00128 <font class="keywordflow">while</font> ( it_code != <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m7">_ConcCode</a>.end() )
+00129 {
+00130 (*it_code)-&gt;release();
+00131 it_code++;
+00132 }
+00133 <font class="comment">/*</font>
+00134 <font class="comment"> int i;</font>
+00135 <font class="comment"> for ( i = 0; i &lt; (int) _CondCode.size(); i++ )</font>
+00136 <font class="comment"> {</font>
+00137 <font class="comment"> ( (NLAIAGENT::IVarName *)_CondCode[i] )-&gt;release();</font>
+00138 <font class="comment"> }</font>
+00139 <font class="comment"></font>
+00140 <font class="comment"> for ( i = 0; i &lt; (int) _CondCode.size(); i++ )</font>
+00141 <font class="comment"> {</font>
+00142 <font class="comment"> ( (NLAIAGENT::IVarName *)_ConcCode[i] )-&gt;release();</font>
+00143 <font class="comment"> }</font>
+00144 <font class="comment"></font>
+00145 <font class="comment"> for ( i = 0; i &lt; (int) _CondAsserts.size(); i++ )</font>
+00146 <font class="comment"> {</font>
+00147 <font class="comment"> ( (NLAIAGENT::IVarName *) _CondAsserts[i] )-&gt;release();</font>
+00148 <font class="comment"> }</font>
+00149 <font class="comment"></font>
+00150 <font class="comment"> for ( i = 0; i &lt; (int) _ConcAsserts.size(); i++ )</font>
+00151 <font class="comment"> {</font>
+00152 <font class="comment"> ( (NLAIAGENT::IVarName *) _ConcAsserts[i] )-&gt;release();</font>
+00153 <font class="comment"> }</font>
+00154 <font class="comment"></font>
+00155 <font class="comment"> std::list&lt;const NLAIAGENT::IVarName *&gt;::iterator it_n = _BooleanConds.begin();</font>
+00156 <font class="comment"> while ( _BooleanConds.size() )</font>
+00157 <font class="comment"> {</font>
+00158 <font class="comment"> ( (NLAIAGENT::IVarName *) _BooleanConds.front() )-&gt;release();</font>
+00159 <font class="comment"> _BooleanConds.pop_front();</font>
+00160 <font class="comment"> }</font>
+00161 <font class="comment"></font>
+00162 <font class="comment"> it_n = _BooleanConcs.begin();</font>
+00163 <font class="comment"> while ( _BooleanConcs.size() )</font>
+00164 <font class="comment"> {</font>
+00165 <font class="comment"> ( (NLAIAGENT::IVarName *) _BooleanConcs.front() )-&gt;release();</font>
+00166 <font class="comment"> _BooleanConcs.pop_front();</font>
+00167 <font class="comment"> }</font>
+00168 <font class="comment"> */</font>
+00169 }
+00170
+00171
+<a name="l00172"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a29">00172</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *COperatorClass::clone()<font class="keyword"> const</font>
+00173 <font class="keyword"> </font>{
+00174 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a29">clone</a> = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a27">COperatorClass</a>(*<font class="keyword">this</font>);
+00175 <font class="keywordflow">return</font> clone;
+00176 }
+00177
+<a name="l00178"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a30">00178</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *COperatorClass::newInstance()<font class="keyword"> const</font>
+00179 <font class="keyword"> </font>{
+00180 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *instance = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a27">COperatorClass</a>();
+00181 <font class="keywordflow">return</font> instance;
+00182 }
+00183
+<a name="l00184"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a31">00184</a> <font class="keywordtype">void</font> COperatorClass::getDebugString(std::string &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>)<font class="keyword"> const</font>
+00185 <font class="keyword"> </font>{
+00186 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"&lt;COperatorClass&gt;"</font>;
+00187 <font class="keywordtype">int</font> i;
+00188 <font class="keywordflow">for</font> ( i = 0; i &lt; (int) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>.size(); i++ )
+00189 {
+00190 std::string buf;
+00191 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>[i]-&gt;getDebugString(buf);
+00192 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">" -"</font>;
+00193 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += buf;
+00194 }
+00195 }
+00196
+<a name="l00197"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a32">00197</a> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *COperatorClass::buildNewInstance()<font class="keyword"> const</font>
+00198 <font class="keyword"> </font>{
+00199 <font class="comment">// Création des composants statiques</font>
+00200 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAIAGENT::IObjectIA *&gt;</a> <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>;
+00201 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a25">createBaseClassComponents</a>( components );
+00202
+00203 <font class="comment">// Création du message</font>
+00204 <a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a> *instance = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1COperatorScript.html">NLAIAGENT::COperatorScript</a>( NULL, NULL ,components, (<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a23">COperatorClass</a> *) <font class="keyword">this</font> );
+00205 instance-&gt;<a class="code" href="classNLAIAGENT_1_1COperatorScript.html#a37">setPriority</a>(<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a57">getPriority</a>());
+00206
+00207 <font class="keywordflow">return</font> instance;
+00208 }
+00209
+<a name="l00211"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a4">00211</a> <font class="keywordtype">bool</font> COperatorClass::isValid(<a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a> *fb)
+00212 {
+00213 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *facts = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a>;
+00214 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>.size(); i++ )
+00215 {
+00216 std::list&lt;NLAILOGIC::CFact *&gt; *fa = fb-&gt;<a class="code" href="classNLAILOGIC_1_1CFactBase.html#a16">getAssertFacts</a>( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>[i] );
+00217 <font class="keywordflow">while</font> ( fa-&gt;size() )
+00218 {
+00219 facts-&gt;push_back( fa-&gt;front() );
+00220 fa-&gt;pop_front();
+00221 }
+00222 <font class="keyword">delete</font> fa;
+00223 }
+00224 std::list&lt;NLAILOGIC::CFact *&gt; *<a class="code" href="driver__opengl__extension__def_8h.html#a400">res</a> = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a17">propagate</a>( *facts );
+00225 <font class="keywordtype">bool</font> is_valid = !res-&gt;empty();
+00226 <font class="keywordflow">while</font> ( res-&gt;size() )
+00227 {
+00228 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00229 <font class="preprocessor"></font>
+00230 <font class="preprocessor">#endif</font>
+00231 <font class="preprocessor"></font> res-&gt;front()-&gt;release();
+00232 res-&gt;pop_front();
+00233 }
+00234 <font class="keyword">delete</font> res;
+00235
+00236 <font class="keywordflow">while</font> ( facts-&gt;size() )
+00237 {
+00238 facts-&gt;front()-&gt;release();
+00239 facts-&gt;pop_front();
+00240 }
+00241 <font class="keyword">delete</font> facts;
+00242
+00243 <font class="keywordflow">return</font> is_valid;
+00244 }
+00245
+<a name="l00246"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a12">00246</a> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *COperatorClass::unifyBackward(<a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> &amp;facts)
+00247 {
+00248 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *unified = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a>( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>.size() );
+00249 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a>::iterator it_f = facts.begin();
+00250 <font class="keywordflow">while</font> ( it_f != facts.end() )
+00251 {
+00252 std::vector&lt;sint32&gt; pos_assert;
+00253 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a11">getAssertPos</a>( (*it_f)-&gt;getAssert(), <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o7">_Concs</a>, pos_assert );
+00254 <font class="keywordflow">for</font> (sint32 pos = 0; pos &lt; (sint32) pos_assert.size(); pos++)
+00255 {
+00256 <font class="keywordflow">for</font> ( sint32 ivar = 0; ivar &lt; (sint32) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o8">_PosVarsConc</a>[ pos_assert[pos] ].size(); ivar++ )
+00257 {
+00258 sint32 l_pos = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o8">_PosVarsConc</a>[ pos_assert[pos] ][ivar];
+00259
+00260 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *l_val = (*unified)[ l_pos ];
+00261 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *r_val = (**it_f)[ ivar ];
+00262
+00263 <font class="keywordflow">if</font> ( !l_val )
+00264 {
+00265 <font class="keywordflow">if</font> ( r_val )
+00266 {
+00267 unified-&gt;setValue( l_pos, r_val );
+00268 }
+00269 }
+00270 <font class="keywordflow">else</font>
+00271 {
+00272 <font class="keywordflow">if</font> ( r_val &amp;&amp; ( l_val != r_val ) )
+00273 {
+00274 unified-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00275 <font class="keywordflow">return</font> NULL;
+00276 }
+00277 }
+00278 }
+00279 }
+00280 it_f++;
+00281 }
+00282 <font class="keywordflow">return</font> unified;
+00283 }
+00284
+<a name="l00285"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a13">00285</a> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *COperatorClass::unifyForward(<a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> &amp;facts)
+00286 {
+00287 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *unified = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a>( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>.size() );
+00288 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a>::iterator it_f = facts.begin();
+00289 <font class="keywordflow">while</font> ( it_f != facts.end() )
+00290 {
+00291 std::vector&lt;sint32&gt; pos_assert;
+00292 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a11">getAssertPos</a>( (*it_f)-&gt;getAssert(), <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>, pos_assert );
+00293 <font class="keywordflow">for</font> (sint32 pos = 0; pos &lt; (sint32) pos_assert.size(); pos++)
+00294 {
+00295 <font class="keywordflow">for</font> ( sint32 ivar = 0; ivar &lt; (sint32) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o6">_PosVarsCond</a>[ pos_assert[pos] ].size(); ivar++ )
+00296 {
+00297 sint32 l_pos = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o6">_PosVarsCond</a>[ pos_assert[pos] ][ivar];
+00298
+00299 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *l_val = (*unified)[ l_pos ];
+00300 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *r_val = (**it_f)[ ivar ];
+00301
+00302 <font class="keywordflow">if</font> ( !l_val )
+00303 {
+00304 <font class="keywordflow">if</font> ( r_val )
+00305 {
+00306 unified-&gt;setValue( l_pos, r_val );
+00307 }
+00308 }
+00309 <font class="keywordflow">else</font>
+00310 {
+00311 <font class="keywordflow">if</font> ( r_val &amp;&amp; ( l_val != r_val ) )
+00312 {
+00313 unified-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00314 <font class="keywordflow">return</font> NULL;
+00315 }
+00316 }
+00317 }
+00318 }
+00319 it_f++;
+00320 }
+00321 <font class="keywordflow">return</font> unified;
+00322 }
+00323
+<a name="l00324"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a6">00324</a> <a class="code" href="classNLAILOGIC_1_1CFact.html">NLAILOGIC::CFact</a> *COperatorClass::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)
+00325 {
+00326 <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>
+00327 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) pl.size() ; i++ )
+00328 {
+00329 result-&gt;<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a8">setValue</a>( i, (*vars)[ pl[i] ] );
+00330 }
+00331 <font class="keywordflow">return</font> result;
+00332 }
+00333
+<a name="l00334"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a15">00334</a> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *COperatorClass::backward(<a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> &amp;facts)
+00335 {
+00336 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *unified = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a12">unifyBackward</a>( facts );
+00337 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *result = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a>;
+00338 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>.size(); i++ )
+00339 {
+00340 <a class="code" href="classNLAILOGIC_1_1CFact.html">NLAILOGIC::CFact</a> *tmp = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a6">buildFromVars</a>( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>[i], <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o6">_PosVarsCond</a>[i], unified );
+00341 result-&gt;push_back( tmp );
+00342 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00343 <font class="preprocessor"></font>
+00344 <font class="preprocessor">#endif</font>
+00345 <font class="preprocessor"></font> }
+00346 unified-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00347 <font class="keywordflow">return</font> result;
+00348 }
+00349
+<a name="l00350"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a16">00350</a> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *COperatorClass::forward(<a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> &amp;facts)
+00351 {
+00352 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *unified = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a13">unifyForward</a>( facts );
+00353 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00354 <font class="preprocessor"></font>
+00355 <font class="preprocessor">#endif</font>
+00356 <font class="preprocessor"></font> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *result = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a>;
+00357 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o7">_Concs</a>.size(); i++ )
+00358 {
+00359 <a class="code" href="classNLAILOGIC_1_1CFact.html">NLAILOGIC::CFact</a> *tmp = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a6">buildFromVars</a>( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o7">_Concs</a>[i], <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o8">_PosVarsConc</a>[i], unified );
+00360 result-&gt;push_back( tmp );
+00361 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00362 <font class="preprocessor"></font>
+00363 <font class="preprocessor">#endif</font>
+00364 <font class="preprocessor"></font> }
+00365 unified-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00366 <font class="keywordflow">return</font> result;
+00367 }
+00368
+00369
+<a name="l00370"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a17">00370</a> <a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> *COperatorClass::propagate(<a class="code" href="classstd_1_1list.html">std::list&lt;NLAILOGIC::CFact *&gt;</a> &amp;facts)
+00371 {
+00372 <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>;
+00373 <a class="code" href="classstd_1_1list.html">std::list&lt; NLAILOGIC::CValueSet *&gt;</a> liaisons;
+00374 <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#o4">_Vars</a>.size() );
+00375 liaisons.push_back( empty );
+00376
+00377 std::list&lt;NLAILOGIC::CFact *&gt;::iterator it_f = facts.begin();
+00378 <font class="keywordflow">while</font> ( it_f != facts.end() )
+00379 {
+00380 std::vector&lt;sint32&gt; pos_asserts;
+00381 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a11">getAssertPos</a>( (*it_f)-&gt;getAssert() , <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>, pos_asserts);
+00382 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) pos_asserts.size(); i++ )
+00383 {
+00384 <font class="comment">/* std::list&lt;NLAILOGIC::CValueSet *&gt; *links = propagate( liaisons, *it_f, _PosVarsCond[ pos_asserts[i] ] );</font>
+00385 <font class="comment"> if ( links )</font>
+00386 <font class="comment"> {</font>
+00387 <font class="comment"> while ( links-&gt;size() )</font>
+00388 <font class="comment"> {</font>
+00389 <font class="comment"> for (sint32 i = 0; i &lt; (sint32) _Concs.size(); i++ )</font>
+00390 <font class="comment"> {</font>
+00391 <font class="comment"> NLAILOGIC::CFact *r = buildFromVars( _Concs[i], _PosVarsConc[i], links-&gt;front() );</font>
+00392 <font class="comment"> char buf[1024];</font>
+00393 <font class="comment"> r-&gt;getDebugString( buf );</font>
+00394 <font class="comment"> // Tests if the fact is already in the conflicts list</font>
+00395 <font class="comment"> bool found = false;</font>
+00396 <font class="comment"> std::list&lt;NLAILOGIC::CFact *&gt;::iterator it_c = conflicts-&gt;begin();</font>
+00397 <font class="comment"> while ( ! found &amp;&amp; it_c != conflicts-&gt;end() )</font>
+00398 <font class="comment"> {</font>
+00399 <font class="comment"> found = (**it_c) == *r;</font>
+00400 <font class="comment"> it_c++;</font>
+00401 <font class="comment"> }</font>
+00402 <font class="comment"> if ( !found )</font>
+00403 <font class="comment"> {</font>
+00404 <font class="comment"> char buf[1024];</font>
+00405 <font class="comment"> r-&gt;getDebugString( buf );</font>
+00406 <font class="comment"> conflicts-&gt;push_back( r );</font>
+00407 <font class="comment"> }</font>
+00408 <font class="comment"> }</font>
+00409 <font class="comment"> links-&gt;front()-&gt;release();</font>
+00410 <font class="comment"> links-&gt;pop_front();</font>
+00411 <font class="comment"> }</font>
+00412 <font class="comment"> delete links;</font>
+00413 <font class="comment"> }</font>
+00414 <font class="comment"> */</font>
+00415 }
+00416 it_f++;
+00417 }
+00418
+00419 <font class="keywordflow">while</font> ( liaisons.size() )
+00420 {
+00421 liaisons.front()-&gt;release();
+00422 liaisons.pop_front();
+00423 }
+00424
+00425 <font class="keywordflow">return</font> conflicts;
+00426 }
+00427
+<a name="l00428"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a8">00428</a> <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *COperatorClass::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)
+00429 {
+00430 <a class="code" href="classNLAILOGIC_1_1CValueSet.html">NLAILOGIC::CValueSet</a> *result;
+00431
+00432 <font class="keywordflow">if</font> ( (result = fp-&gt;<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a9">unify</a>( vals, pos_vals )) )
+00433 <font class="keywordflow">return</font> result;
+00434 <font class="keywordflow">else</font>
+00435 {
+00436 <font class="keyword">delete</font> result;
+00437 <font class="keywordflow">return</font> NULL;
+00438 }
+00439 }
+00440
+<a name="l00441"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a11">00441</a> <font class="keywordtype">void</font> COperatorClass::getAssertPos(<a class="code" href="classNLAILOGIC_1_1IBaseAssert.html">NLAILOGIC::IBaseAssert</a> *a, std::vector&lt;NLAILOGIC::IBaseAssert *&gt; &amp;<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>, std::vector&lt;sint32&gt; &amp;pos)
+00442 {
+00443 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32) <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>.size() ; i++ )
+00444 {
+00445 <font class="keywordflow">if</font> ( (*(<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>[i])) == a )
+00446 pos.push_back(i);
+00447 }
+00448 }
+00449
+<a name="l00450"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a18">00450</a> <font class="keywordtype">float</font> COperatorClass::priority()<font class="keyword"> const</font>
+00451 <font class="keyword"> </font>{
+00452 <font class="keywordflow">return</font> 0.0;
+00453 }
+00454
+<a name="l00455"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a19">00455</a> <font class="keywordtype">void</font> COperatorClass::success()
+00456 {
+00457 }
+00458
+<a name="l00459"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a20">00459</a> <font class="keywordtype">void</font> COperatorClass::failure()
+00460 {
+00461 }
+00462
+<a name="l00463"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a21">00463</a> <font class="keywordtype">void</font> COperatorClass::success(<a class="code" href="classNLAILOGIC_1_1IBaseOperator.html">NLAILOGIC::IBaseOperator</a> *)
+00464 {
+00465 }
+00466
+<a name="l00467"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a22">00467</a> <font class="keywordtype">void</font> COperatorClass::failure(<a class="code" href="classNLAILOGIC_1_1IBaseOperator.html">NLAILOGIC::IBaseOperator</a> *)
+00468 {
+00469 }
+00470
+<a name="l00471"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a3">00471</a> <font class="keyword">const</font> <a class="code" href="classNLAILOGIC_1_1CGoal.html">NLAILOGIC::CGoal</a> *COperatorClass::getGoal()
+00472 {
+00473 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a>;
+00474 }
+00475
+<a name="l00476"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a33">00476</a> <font class="keywordtype">void</font> COperatorClass::addPrecondition(<a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *pattern)
+00477 {
+00478 <font class="keywordflow">if</font> ( pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CFactPattern.html#a3">getAssert</a>() )
+00479 {
+00480 std::vector&lt;sint32&gt; pos_Vars;
+00481 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a5">compileFactPattern</a>( pattern, <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>, pos_Vars);
+00482
+00483 <font class="comment">// pattern-&gt;getAssert()-&gt;addClause( this, pos_Vars );</font>
+00484 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>.push_back( pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CFactPattern.html#a3">getAssert</a>() );
+00485 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o6">_PosVarsCond</a>.push_back( pos_Vars );
+00486
+00487 }
+00488 }
+00489
+<a name="l00490"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a34">00490</a> <font class="keywordtype">void</font> COperatorClass::addPostcondition(<a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *pattern)
+00491 {
+00492 <font class="keywordflow">if</font> ( pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CFactPattern.html#a3">getAssert</a>() )
+00493 {
+00494 std::vector&lt;sint32&gt; pos_Vars;
+00495 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a5">compileFactPattern</a>( pattern, <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o5">_Conds</a>, pos_Vars);
+00496
+00497 <font class="comment">// pattern-&gt;getAssert()-&gt;addInput( this );</font>
+00498 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o7">_Concs</a>.push_back( pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CFactPattern.html#a3">getAssert</a>() );
+00499 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o8">_PosVarsConc</a>.push_back( pos_Vars );
+00500 }
+00501 }
+00502
+00504
+00505 <font class="comment">/*</font>
+00506 <font class="comment"> void COperatorClass::compileFactPattern(NLAILOGIC::CFactPattern *fp, std::vector&lt;NLAILOGIC::IBaseAssert *&gt;&amp;patterns, std::vector&lt;sint32&gt; &amp;pos_Vars)</font>
+00507 <font class="comment"> {</font>
+00508 <font class="comment"> // Recherche si variables à ajouter</font>
+00509 <font class="comment"> std::vector&lt;NLAILOGIC::IBaseVar *&gt; *vars_pattern = fp-&gt;getVars();</font>
+00510 <font class="comment"> if ( vars_pattern )</font>
+00511 <font class="comment"> {</font>
+00512 <font class="comment"> std::vector&lt;NLAILOGIC::IBaseVar *&gt;::iterator it_cond = vars_pattern-&gt;begin();</font>
+00513 <font class="comment"> while ( it_cond != vars_pattern-&gt;end() )</font>
+00514 <font class="comment"> {</font>
+00515 <font class="comment"> sint32 id_var = getVarPos( *it_cond );</font>
+00516 <font class="comment"> if ( id_var != -1 )</font>
+00517 <font class="comment"> {</font>
+00518 <font class="comment"> pos_Vars.push_back( id_var );</font>
+00519 <font class="comment"> }</font>
+00520 <font class="comment"> else</font>
+00521 <font class="comment"> {</font>
+00522 <font class="comment"> _Vars.push_back( (NLAILOGIC::IBaseVar *)(*it_cond)-&gt;clone() );</font>
+00523 <font class="comment"> pos_Vars.push_back( _Vars.size() - 1);</font>
+00524 <font class="comment"> }</font>
+00525 <font class="comment"> it_cond++;</font>
+00526 <font class="comment"> }</font>
+00527 <font class="comment"> }</font>
+00528 <font class="comment"></font>
+00529 <font class="comment"> for ( sint32 i = 0; i &lt; (sint32) vars_pattern-&gt;size(); i++ )</font>
+00530 <font class="comment"> {</font>
+00531 <font class="comment"> (*vars_pattern)[i]-&gt;release();</font>
+00532 <font class="comment"> }</font>
+00533 <font class="comment"> delete vars_pattern;</font>
+00534 <font class="comment"> }</font>
+00535 <font class="comment"> */</font>
+00536
+<a name="l00537"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a5">00537</a> <font class="keywordtype">void</font> COperatorClass::compileFactPattern(<a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *fp, std::vector&lt;NLAILOGIC::IBaseAssert *&gt;&amp;patterns, std::vector&lt;sint32&gt; &amp;pos_Vars)
+00538 {
+00539 <font class="comment">// Recherche si variables à ajouter</font>
+00540 std::vector&lt;NLAILOGIC::IBaseVar *&gt; *vars_pattern = fp-&gt;<a class="code" href="classNLAILOGIC_1_1CVarSet.html#a15">getVars</a>();
+00541 <font class="keywordflow">if</font> ( vars_pattern )
+00542 {
+00543 std::vector&lt;NLAILOGIC::IBaseVar *&gt;::iterator it_cond = vars_pattern-&gt;begin();
+00544 <font class="keywordflow">while</font> ( it_cond != vars_pattern-&gt;end() )
+00545 {
+00546 <font class="comment">// Looks in the class components if the var already exists</font>
+00547 sint32 id_var = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a19">getComponentIndex</a>( (*it_cond)-&gt;getName() );
+00548
+00549 <font class="keywordflow">if</font> ( id_var != -1 )
+00550 {
+00551 <font class="comment">// If it exists, stores its index</font>
+00552 pos_Vars.push_back( id_var );
+00553 }
+00554 <font class="keywordflow">else</font>
+00555 {
+00556 <font class="comment">// If it doesn't exist, registers the var as a component of the class</font>
+00557 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name(<font class="stringliteral">"Var"</font>);
+00558 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a15">registerComponent</a>( var_name , (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> &amp;) (*it_cond)-&gt;getName() );
+00559
+00560 <font class="comment">// TODO: contrôle de type</font>
+00561
+00562 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>.push_back( (<a class="code" href="classNLAILOGIC_1_1IBaseVar.html">NLAILOGIC::IBaseVar</a> *)(*it_cond)-&gt;clone() );
+00563 pos_Vars.push_back( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>.size() - 1);
+00564 }
+00565 it_cond++;
+00566 }
+00567 }
+00568
+00569 <font class="keywordflow">for</font> ( sint32 i = 0; i &lt; (sint32) vars_pattern-&gt;size(); i++ )
+00570 {
+00571 (*vars_pattern)[i]-&gt;release();
+00572 }
+00573 <font class="keyword">delete</font> vars_pattern;
+00574 }
+00576
+<a name="l00578"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a7">00578</a> sint32 COperatorClass::getVarPos(<a class="code" href="classNLAILOGIC_1_1IBaseVar.html">NLAILOGIC::IBaseVar</a> *var)
+00579 {
+00580 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>.size() )
+00581 {
+00582 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; (sint32)<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>.size() ; i++ )
+00583 {
+00584 <font class="keywordflow">if</font> ( var-&gt;<a class="code" href="classNLAILOGIC_1_1IBaseVar.html#a5">getName</a>() == <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o4">_Vars</a>[ i ]-&gt;getName() )
+00585 {
+00586 <font class="keywordflow">return</font> i;
+00587 }
+00588 }
+00589 }
+00590 <font class="keywordflow">return</font> -1;
+00591 }
+00592
+<a name="l00594"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a35">00594</a> <font class="keywordtype">void</font> COperatorClass::addFirstOrderCond(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *assert_name, <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a> &amp;params_list)
+00595 {
+00596 <font class="comment">/* _CondAsserts.push_back( assert_name );</font>
+00597 <font class="comment"> std::list&lt;const NLAIAGENT::IVarName *&gt; *tmp_list = new std::list&lt;const NLAIAGENT::IVarName *&gt;;</font>
+00598 <font class="comment"> while ( !params_list.empty() )</font>
+00599 <font class="comment"> {</font>
+00600 <font class="comment"> const char *txt = params_list.front()-&gt;getString();</font>
+00601 <font class="comment"> tmp_list-&gt;push_back( params_list.front() );</font>
+00602 <font class="comment"> params_list.pop_front();</font>
+00603 <font class="comment"> } </font>
+00604 <font class="comment"> _ClassCondVars.push_back( tmp_list );</font>
+00605 <font class="comment"> */</font>
+00606
+00607 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)assert_name-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>();
+00608 <a class="code" href="classNLAILOGIC_1_1IBaseAssert.html">NLAILOGIC::IBaseAssert</a> *<a class="code" href="debug_8h.html#a15">assert</a> = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a>-&gt;<a class="code" href="classNLAILOGIC_1_1CFactBase.html#a5">addAssert</a>( name, params_list.size() );
+00609 <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *pattern = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a>( assert );
+00610 <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a>::iterator it_var = params_list.begin();
+00611 <font class="keywordflow">while</font> ( it_var != params_list.end() )
+00612 {
+00613 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)(*it_var);
+00614 pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CVarSet.html#a16">addVar</a>( <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CVar.html">NLAILOGIC::CVar</a>( var_name ) );
+00615 it_var++;
+00616 }
+00617 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a33">addPrecondition</a>( pattern );
+00618 }
+00619
+<a name="l00620"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a36">00620</a> <font class="keywordtype">void</font> COperatorClass::addFirstOrderConc(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *assert_name, <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a> &amp;params_list)
+00621 {
+00622 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m3">_ConcAsserts</a>.push_back( assert_name );
+00623 <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a> *tmp_list = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a>;
+00624 <font class="keywordflow">while</font> ( !params_list.empty() )
+00625 {
+00626 tmp_list-&gt;push_back( params_list.front() );
+00627 params_list.pop_front();
+00628 }
+00629 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m5">_ClassConcVars</a>.push_back( tmp_list );
+00630 }
+00631
+<a name="l00633"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a37">00633</a> <font class="keywordtype">void</font> COperatorClass::addBoolCond(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *cond_name)
+00634 {
+00635 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m0">_BooleanConds</a>.push_back( cond_name );
+00636 }
+00637
+<a name="l00638"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a38">00638</a> <font class="keywordtype">void</font> COperatorClass::addBoolConc(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *conc_name)
+00639 {
+00640 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m1">_BooleanConcs</a>.push_back( conc_name );
+00641 }
+00642
+<a name="l00645"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a39">00645</a> <font class="keywordtype">void</font> COperatorClass::addCodeCond(IOpCode *code)
+00646 {
+00647 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m6">_CondCode</a>.push_back( code );
+00648 }
+00649
+<a name="l00651"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a40">00651</a> <font class="keywordtype">void</font> COperatorClass::addCodeConc(IOpCode *code)
+00652 {
+00653 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m7">_ConcCode</a>.push_back( code );
+00654 }
+00655
+<a name="l00657"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a42">00657</a> <font class="keywordtype">void</font> COperatorClass::buildLogicTables()
+00658 {
+00659 <font class="comment">// _FactBase = new NLAILOGIC::CFactBase();</font>
+00660 <font class="keywordtype">int</font> i;
+00661 <font class="keywordflow">for</font> ( i = 0; i &lt; (int) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m2">_CondAsserts</a>.size() ; i++ )
+00662 {
+00663 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m2">_CondAsserts</a>[i]-&gt;clone();
+00664 <a class="code" href="classNLAILOGIC_1_1IBaseAssert.html">NLAILOGIC::IBaseAssert</a> *<a class="code" href="debug_8h.html#a15">assert</a> = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a>-&gt;<a class="code" href="classNLAILOGIC_1_1CFactBase.html#a5">addAssert</a>( name, <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m4">_ClassCondVars</a>[i]-&gt;<a class="code" href="cf__lexical_8cpp.html#a94">size</a>() );
+00665 <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *pattern = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a>( assert );
+00666 <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a>::iterator it_var = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m4">_ClassCondVars</a>[i]-&gt;begin();
+00667 <font class="keywordflow">while</font> ( it_var != _ClassCondVars[i]-&gt;end() )
+00668 {
+00669 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)(*it_var);
+00670 pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CVarSet.html#a16">addVar</a>( <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CVar.html">NLAILOGIC::CVar</a>( var_name ) );
+00671 it_var++;
+00672 }
+00673 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a33">addPrecondition</a>( pattern );
+00674 }
+00675
+00676 <font class="keywordflow">for</font> ( i = 0; i &lt; (int) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m3">_ConcAsserts</a>.size() ; i++ )
+00677 {
+00678 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m3">_ConcAsserts</a>[i]-&gt;clone();
+00679 <a class="code" href="classNLAILOGIC_1_1IBaseAssert.html">NLAILOGIC::IBaseAssert</a> *<a class="code" href="debug_8h.html#a15">assert</a> = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m8">_FactBase</a>-&gt;<a class="code" href="classNLAILOGIC_1_1CFactBase.html#a5">addAssert</a>( name, <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m5">_ClassConcVars</a>[i]-&gt;<a class="code" href="cf__lexical_8cpp.html#a94">size</a>() );
+00680 <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *pattern = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a>( assert );
+00681 <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a>::iterator it_var = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m5">_ClassConcVars</a>[i]-&gt;begin();
+00682 <font class="keywordflow">while</font> ( it_var != _ClassConcVars[i]-&gt;end() )
+00683 {
+00684 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)(*it_var);
+00685 pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CVarSet.html#a16">addVar</a>( <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CVar.html">NLAILOGIC::CVar</a>( var_name ) );
+00686 it_var++;
+00687 }
+00688 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a34">addPostcondition</a>( pattern );
+00689 }
+00690 }
+00691
+<a name="l00692"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a1">00692</a> <font class="keywordtype">void</font> COperatorClass::setGoal(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> &amp;g)
+00693 {
+00694
+00695 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CGoal.html">NLAILOGIC::CGoal</a>( *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *) g.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a12">clone</a>());
+00696 }
+00697
+<a name="l00698"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a2">00698</a> <font class="keywordtype">void</font> COperatorClass::setGoal(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *<a class="code" href="debug_8h.html#a15">assert</a>, <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a> &amp;args)
+00699 {
+00700 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o1">_GoalAssert</a> = (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *) assert-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>();
+00701 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o2">_GoalVars</a> = args;
+00702
+00703 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> != NULL )
+00704 {
+00705 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a>-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00706 }
+00707
+00708 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CGoal.html">NLAILOGIC::CGoal</a>( *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *) assert-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>() );
+00709
+00710 <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a>::iterator it_var = args.begin();
+00711 <font class="keywordflow">while</font> ( it_var != args.end() )
+00712 {
+00713 <font class="comment">// Looks in the class components if the var already exists</font>
+00714 sint32 id_var = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a19">getComponentIndex</a>( **it_var );
+00715
+00716 <font class="keywordflow">if</font> ( id_var != -1 )
+00717 {
+00718 <font class="comment">// If it exists, stores its index</font>
+00719 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o3">_GoalPosVar</a>.push_back( id_var );
+00720 }
+00721 <font class="keywordflow">else</font>
+00722 {
+00723 <font class="comment">// If it doesn't exist, registers the var as a component of the class</font>
+00724 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name(<font class="stringliteral">"Var"</font>);
+00725 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a15">registerComponent</a>( var_name , (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> &amp;) **it_var );
+00726 <font class="comment">// _Vars.push_back( (NLAILOGIC::IBaseVar *)(*it_cond)-&gt;clone() );</font>
+00727 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o3">_GoalPosVar</a>.push_back( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a19">getComponentIndex</a>(**it_var) );
+00728 }
+00729 it_var++;
+00730 }
+00731
+00732 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAIAGENT::IObjectIA *&gt;</a> arg_list;
+00733 <font class="keywordflow">while</font> ( !args.empty() )
+00734 {
+00735 arg_list.push_back( (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *) args.front()-&gt;clone() );
+00736 ( (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *)args.front() )-&gt;release();
+00737 args.pop_front();
+00738 }
+00739
+00740 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o0">_Goal</a>-&gt;<a class="code" href="classNLAILOGIC_1_1CGoal.html#a5">setArgs</a>( arg_list );
+00741 }
+00742
+<a name="l00743"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a43">00743</a> <font class="keywordtype">bool</font> COperatorClass::isValidFonc(<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *c)
+00744 {
+00745 <a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;context = (<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;)*c;
+00746
+00747 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; (int) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m6">_CondCode</a>.size(); i++ )
+00748 {
+00749 <a class="code" href="classNLAISCRIPT_1_1IOpCode.html">NLAISCRIPT::IOpCode</a> *opPtr = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m6">_CondCode</a>[ i ];
+00750
+00751 IObjectIA::CProcessResult <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00752 <font class="keywordflow">if</font>(opPtr != NULL)
+00753 {
+00754 <a class="code" href="classNLAISCRIPT_1_1IOpCode.html">NLAISCRIPT::IOpCode</a> &amp;op = *opPtr;
+00755 <a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *opTmp = context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a>;
+00756 <font class="keywordtype">int</font> ip;
+00757 <font class="keywordflow">if</font>(context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> != NULL) ip = (uint32)*context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a>;
+00758 <font class="keywordflow">else</font> ip =0;
+00759 context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = (<a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *)&amp;op;
+00760 *context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = 0;
+00761
+00762 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00763 <font class="preprocessor"></font> sint sp = context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>.CIndexStackPointer::operator int ();
+00764 <font class="preprocessor">#endif</font>
+00765 <font class="preprocessor"></font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = ((<a class="code" href="classNLAISCRIPT_1_1ICodeBranche.html">NLAISCRIPT::ICodeBranche</a> *)opPtr)-&gt;run(context);
+00766
+00767 *context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = ip;
+00768 context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = opTmp;
+00769
+00770 <a class="code" href="classNLAIAGENT_1_1IObjetOp.html">NLAIAGENT::IObjetOp</a> *result = (<a class="code" href="classNLAIAGENT_1_1IObjetOp.html">NLAIAGENT::IObjetOp</a> *)context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>[(int)context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>];
+00771 result-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00772 context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>--;
+00773
+00774 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00775 <font class="preprocessor"></font> sint u = context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">Stack</a>.CIndexStackPointer::operator int ();
+00776 <font class="keywordflow">if</font>(sp != u)
+00777 {
+00778
+00779 <font class="keywordflow">throw</font>;
+00780 }
+00781 <font class="preprocessor">#endif</font>
+00782 <font class="preprocessor"></font>
+00783 <font class="keywordflow">if</font> ( result != NULL)
+00784 {
+00785 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00786 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_return_type = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) result-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>();
+00787
+00788 <font class="preprocessor">#endif</font>
+00789 <font class="preprocessor"></font> <font class="keywordtype">bool</font> br = !result-&gt;<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a18">isTrue</a>();
+00790 result-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00791
+00792 <font class="keywordflow">if</font> ( br )
+00793 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00794 }
+00795
+00796 }
+00797 }
+00798 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00799 }
+00800
+<a name="l00801"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a44">00801</a> <font class="keywordtype">void</font> COperatorClass::activatePostConditions(<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *c)
+00802 {
+00803 <a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;context = (<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> &amp;)*c;
+00804
+00805 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i &lt; (int) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m7">_ConcCode</a>.size(); i++ )
+00806 {
+00807 <a class="code" href="classNLAISCRIPT_1_1IOpCode.html">NLAISCRIPT::IOpCode</a> *opPtr = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m7">_ConcCode</a>[ i ];
+00808
+00809 IObjectIA::CProcessResult <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00810 <font class="keywordflow">if</font>(opPtr != NULL)
+00811 {
+00812 <a class="code" href="classNLAISCRIPT_1_1IOpCode.html">NLAISCRIPT::IOpCode</a> &amp;op = *opPtr;
+00813 <a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *opTmp = context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a>;
+00814 <font class="keywordtype">int</font> ip = (uint32)*context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a>;
+00815 context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = (<a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *)&amp;op;
+00816 *context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = 0;
+00817
+00818 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = ((<a class="code" href="classNLAISCRIPT_1_1ICodeBranche.html">NLAISCRIPT::ICodeBranche</a> *)opPtr)-&gt;run(context);
+00819 <font class="comment">// If we are in Debug Mode</font>
+00820 <font class="keywordflow">if</font> (context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m6">ContextDebug</a>.Active)
+00821 {
+00822 context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m6">ContextDebug</a>.callStackPop();
+00823 }
+00824 *context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = ip;
+00825 context.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = opTmp;
+00826 }
+00827 }
+00828 }
+00829
+<a name="l00830"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a45">00830</a> <font class="keywordtype">void</font> COperatorClass::initialiseFactBase(<a class="code" href="classNLAILOGIC_1_1CFactBase.html">NLAILOGIC::CFactBase</a> *inst__FactBase)
+00831 {
+00832 <font class="keywordtype">int</font> i;
+00833 <font class="keywordflow">for</font> ( i = 0; i &lt; (int) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m2">_CondAsserts</a>.size() ; i++ )
+00834 {
+00835 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m2">_CondAsserts</a>[i]-&gt;clone();
+00836 <a class="code" href="classNLAILOGIC_1_1IBaseAssert.html">NLAILOGIC::IBaseAssert</a> *<a class="code" href="debug_8h.html#a15">assert</a> = inst__FactBase-&gt;<a class="code" href="classNLAILOGIC_1_1CFactBase.html#a5">addAssert</a>( name, <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m4">_ClassCondVars</a>[i]-&gt;<a class="code" href="cf__lexical_8cpp.html#a94">size</a>() );
+00837 <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *pattern = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a>( assert );
+00838 <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a>::iterator it_var = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m4">_ClassCondVars</a>[i]-&gt;begin();
+00839 <font class="keywordflow">while</font> ( it_var != _ClassCondVars[i]-&gt;end() )
+00840 {
+00841 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)(*it_var);
+00842 pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CVarSet.html#a16">addVar</a>( <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CVar.html">NLAILOGIC::CVar</a>( var_name ) );
+00843 it_var++;
+00844 }
+00845 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a33">addPrecondition</a>( pattern );
+00846 }
+00847
+00848 <font class="keywordflow">for</font> ( i = 0; i &lt; (int) <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m3">_ConcAsserts</a>.size() ; i++ )
+00849 {
+00850 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m3">_ConcAsserts</a>[i]-&gt;clone();
+00851 <a class="code" href="classNLAILOGIC_1_1IBaseAssert.html">NLAILOGIC::IBaseAssert</a> *<a class="code" href="debug_8h.html#a15">assert</a> = inst__FactBase-&gt;<a class="code" href="classNLAILOGIC_1_1CFactBase.html#a5">addAssert</a>( name, <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m5">_ClassConcVars</a>[i]-&gt;<a class="code" href="cf__lexical_8cpp.html#a94">size</a>() );
+00852 <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a> *pattern = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CFactPattern.html">NLAILOGIC::CFactPattern</a>( assert );
+00853 <a class="code" href="classstd_1_1list.html">std::list&lt;const NLAIAGENT::IVarName *&gt;</a>::iterator it_var = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m5">_ClassConcVars</a>[i]-&gt;begin();
+00854 <font class="keywordflow">while</font> ( it_var != _ClassConcVars[i]-&gt;end() )
+00855 {
+00856 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name = *(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> *)(*it_var);
+00857 pattern-&gt;<a class="code" href="classNLAILOGIC_1_1CVarSet.html#a16">addVar</a>( <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CVar.html">NLAILOGIC::CVar</a>( var_name ) );
+00858 it_var++;
+00859 }
+00860 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a34">addPostcondition</a>( pattern );
+00861 }
+00862 }
+00863
+<a name="l00865"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a0">00865</a> <font class="keywordtype">void</font> COperatorClass::setComment(<font class="keywordtype">char</font> *c)
+00866 {
+00867 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> != NULL )
+00868 {
+00869 <font class="keyword">delete</font>[] <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a>;
+00870 }
+00871 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a> = <font class="keyword">new</font> <font class="keywordtype">char</font>[ strlen(c) + 1];
+00872 strcpy(<a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o13">_Comment</a>, c);
+00873 }
+00874
+<a name="l00875"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a41">00875</a> <font class="keywordtype">void</font> COperatorClass::addFuzzyCond(<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *var_name, <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *fset)
+00876 {
+00877 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m9">_FuzzyVars</a>.push_back( var_name );
+00878 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#m10">_FuzzySets</a>.push_back( fset );
+00879 }
+00880
+<a name="l00881"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a58">00881</a> <font class="keywordtype">void</font> COperatorClass::RegisterMessage(<a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10">NLAIAGENT::IMessageBase::TPerformatif</a> perf, <font class="keyword">const</font> std::string &amp;msg_class, <font class="keyword">const</font> std::string &amp;msg_varname)
+00882 {
+00883 <font class="keywordflow">try</font>
+00884 {
+00885
+00886 <font class="comment">// Checks if a trigger with the same message or var doesn't already exist</font>
+00887 std::vector&lt;std::string&gt;::iterator it_s = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o11">_TrigMsgVarname</a>.begin();
+00888 <font class="keywordflow">while</font> ( it_s != <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o11">_TrigMsgVarname</a>.end() )
+00889 {
+00890 <font class="keywordflow">if</font> ( msg_varname == *it_s )
+00891 {
+00892 std::string debugString;
+00893 std::string text;
+00894 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a31">getDebugString</a>(debugString);
+00895 text += <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"MessageCond(%s) defined twice in operator class '%s'"</font>,msg_varname.c_str(), debugString.c_str());
+00896 <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionNotImplemented.html">NLAIE::CExceptionNotImplemented</a>(text.c_str());
+00897 }
+00898 it_s++;
+00899 }
+00900
+00901 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> id_class( msg_class.c_str() );
+00902 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o10">_TrigMsgClass</a>.push_back( id_class );
+00903 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o9">_TrigMsgPerf</a>.push_back( perf );
+00904 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o11">_TrigMsgVarname</a>.push_back( msg_varname );
+00905
+00906 <font class="comment">// Looks in the class components if the var already exists</font>
+00907 sint32 id_var = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a23">getInheritedStaticMemberIndex</a>( <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>((<font class="keyword">const</font> <font class="keywordtype">char</font> *) msg_varname.c_str()) );
+00908
+00909 <font class="keywordflow">if</font> ( id_var != -1 )
+00910 {
+00911 <font class="comment">// If it exists, stores its index</font>
+00912 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o12">_TrigMsgPos</a>.push_back( id_var );
+00913 }
+00914 <font class="keywordflow">else</font>
+00915 {
+00916 <font class="comment">// If it doesn't exist, registers the var as a component of the class</font>
+00917 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> class_name( (<font class="keyword">const</font> <font class="keywordtype">char</font> *) msg_class.c_str() );
+00918 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> var_name( (<font class="keyword">const</font> <font class="keywordtype">char</font> *) msg_varname.c_str() );
+00919 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a15">registerComponent</a>( class_name, var_name );
+00920 <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o12">_TrigMsgPos</a>.push_back( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a23">getInheritedStaticMemberIndex</a>( <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>((<font class="keyword">const</font> <font class="keywordtype">char</font> *) msg_varname.c_str()) ) );
+00921 }
+00922 }
+00923 <font class="keywordflow">catch</font> (<a class="code" href="classNLAIE_1_1IException.html">NLAIE::IException</a> &amp;err)
+00924 {
+00925 <font class="keywordflow">throw</font> CExceptionHaveNoType( err.what() );
+00926 }
+00927 }
+00928
+00929 <font class="comment">// Checks if a message is in the PreCondition messages list</font>
+<a name="l00930"></a><a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#a59">00930</a> sint32 COperatorClass::checkTriggerMsg(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *msg)
+00931 {
+00932 sint32 n = <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o9">_TrigMsgPerf</a>.size();
+00933
+00934 <font class="keywordflow">while</font> ( n-- )
+00935 {
+00936 <font class="keywordflow">if</font> ( msg-&gt;<a class="code" href="classNLAIAGENT_1_1IMessageBase.html#a10">getPerformatif</a>() == <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o9">_TrigMsgPerf</a>[n] )
+00937 {
+00938 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00939 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *msg_dbg = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) msg-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>();
+00940 <font class="preprocessor">#endif</font>
+00941 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( msg-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>() == <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o10">_TrigMsgClass</a>[n] )
+00942 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1COperatorClass.html#o12">_TrigMsgPos</a>[n];
+00943 }
+00944 }
+00945 <font class="keywordflow">return</font> -1;
+00946 }
+00947 }
+</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>