diff options
Diffstat (limited to 'docs/doxygen/nel/interpret__methodes_8cpp-source.html')
-rw-r--r-- | docs/doxygen/nel/interpret__methodes_8cpp-source.html | 501 |
1 files changed, 501 insertions, 0 deletions
diff --git a/docs/doxygen/nel/interpret__methodes_8cpp-source.html b/docs/doxygen/nel/interpret__methodes_8cpp-source.html new file mode 100644 index 00000000..5e181328 --- /dev/null +++ b/docs/doxygen/nel/interpret__methodes_8cpp-source.html @@ -0,0 +1,501 @@ +<!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> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </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> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </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> + + +<!-- 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> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.14 --> +<center> +<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <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> </center> +<hr><h1>interpret_methodes.cpp</h1><a href="interpret__methodes_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00006 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font> +00007 <font class="comment"> *</font> +00008 <font class="comment"> * This file is part of NEVRAX NEL.</font> +00009 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font> +00010 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> +00011 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font> +00012 <font class="comment"> * any later version.</font> +00013 <font class="comment"></font> +00014 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font> +00015 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> +00016 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> +00017 <font class="comment"> * General Public License for more details.</font> +00018 <font class="comment"></font> +00019 <font class="comment"> * You should have received a copy of the GNU General Public License</font> +00020 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font> +00021 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font> +00022 <font class="comment"> * MA 02111-1307, USA.</font> +00023 <font class="comment"> */</font> +00024 <font class="preprocessor">#include "<a class="code" href="interpret__object_8h.html">nel/ai/script/interpret_object.h</a>"</font> +00025 <font class="preprocessor">#include "<a class="code" href="interpret__methodes_8h.html">nel/ai/script/interpret_methodes.h</a>"</font> +00026 <font class="preprocessor">#include "<a class="code" href="type__def_8h.html">nel/ai/script/type_def.h</a>"</font> +00027 <font class="preprocessor">#include <math.h></font> +00028 <font class="preprocessor">#include <stdarg.h></font> +00029 +00030 <font class="keyword">namespace </font>NLAISCRIPT +00031 { +00032 <font class="comment">//const NLAIAGENT::TProcessStatement CParam::_RunState = NLAIAGENT::processIdle;</font> +00033 +<a name="l00034"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a0">00034</a> CParam::CParam():_Param(0),_ParamInfo(NULL){} +<a name="l00035"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a1">00035</a> CParam::CParam(<font class="keyword">const</font> CParam &p):NLAIAGENT::IObjectIA(p),_Param(p._Param.size()),_ParamInfo(NULL) +00036 { +00037 <font class="keywordflow">for</font>(sint32 i = 0; i<p.size(); i++) +00038 { +00039 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i] = (IOpType *)p._Param[i]->clone();<font class="comment">//new NLAIC::CIdentType(*p._Param[i]);</font> +00040 } +00041 } +00042 +<a name="l00043"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a2">00043</a> CParam::CParam(<font class="keywordtype">int</font> count, ...):_ParamInfo(NULL) +00044 { +00045 va_list marker; +00046 +00047 va_start( marker, count ); +00048 <font class="keywordflow">while</font>(count --) +00049 { +00050 IOpType *o = va_arg( marker, IOpType *); +00051 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.push_back(o); +00052 } +00053 } +00054 +<a name="l00055"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a4">00055</a> <font class="keywordtype">bool</font> CParam::operator == (<font class="keyword">const</font> CParam &p)<font class="keyword"> const</font> +00056 <font class="keyword"> </font>{ +00057 sint32 <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>; +00058 <font class="keywordflow">if</font>(( <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a> = <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size() ) != (sint32)p._Param.size()) <font class="keywordflow">return</font> <font class="keyword">false</font>; +00059 <font class="keywordflow">for</font>(sint32 i = 0; i<<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>; i++) +00060 { +00061 IOpType &p1 = *<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i], &p2 = *p._Param[i]; +00062 <font class="keywordflow">if</font>(p1.getConstraintTypeOf() == NULL || p2.getConstraintTypeOf() == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; +00063 <font class="keywordflow">if</font>(!(*p1.getConstraintTypeOf() == *p2.getConstraintTypeOf())) <font class="keywordflow">return</font> <font class="keyword">false</font>; +00064 } +00065 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00066 } +00067 +<a name="l00068"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a5">00068</a> <font class="keywordtype">double</font> CParam::eval(<font class="keyword">const</font> CParam &p)<font class="keyword"> const</font> +00069 <font class="keyword"> </font>{ +00070 sint32 <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>; +00071 <font class="keywordtype">double</font> D = 0.0; +00072 <font class="keywordflow">if</font>(( <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a> = <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size() ) != (sint32)p._Param.size()) <font class="keywordflow">return</font> -1.0; +00073 <font class="keywordtype">double</font> k = 1.0; +00074 <font class="keywordflow">for</font>(sint32 i = 0; i<<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>; i++) +00075 { +00076 IOpType &p1 = *<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i], &p2 = *p._Param[i]; +00077 <font class="keywordtype">double</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = p1.eval(&p2); +00078 <font class="keywordflow">if</font>( <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> < 0) <font class="keywordflow">return</font> -1.0; +00079 D += (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>*<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>)*k; +00080 k += 1.0; +00081 <font class="comment">/*if(p1.getConstraintTypeOf() != NULL && p2.getConstraintTypeOf() != NULL)</font> +00082 <font class="comment"> { </font> +00083 <font class="comment"> </font> +00084 <font class="comment"> if(!(p1 == p2))</font> +00085 <font class="comment"> {</font> +00086 <font class="comment"> const NLAIC::CIdentType &idG = *p1.getConstraintTypeOf();</font> +00087 <font class="comment"> const NLAIC::CIdentType &idD = *p2.getConstraintTypeOf();</font> +00088 <font class="comment"> if(!(idG == idD))</font> +00089 <font class="comment"> {</font> +00090 <font class="comment"> if(((const NLAIC::CTypeOfObject &)idD) & NLAIC::CTypeOfObject::tAgentInterpret)</font> +00091 <font class="comment"> {</font> +00092 <font class="comment"> const IClassInterpret *o = (const IClassInterpret *)((CClassInterpretFactory *)idD.getFactory())->getClass(); </font> +00093 <font class="comment"> bool type = false; </font> +00094 <font class="comment"> sint32 i = 0; </font> +00095 <font class="comment"> while(o != NULL)</font> +00096 <font class="comment"> {</font> +00097 <font class="comment"> i ++; </font> +00098 <font class="comment"> if( o->getType() == idG)</font> +00099 <font class="comment"> {</font> +00100 <font class="comment"> d = ((double)(o->sizeVTable() - i - 1))*k;</font> +00101 <font class="comment"> D += d*d;</font> +00102 <font class="comment"> type = true;</font> +00103 <font class="comment"> }</font> +00104 <font class="comment"> o = o->getBaseClass();</font> +00105 <font class="comment"> }</font> +00106 <font class="comment"> if(!type) return -1.0;</font> +00107 <font class="comment"> }</font> +00108 <font class="comment"> else</font> +00109 <font class="comment"> {</font> +00110 <font class="comment"> //NLAIC::CTypeOfObject o_t(tNombre | tString | tList | tLogic);</font> +00111 <font class="comment"> if(((const NLAIC::CTypeOfObject &)idD) & ((const NLAIC::CTypeOfObject &)idG))</font> +00112 <font class="comment"> {</font> +00113 <font class="comment"> return 0.0;</font> +00114 <font class="comment"> }</font> +00115 <font class="comment"> else return -1.0;</font> +00116 <font class="comment"> }</font> +00117 <font class="comment"> }</font> +00118 <font class="comment"> }</font> +00119 <font class="comment"> else return 0.0;</font> +00120 <font class="comment"> </font> +00121 <font class="comment"> </font> +00122 <font class="comment"> }*/</font> +00123 } +00124 <font class="keywordflow">if</font>(D != 0.0) <font class="keywordflow">return</font> sqrt(D); +00125 <font class="keywordflow">else</font> <font class="keywordflow">return</font> 0.0; +00126 } +00127 +<a name="l00128"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a6">00128</a> <font class="keywordtype">void</font> CParam::operator = (<font class="keyword">const</font> CParam &p) +00129 { +00130 <font class="keywordflow">for</font>(sint32 i = 0; i < p.size() ; i ++) +00131 { +00132 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.push_back((IOpType *)p[i]-><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_1">clone</a>()); +00133 } +00134 } +00135 +<a name="l00136"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_1">00136</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CParam::clone()<font class="keyword"> const</font> +00137 <font class="keyword"> </font>{ +00138 <a class="code" href="classNLAISCRIPT_1_1CParam.html#a0">CParam</a> *cl = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html#a0">CParam</a>( *<font class="keyword">this</font> ); +00139 <font class="keywordflow">return</font> cl; +00140 } +00141 +<a name="l00142"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_2">00142</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CParam::newInstance()<font class="keyword"> const</font> +00143 <font class="keyword"> </font>{ +00144 <a class="code" href="classNLAISCRIPT_1_1CParam.html#a0">CParam</a> *instance = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html#a0">CParam</a>(); +00145 <font class="keywordflow">return</font> instance; +00146 } +00147 +00148 +<a name="l00149"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a7">00149</a> <font class="keyword">const</font> IOpType *CParam::operator[] (sint32 i)<font class="keyword"> const</font> +00150 <font class="keyword"> </font>{ +00151 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i]; +00152 } +00153 +<a name="l00154"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">00154</a> <font class="keywordtype">void</font> CParam::push(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> &g) +00155 { +00156 <a class="code" href="classNLAIAGENT_1_1CConstIteratorContener.html">NLAIAGENT::CConstIteratorContener</a> i = g.<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_7">getConstIterator</a>(); +00157 +00158 <font class="keywordflow">while</font>( !i.<a class="code" href="classNLAIAGENT_1_1CConstIteratorContener.html#a6">isInEnd</a>() ) +00159 { +00160 <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *o = i++; +00161 <a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">push</a>(COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(o-><a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>()))); +00162 } +00163 } +00164 +<a name="l00165"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a9">00165</a> <font class="keywordtype">void</font> CParam::push(<font class="keyword">const</font> IOpType &i) +00166 { +00167 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.push_back((IOpType*)i.clone()); +00168 } +00169 +<a name="l00170"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a10">00170</a> <font class="keywordtype">void</font> CParam::push(IOpType *i) +00171 { +00172 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.push_back(i); +00173 } +00174 +<a name="l00175"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a11">00175</a> <font class="keyword">const</font> IOpType &CParam::get()<font class="keyword"> const</font> +00176 <font class="keyword"> </font>{ +00177 <font class="keywordflow">return</font> *<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.back(); +00178 } +00179 +<a name="l00180"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a12">00180</a> <font class="keywordtype">void</font> CParam::pop() +00181 { +00182 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.pop_back(); +00183 } +00184 +<a name="l00185"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a13">00185</a> <font class="keywordtype">void</font> CParam::clear() +00186 { +00187 <font class="keywordflow">while</font>(<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size()) +00188 { +00189 IOpType *i = <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.back(); +00190 i->release(); +00191 <a class="code" href="classNLAISCRIPT_1_1CParam.html#a12">pop</a>(); +00192 } +00193 } +00194 +<a name="l00195"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">00195</a> sint32 <a class="code" href="cf__lexical_8cpp.html#a94">CParam::size</a>()<font class="keyword"> const</font> +00196 <font class="keyword"> </font>{ +00197 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size(); +00198 } +00199 +<a name="l00200"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_7">00200</a> <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &CParam::run() +00201 { +00202 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#p0">NLAIAGENT::IObjectIA::ProcessRun</a>;; +00203 } +00204 +<a name="l00205"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a3">00205</a> CParam::~CParam() +00206 { +00207 <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = 0; i < (int)<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size(); i++) +00208 { +00209 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i]->release(); +00210 } +00211 } +00212 +<a name="l00213"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_3">00213</a> <font class="keywordtype">void</font> CParam::getDebugString(std::string &<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>)<font class="keyword"> const</font> +00214 <font class="keyword"> </font>{ +00215 <a class="code" href="classNLAISCRIPT_1_1CParam.html#a17">getString</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>); +00216 } +00217 +<a name="l00218"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_5">00218</a> <font class="keywordtype">void</font> CParam::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is) +00219 { +00220 sint32 n; +00221 <font class="keywordtype">int</font> i; +00222 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(n); +00223 <font class="keywordflow">for</font>(i = 0; i < (int)<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size(); i++) +00224 { +00225 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i]->release(); +00226 } +00227 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.clear(); +00228 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.resize(n); +00229 <font class="keywordflow">for</font>(i = 0; i < (int)<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size(); i++) +00230 { +00231 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i] = (IOpType *)IOpType::loadIOpType(is); +00232 } +00233 } +00234 +<a name="l00235"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_6">00235</a> <font class="keywordtype">void</font> CParam::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &os) +00236 { +00237 sint32 n = <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size(); +00238 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(n); +00239 <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = 0; i < (int)<a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>.size(); i++) +00240 { +00241 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i]->serial(os); +00242 } +00243 } +00244 +<a name="l00245"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_4">00245</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CParam::isEqual</a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IBasicObjectIA.html">NLAIAGENT::IBasicObjectIA</a> &a)<font class="keyword"> const</font> +00246 <font class="keyword"> </font>{ +00247 <font class="comment">// TODO</font> +00248 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html#a0">CParam</a> &p = (<font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html#a0">CParam</a> &)a; +00249 <font class="keywordflow">return</font> *<font class="keyword">this</font> == p; +00250 } +00251 +<a name="l00252"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#z228_0">00252</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &CParam::getType()<font class="keyword"> const</font> +00253 <font class="keyword"> </font>{ +00254 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html#p0">IdParam</a>; +00255 } +00256 +<a name="l00257"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a17">00257</a> <font class="keywordtype">void</font> CParam::getString(std::string &txt)<font class="keyword"> const</font> +00258 <font class="keyword"> </font>{ +00259 txt += <font class="stringliteral">"("</font>; +00260 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>()) +00261 { +00262 <font class="keywordtype">int</font> i; +00263 <font class="keywordflow">for</font>( i = 0; i < <a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>() - 1; i++) +00264 { +00265 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a> = <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i]->getConstraintTypeOf(); +00266 <font class="keywordflow">if</font>(id) txt += (<font class="keyword">const</font> <font class="keywordtype">char</font> *)*id; +00267 <font class="keywordflow">else</font> txt += <font class="stringliteral">"UNDEF"</font>; +00268 txt += <font class="stringliteral">","</font>; +00269 } +00270 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a> = <a class="code" href="classNLAISCRIPT_1_1CParam.html#o0">_Param</a>[i]->getConstraintTypeOf(); +00271 <font class="keywordflow">if</font>(id) txt += (<font class="keyword">const</font> <font class="keywordtype">char</font> *)*id; +00272 <font class="keywordflow">else</font> txt += <font class="stringliteral">"UNDEF"</font>; +00273 } +00274 txt += <font class="stringliteral">")"</font>; +00275 } +00276 +00277 +<a name="l00278"></a><a class="code" href="classNLAISCRIPT_1_1CParam.html#a16">00278</a> <font class="keywordtype">void</font> CParam::setInfo(<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *pInfo) +00279 { +00280 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CParam.html#o1">_ParamInfo</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CParam.html#o1">_ParamInfo</a>-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>(); +00281 <a class="code" href="classNLAISCRIPT_1_1CParam.html#o1">_ParamInfo</a> = pInfo; +00282 } +00283 +00284 +00285 +00286 +00289 +00290 +<a name="l00291"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a0">00291</a> CMethodeName::CMethodeName(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name):_MethodeName((NLAIAGENT::IVarName *)name.clone()),_Code(NULL) +00292 { +00293 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a> = NULL; +00294 } +<a name="l00295"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a2">00295</a> CMethodeName::CMethodeName():_MethodeName(NULL),_Code(NULL) +00296 { +00297 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a> = NULL; +00298 } +<a name="l00299"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a3">00299</a> CMethodeName::~CMethodeName() +00300 { +00301 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a> != NULL ) +00302 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>(); +00303 +00304 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a> != NULL ) +00305 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a>->release(); +00306 +00307 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a> != NULL ) +00308 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a>->release(); +00309 +00310 +00311 } +00312 +<a name="l00313"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a1">00313</a> CMethodeName::CMethodeName(<font class="keyword">const</font> CMethodeName &c) +00314 { +00315 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a> = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *) c._MethodeName-><a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00316 +00317 <font class="keywordflow">if</font> ( c._TypeOfMethode ) +00318 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a> = (<a class="code" href="classNLAISCRIPT_1_1IOpType.html">NLAISCRIPT::IOpType</a> *) c._TypeOfMethode->clone(); +00319 +00320 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a> = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *)c._MethodeName-><a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00321 +00322 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a> = c._Code; +00323 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a>->incRef(); +00324 } +00325 +<a name="l00326"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_3">00326</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CMethodeName::clone()<font class="keyword"> const</font> +00327 <font class="keyword"> </font>{ +00328 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a0">CMethodeName</a> *cl = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a2">CMethodeName</a>( *<font class="keyword">this</font> ); +00329 <font class="keywordflow">return</font> cl; +00330 } +00331 +<a name="l00332"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_4">00332</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CMethodeName::newInstance()<font class="keyword"> const</font> +00333 <font class="keyword"> </font>{ +00334 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a0">CMethodeName</a> *instance = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a0">CMethodeName</a>; +00335 <font class="keywordflow">return</font> instance; +00336 } +00337 +00338 +<a name="l00339"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a4">00339</a> <font class="keywordtype">void</font> CMethodeName::setName(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name) +00340 { +00341 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a> != NULL) +00342 { +00343 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>(); +00344 } +00345 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a> = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *)name.<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00346 } +00347 +<a name="l00348"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a5">00348</a> <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &<a class="code" href="zone__lighter_8cpp.html#a11">CMethodeName::getName</a>()<font class="keyword"> const</font> +00349 <font class="keyword"> </font>{ +00350 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a> == NULL) +00351 <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionUnReference.html">NLAIE::CExceptionUnReference</a>(<font class="stringliteral">"invalide reference for methodeName in class CMethodeName"</font>); +00352 +00353 <font class="keywordflow">return</font> *<a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>; +00354 } +00355 +<a name="l00356"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a6">00356</a> <font class="keywordtype">void</font> CMethodeName::setParam(<font class="keyword">const</font> CParam &p) +00357 { +00358 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o2">_Param</a> = p; +00359 } +00360 +<a name="l00361"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a8">00361</a> CParam &CMethodeName::getParam() +00362 { +00363 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o2">_Param</a>; +00364 } +00365 +<a name="l00366"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a9">00366</a> <font class="keywordtype">void</font> CMethodeName::setCode(IOpCode *c) +00367 { +00368 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a> = c; +00369 } +00370 +<a name="l00371"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a10">00371</a> IOpCode *CMethodeName::getCode() +00372 { +00373 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a>; +00374 } +00375 +<a name="l00376"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a7">00376</a> <font class="keywordtype">void</font> CMethodeName::setTypeOfMethode(IOpType *<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>) +00377 { +00378 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a> != NULL ) +00379 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a>->release(); +00380 +00381 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>; +00382 } +<a name="l00383"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#a11">00383</a> <font class="keyword">const</font> IOpType *CMethodeName::getTypeOfMethode()<font class="keyword"> const</font> +00384 <font class="keyword"> </font>{ +00385 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o3">_TypeOfMethode</a>; +00386 } +00387 +<a name="l00388"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_5">00388</a> <font class="keywordtype">void</font> CMethodeName::getDebugString(std::string &<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>)<font class="keyword"> const</font> +00389 <font class="keyword"> </font>{ +00390 std::string txt; +00391 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o2">_Param</a>.getDebugString(txt); +00392 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += std::string(<a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>()) + txt; +00393 } +00394 +<a name="l00395"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_1">00395</a> <font class="keywordtype">void</font> CMethodeName::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &os) +00396 { +00397 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &) <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>-><a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>() ); +00398 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>-><a class="code" href="classNLAIC_1_1IBasicInterface.html#a4">save</a>( os ); +00399 +00400 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &) <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a>->getType() ); +00401 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a>->save( os ); +00402 } +00403 +<a name="l00404"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_0">00404</a> <font class="keywordtype">void</font> CMethodeName::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is) +00405 { +00406 <a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>; +00407 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( id ); +00408 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a> = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *) id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>(); +00409 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>-><a class="code" href="classNLAIC_1_1IBasicInterface.html#a5">load</a>( is ); +00410 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o0">_MethodeName</a>-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>(); +00411 +00412 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( id ); +00413 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a> = (IOpCode *) id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>(); +00414 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a>->load( is ); +00415 <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#o1">_Code</a>->incRef(); +00416 } +00417 +<a name="l00418"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_6">00418</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CMethodeName::isEqual</a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IBasicObjectIA.html">NLAIAGENT::IBasicObjectIA</a> &)<font class="keyword"> const</font> +00419 <font class="keyword"> </font>{ +00420 <font class="comment">// TODO</font> +00421 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00422 } +00423 +<a name="l00424"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_7">00424</a> <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &CMethodeName::run() +00425 { +00426 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#p0">NLAIAGENT::IObjectIA::ProcessRun</a>; +00427 } +00428 +<a name="l00429"></a><a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#z229_2">00429</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &CMethodeName::getType()<font class="keyword"> const</font> +00430 <font class="keyword"> </font>{ +00431 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CMethodeName.html#p0">IdMethodeName</a>; +00432 } +00433 } +</pre></div> + +<!-- footer --> +<BR><FONT Size=+5> </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> |