aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/valueset_8cpp-source.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/valueset_8cpp-source.html')
-rw-r--r--docs/doxygen/nel/valueset_8cpp-source.html631
1 files changed, 631 insertions, 0 deletions
diff --git a/docs/doxygen/nel/valueset_8cpp-source.html b/docs/doxygen/nel/valueset_8cpp-source.html
new file mode 100644
index 00000000..4906a04e
--- /dev/null
+++ b/docs/doxygen/nel/valueset_8cpp-source.html
@@ -0,0 +1,631 @@
+<!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>valueset.cpp</h1><a href="valueset_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
+00002 <font class="comment"> *</font>
+00003 <font class="comment"> * This file is part of NEVRAX &lt;MODULE_NAME&gt;.</font>
+00004 <font class="comment"> * NEVRAX &lt;MODULE_NAME&gt; is free software; you can redistribute it and/or modify</font>
+00005 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
+00006 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
+00007 <font class="comment"> * any later version.</font>
+00008 <font class="comment"></font>
+00009 <font class="comment"> * NEVRAX &lt;MODULE_NAME&gt; is distributed in the hope that it will be useful, but</font>
+00010 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
+00011 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
+00012 <font class="comment"> * General Public License for more details.</font>
+00013 <font class="comment"></font>
+00014 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
+00015 <font class="comment"> * along with NEVRAX &lt;MODULE_NAME&gt;; see the file COPYING. If not, write to the</font>
+00016 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
+00017 <font class="comment"> * MA 02111-1307, USA.</font>
+00018 <font class="comment"> */</font>
+00019
+00020 <font class="preprocessor">#include "<a class="code" href="valueset_8h.html">nel/ai/logic/valueset.h</a>"</font>
+00021 <font class="preprocessor">#include "<a class="code" href="var_8h.html">nel/ai/logic/var.h</a>"</font>
+00022 <font class="preprocessor">#include "<a class="code" href="boolval_8h.html">nel/ai/logic/boolval.h</a>"</font>
+00023 <font class="preprocessor">#include "<a class="code" href="clause_8h.html">nel/ai/logic/clause.h</a>"</font>
+00024 <font class="preprocessor">#include "<a class="code" href="ai__assert_8h.html">nel/ai/logic/ai_assert.h</a>"</font>
+00025
+00026 <font class="keyword">namespace </font>NLAILOGIC
+00027 {
+00028 <font class="keyword">using</font> <font class="keyword">namespace </font>NLAIAGENT;
+00029
+<a name="l00030"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#p1">00030</a> <font class="keyword">const</font> <a class="code" href="namespaceNLAIAGENT.html#a50">TProcessStatement</a> CValueSet::state = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>;
+00031
+<a name="l00032"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">00032</a> CValueSet::CValueSet()
+00033 {
+00034 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = 0;
+00035 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = NULL;
+00036 }
+00037
+<a name="l00039"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a1">00039</a> CValueSet::CValueSet(sint32 size)
+00040 {
+00041 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a14">size</a>;
+00042 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *[ <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ];
+00043
+00044 <font class="keywordflow">for</font> ( sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00045 {
+00046 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ i ] = NULL;
+00047 }
+00048 }
+00049
+<a name="l00051"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a2">00051</a> CValueSet::CValueSet(<font class="keyword">const</font> CValueSet &amp;cp)
+00052 {
+00053 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = cp._NbValues;
+00054
+00055 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *[ <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ];
+00056
+00057 <font class="keywordflow">for</font> ( sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00058 {
+00059 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] = (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *) cp._Values[i];
+00060
+00061 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00062 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00063 }
+00064 }
+00065
+<a name="l00067"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a3">00067</a> CValueSet::CValueSet(std::vector&lt;IBaseVar *&gt; &amp;vars)
+00068 {
+00069 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = vars.size();
+00070
+00071 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *[ <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ];
+00072
+00073 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00074 {
+00075 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ i ] = vars[i]-&gt;getValue();
+00076
+00077 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00078 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00079 }
+00080 }
+00081
+00082 <font class="comment">// Construit un valueSet à partir d'un autre en changeant la position des valeurs:</font>
+00083 <font class="comment">// pos = positions dans le nouveau CValueSet des valeurs du premier.</font>
+00084
+<a name="l00087"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a4">00087</a> CValueSet::CValueSet(CValueSet *vals, std::vector&lt;sint32&gt; &amp;pos)
+00088 {
+00089 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = pos.size();
+00090
+00091 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *[ <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ];
+00092
+00093 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00094 {
+00095 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ i ] = NULL;
+00096 }
+00097
+00098 std::vector&lt;sint32&gt;::iterator it_pos = pos.begin();
+00099 sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> = 0;
+00100 <font class="keywordflow">while</font> ( it_pos != pos.end() )
+00101 {
+00102 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> ] = vals-&gt;_Values[ *it_pos ];
+00103 it_pos++;
+00104 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>++;
+00105 }
+00106 }
+00107
+00109 CValueSet::CValueSet(sint32 size, <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a> *vals, std::vector&lt;sint32&gt; &amp;pos)
+00110 {
+00111 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a14">size</a>;
+00112
+00113 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *[ <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ];
+00114
+00115 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00116 {
+00117 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ i ] = NULL;
+00118 }
+00119
+00120 <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a>::iterator it_val = vals-&gt;begin();
+00121 std::vector&lt;sint32&gt;::iterator it_pos = pos.begin();
+00122
+00123 <font class="keywordflow">while</font> ( it_val != vals-&gt;end() &amp;&amp; it_pos != pos.end() )
+00124 {
+00125 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ *it_pos ] = *it_val;
+00126 (*it_val)-&gt;incRef();
+00127 it_val++;
+00128 it_pos++;
+00129 }
+00130 }
+00131
+<a name="l00132"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a6">00132</a> CValueSet::~CValueSet()
+00133 {
+00134 <font class="keywordflow">for</font> ( sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00135 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00136 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00137 <font class="keyword">delete</font>[] <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>;
+00138 }
+00139
+<a name="l00140"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a8">00140</a> <font class="keywordtype">void</font> CValueSet::setValue(sint32 pos, IObjectIA *obj)
+00141 {
+00142 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[pos] = obj;
+00143 <font class="keywordflow">if</font> ( obj )
+00144 obj-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00145 }
+00146
+00147 <font class="comment">// Unification d'un CValueSet ave un autre.</font>
+00148 <font class="comment">// Renvoie NULL si l'unification échoue, </font>
+00149 <font class="comment">// Un nouveau CValueSet corrrespondant à la l'unification si réussit</font>
+00150
+00151
+<a name="l00155"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a9">00155</a> CValueSet *CValueSet::unify(<font class="keyword">const</font> CValueSet *un)<font class="keyword"> const</font>
+00156 <font class="keyword"> </font>{
+00157 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> *result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a>( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> );
+00158 <font class="keywordtype">int</font> i;
+00159 <font class="keywordflow">for</font>( i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00160 {
+00161 result-&gt;_Values[i] = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i];
+00162 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00163 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00164
+00165 }
+00166
+00167 <font class="keywordflow">for</font> (i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ; i++ )
+00168 {
+00169 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *x_val = result-&gt;_Values[ i ];
+00170 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *y_val = un-&gt;_Values[ i ];
+00171
+00172 <font class="comment">/* if ( !x_val &amp;&amp; !y_val )</font>
+00173 <font class="comment"> result-&gt;_Values[i] = NULL ;</font>
+00174 <font class="comment">*/</font>
+00175 <font class="keywordflow">if</font> ( x_val &amp;&amp; y_val )
+00176 {
+00177 <font class="comment">// IObjectIA *test;</font>
+00178 <font class="keywordflow">if</font> ( (*x_val) == ( *y_val ) )
+00179 {
+00180 <font class="comment">// Nothing to do </font>
+00181 }
+00182 <font class="keywordflow">else</font>
+00183 {
+00184 result-&gt;release();
+00185 <font class="keywordflow">return</font> NULL;
+00186 }
+00187 <font class="comment">// test-&gt;release();</font>
+00188 }
+00189 <font class="keywordflow">else</font>
+00190 {
+00191 <font class="keywordflow">if</font> ( y_val )
+00192 {
+00193 result-&gt;_Values[i] = y_val;
+00194 result-&gt;_Values[i]-&gt;incRef();
+00195 }
+00196 }
+00197 }
+00198 <font class="keywordflow">return</font> result;
+00199 }
+00200
+00202 CValueSet *CValueSet::unify(<a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a> *vals, std::vector&lt;sint32&gt; &amp;pos_vals)<font class="keyword"> const</font>
+00203 <font class="keyword"> </font>{
+00204 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> *result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a>( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> );
+00205 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00206 {
+00207 result-&gt;_Values[i] = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i];
+00208 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00209 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00210
+00211 }
+00212
+00213 <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a>::iterator it_val = vals-&gt;begin();
+00214 std::vector&lt;sint32&gt;::iterator it_pos = pos_vals.begin();
+00215
+00216 <font class="comment">// -----------------</font>
+00217
+00218 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00219 <font class="preprocessor"></font> std::string buf;
+00220 this-&gt;<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a17">getDebugString</a>(buf);
+00221 std::string buf2;
+00222 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> tmp(<a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>, vals, pos_vals);
+00223 tmp.getDebugString(buf2);
+00224 <font class="preprocessor">#endif</font>
+00225 <font class="preprocessor"></font> <font class="comment">//TRACE(" \nUNIFICATION:\n VS = %s\n VP = %s \n", buf, buf2);</font>
+00226
+00227 <font class="comment">// -----------------</font>
+00228
+00229 <font class="keywordflow">while</font> ( it_val != vals-&gt;end() &amp;&amp; it_pos != pos_vals.end() )
+00230 {
+00231 sint32 pos = *it_pos;
+00232 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *l_val = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ pos ];
+00233 <font class="comment">// IObjectIA *test = NULL;</font>
+00234 <font class="keywordflow">if</font> ( !l_val || ( (*l_val) == ( **it_val ) ) )
+00235 {
+00236 <font class="comment">// if ( test )</font>
+00237 <font class="comment">// test-&gt;release();</font>
+00238 result-&gt;_Values[ pos ] = *it_val;
+00239 result-&gt;_Values[ pos ]-&gt;incRef();
+00240 }
+00241 <font class="keywordflow">else</font>
+00242 {
+00243 <font class="comment">// if ( test )</font>
+00244 <font class="comment">// test-&gt;release();</font>
+00245 <font class="keyword">delete</font> result;
+00246 <font class="keywordflow">return</font> NULL;
+00247 }
+00248 it_val++;
+00249 it_pos++;
+00250
+00251 }
+00252
+00253 <font class="keywordflow">return</font> result;
+00254 }
+00255
+<a name="l00256"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a11">00256</a> CValueSet *CValueSet::unify(CValueSet *vals, std::vector&lt;sint32&gt; &amp;pos_vals)<font class="keyword"> const</font>
+00257 <font class="keyword"> </font>{
+00258 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> *result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a>( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> );
+00259 <font class="keywordtype">int</font> i;
+00260 <font class="keywordflow">for</font> ( i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00261 {
+00262 result-&gt;_Values[i] = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i];
+00263 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00264 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00265
+00266 }
+00267
+00268 <font class="keywordflow">for</font> (i = 0; i &lt; (sint32) pos_vals.size(); i++ )
+00269 {
+00270 sint32 pos = pos_vals[i];
+00271 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *l_val = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ pos ];
+00272 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *r_val = (*vals)[i];
+00273 <font class="comment">// IObjectIA *test = NULL;</font>
+00274 <font class="comment">// if ( !l_val || !( test = (*l_val) != ( *r_val ) )-&gt;isTrue() )</font>
+00275 <font class="keywordflow">if</font> ( !l_val || ( (*l_val) == ( *r_val ) ) )
+00276 {
+00277 <font class="comment">// if ( test )</font>
+00278 <font class="comment">// test-&gt;release();</font>
+00279 <font class="keywordflow">if</font> ( !l_val )
+00280 {
+00281 result-&gt;_Values[ pos ] = r_val;
+00282 <font class="keywordflow">if</font> ( (*vals)[i] )
+00283 result-&gt;_Values[ pos ]-&gt;incRef();
+00284 }
+00285 }
+00286 <font class="keywordflow">else</font>
+00287 {
+00288 <font class="comment">// if ( test )</font>
+00289 <font class="comment">// test-&gt;release();</font>
+00290 result-&gt;release();
+00291 <font class="keywordflow">return</font> NULL;
+00292 }
+00293 }
+00294 <font class="keywordflow">return</font> result;
+00295 }
+00296
+00297
+<a name="l00298"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a12">00298</a> <font class="keywordtype">bool</font> CValueSet::operator==(CValueSet *cp)
+00299 {
+00300 <font class="keywordflow">if</font>( cp-&gt;_NbValues != <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> )
+00301 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00302
+00303 <font class="keywordflow">for</font> ( sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00304 <font class="keywordflow">if</font> ( cp-&gt;_Values[i] != <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00305 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00306 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00307 }
+00308
+<a name="l00309"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a13">00309</a> IObjectIA *CValueSet::operator[](sint32 pos)
+00310 {
+00311 <font class="keywordflow">if</font> ( pos &lt;= <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> )
+00312 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[pos];
+00313 <font class="keywordflow">else</font>
+00314 <font class="keywordflow">return</font> NULL; <font class="comment">// TODO: exception!!!!!!!!!!!!</font>
+00315 }
+00316
+<a name="l00317"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a7">00317</a> IObjectIA *CValueSet::getValue(sint32 pos)
+00318 {
+00319 <font class="keywordflow">if</font> ( pos &lt;= <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> )
+00320 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[pos];
+00321 <font class="keywordflow">else</font>
+00322 <font class="keywordflow">return</font> NULL; <font class="comment">// TODO: exception!!!!!!!!!!!!</font>
+00323 }
+00324
+<a name="l00326"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a15">00326</a> sint32 CValueSet::undefined()<font class="keyword"> const</font>
+00327 <font class="keyword"> </font>{
+00328 sint32 nb_undef = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>;
+00329 <font class="keywordflow">for</font> ( sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00330 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] != NULL )
+00331 nb_undef--;
+00332 <font class="keywordflow">return</font> nb_undef;
+00333 }
+00334
+<a name="l00335"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a14">00335</a> sint32 <a class="code" href="cf__lexical_8cpp.html#a94">CValueSet::size</a>()
+00336 {
+00337 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>;
+00338 }
+00339
+<a name="l00341"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a16">00341</a> <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a> *CValueSet::getValues()
+00342 {
+00343 <font class="comment">// Warning: this list must be deleted after use!!!</font>
+00344 <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a> *result = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a>;
+00345 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00346 {
+00347 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00348 result-&gt;push_back( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] );
+00349 }
+00350 <font class="keywordflow">return</font> result;
+00351 }
+00352
+<a name="l00353"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a18">00353</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CValueSet::clone()<font class="keyword"> const</font>
+00354 <font class="keyword"> </font>{
+00355 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *tmp = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a>( *<font class="keyword">this</font> );
+00356 <font class="keywordflow">return</font> tmp;
+00357 }
+00358
+<a name="l00359"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a19">00359</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CValueSet::newInstance()<font class="keyword"> const</font>
+00360 <font class="keyword"> </font>{
+00361 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a18">clone</a>();
+00362 }
+00363
+<a name="l00364"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a20">00364</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;CValueSet::getType()<font class="keyword"> const</font>
+00365 <font class="keyword"> </font>{
+00366 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#p0">IdValueSet</a>;
+00367 }
+00368
+<a name="l00369"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a21">00369</a> <font class="keywordtype">void</font> CValueSet::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;os)
+00370 {
+00371 sint32 nb_Values = (sint32) <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>;
+00372 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( nb_Values );
+00373 <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a> values;
+00374 std::vector&lt;sint32&gt; pos;
+00375
+00376 <font class="keywordflow">for</font> ( sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00377 {
+00378 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00379 {
+00380 values.push_back( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] );
+00381 pos.push_back( i );
+00382 }
+00383 }
+00384 sint32 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a14">size</a> = (sint32) values.size();
+00385 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a14">size</a> );
+00386
+00387 <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a>::iterator it_val = values.begin();
+00388 std::vector&lt;sint32&gt;::iterator it_pos = pos.begin();
+00389
+00390 <font class="keywordflow">while</font> ( it_val != values.end() )
+00391 {
+00392 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;) ( *it_val )-&gt;getType() );
+00393 ( *it_val )-&gt;save( os );
+00394 sint32 ip = (sint32) *it_pos;
+00395 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( ip );
+00396 }
+00397 }
+00398
+<a name="l00399"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a22">00399</a> <font class="keywordtype">void</font> CValueSet::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is)
+00400 {
+00401 <font class="comment">// Deletes the old table</font>
+00402 <font class="keywordtype">int</font> i;
+00403 <font class="keywordflow">for</font> ( i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00404 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00405 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00406 <font class="keyword">delete</font>[] <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>;
+00407
+00408 <font class="comment">// Creates the new one</font>
+00409 sint32 nb_Values;
+00410 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( nb_Values );
+00411 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = (sint32) nb_Values;
+00412 sint32 nbvals;
+00413 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( nbvals );
+00414
+00415 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *[ <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ];
+00416
+00417 <font class="keywordflow">for</font> ( i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00418 {
+00419 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ i ] = NULL;
+00420 }
+00421
+00422 <a class="code" href="classstd_1_1list.html">std::list&lt;IObjectIA *&gt;</a> vals;
+00423 std::vector&lt;sint32&gt; pos;
+00424
+00425 <font class="keywordflow">for</font> ( i = 0; i &lt; nbvals; i++ )
+00426 {
+00427 <a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>;
+00428 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( id );
+00429 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *tmp_val = (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *) id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>();
+00430 tmp_val-&gt;load( is );
+00431 tmp_val-&gt;incRef();
+00432 vals.push_back( tmp_val );
+00433 }
+00434 }
+00435
+<a name="l00436"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a17">00436</a> <font class="keywordtype">void</font> CValueSet::getDebugString(std::string &amp;txt)<font class="keyword"> const</font>
+00437 <font class="keyword"> </font>{
+00438 std::string buf;
+00439 txt += <font class="stringliteral">" &lt;CValueSet&gt; "</font>;
+00440 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00441 {
+00442 txt += <font class="stringliteral">" , "</font>;
+00443 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00444 {
+00445 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IBasicType.html#a5">getDebugString</a>( buf );
+00446
+00447 txt += buf ;
+00448 }
+00449 <font class="keywordflow">else</font> txt += <font class="stringliteral">"NULL"</font>;
+00450 }
+00451 }
+00452
+<a name="l00453"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a23">00453</a> IObjetOp *CValueSet::operator ! ()<font class="keyword"> const</font>
+00454 <font class="keyword"> </font>{
+00455 CBoolType *result = <font class="keyword">new</font> CBoolType ( !<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a27">isTrue</a>() );
+00456 <font class="keywordflow">return</font> result;
+00457 }
+00458
+<a name="l00459"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a24">00459</a> IObjectIA *CValueSet::operator != (IObjectIA &amp;a)<font class="keyword"> const</font>
+00460 <font class="keyword"> </font>{
+00461 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> != ((<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> &amp;)a)._NbValues )
+00462 {
+00463 CBoolType *result = <font class="keyword">new</font> CBoolType ( <font class="keyword">false</font> );
+00464 <font class="keywordflow">return</font> result;
+00465 }
+00466
+00467
+00468 <font class="keywordflow">for</font> (sint32 i = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00469 {
+00470 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] != ((<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> &amp;)a)._Values[i] )
+00471 {
+00472 CBoolType *result = <font class="keyword">new</font> CBoolType ( <font class="keyword">false</font> );
+00473 <font class="keywordflow">return</font> result;
+00474 }
+00475
+00476 }
+00477 CBoolType *result = <font class="keyword">new</font> CBoolType ( <font class="keyword">true</font> );
+00478 <font class="keywordflow">return</font> result;
+00479 }
+00480
+<a name="l00481"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a25">00481</a> IObjectIA *CValueSet::operator == (IObjectIA &amp;a)<font class="keyword"> const</font>
+00482 <font class="keyword"> </font>{
+00483 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> != ((<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> &amp;)a)._NbValues )
+00484 {
+00485 CBoolType *result = <font class="keyword">new</font> CBoolType ( <font class="keyword">false</font> );
+00486 <font class="keywordflow">return</font> result;
+00487 }
+00488
+00489 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00490 {
+00491 <font class="keywordtype">bool</font> test_result = (*<a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]) == *((<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> &amp;)a)._Values[i];
+00492 <font class="comment">/* IObjectIA *test = (*_Values[i]) != *((CValueSet &amp;)a)._Values[i];</font>
+00493 <font class="comment"> bool test_result = test-&gt;isTrue();</font>
+00494 <font class="comment"> test-&gt;release(); */</font>
+00495 <font class="keywordflow">if</font> ( !test_result )
+00496 {
+00497 CBoolType *result = <font class="keyword">new</font> CBoolType ( <font class="keyword">false</font> );
+00498 <font class="keywordflow">return</font> result;
+00499 }
+00500 }
+00501 CBoolType *result = <font class="keyword">new</font> CBoolType ( <font class="keyword">true</font> );
+00502 <font class="keywordflow">return</font> result;
+00503 }
+00504
+<a name="l00505"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a26">00505</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CValueSet::isEqual</a>(<font class="keyword">const</font> IBasicObjectIA &amp;cmp)<font class="keyword"> const</font>
+00506 <font class="keyword"> </font>{
+00507 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> != ((<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> &amp;)cmp)._NbValues )
+00508 {
+00509 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00510 }
+00511
+00512 <font class="keywordflow">for</font> (sint32 i = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00513 {
+00514 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] != ((<a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> &amp;)cmp)._Values[i] )
+00515 {
+00516 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00517 }
+00518 }
+00519 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00520 }
+00521
+<a name="l00522"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a27">00522</a> <font class="keywordtype">bool</font> CValueSet::isTrue()<font class="keyword"> const</font>
+00523 <font class="keyword"> </font>{
+00524 <font class="keywordflow">return</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a15">undefined</a>() == (sint32) 0 );
+00525 }
+00526
+<a name="l00527"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a28">00527</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;CValueSet::run()
+00528 {
+00529 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00530 }
+00531
+<a name="l00532"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a29">00532</a> CValueSet *CValueSet::forward(CClause *clause,std::vector&lt;sint32&gt; &amp;pos)
+00533 {
+00534 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a> *result = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a0">CValueSet</a>( clause-&gt;nbVars() );
+00535
+00536 std::vector&lt;sint32&gt;::iterator it_pos = pos.begin();
+00537
+00538 <font class="keywordflow">for</font> (sint32 i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00539 {
+00540 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i] )
+00541 {
+00542 result-&gt;_Values[ *it_pos ] = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i];
+00543 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
+00544 it_pos++;
+00545 }
+00546 }
+00547 <font class="keywordflow">return</font> result;
+00548 }
+00549
+<a name="l00550"></a><a class="code" href="classNLAILOGIC_1_1CValueSet.html#a30">00550</a> <font class="keywordtype">void</font> CValueSet::setSize(sint32 size)
+00551 {
+00552 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> = <a class="code" href="classNLAILOGIC_1_1CValueSet.html#a14">size</a>;
+00553 sint32 i;
+00554
+00555 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> != NULL )
+00556 {
+00557 <font class="keywordflow">for</font> ( i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ );
+00558 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
+00559 <font class="keyword">delete</font> <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>;
+00560 }
+00561
+00562 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *[ <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a> ];
+00563
+00564 <font class="keywordflow">for</font> ( i = 0; i &lt; <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n1">_NbValues</a>; i++ )
+00565 {
+00566 <a class="code" href="classNLAILOGIC_1_1CValueSet.html#n0">_Values</a>[ i ] = NULL;
+00567 }
+00568 }
+00569 }
+</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>