diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/var__control_8cpp-source.html | 724 |
1 files changed, 724 insertions, 0 deletions
diff --git a/docs/doxygen/nel/var__control_8cpp-source.html b/docs/doxygen/nel/var__control_8cpp-source.html new file mode 100644 index 00000000..d82e284d --- /dev/null +++ b/docs/doxygen/nel/var__control_8cpp-source.html @@ -0,0 +1,724 @@ +<!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>var_control.cpp</h1><a href="var__control_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="compilateur_8h.html">nel/ai/script/compilateur.h</a>"</font> +00025 <font class="preprocessor">#include "<a class="code" href="constraint_8h.html">nel/ai/script/constraint.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 "<a class="code" href="constraint__stack__component_8h.html">nel/ai/script/constraint_stack_component.h</a>"</font> +00028 <font class="preprocessor">#include "<a class="code" href="object__unknown_8h.html">nel/ai/script/object_unknown.h</a>"</font> +00029 <font class="preprocessor">#include "<a class="code" href="performative_8h.html">nel/ai/agent/performative.h</a>"</font> +00030 <font class="preprocessor">#include "<a class="code" href="param__container_8h.html">nel/ai/script/param_container.h</a>"</font> +00031 +00032 <font class="keyword">namespace </font>NLAISCRIPT +00033 { +<a name="l00034"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b56">00034</a> <font class="keywordtype">bool</font> CCompilateur::caseRunMsg() +00035 { +00036 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o58">isRunMsg</a> && !<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o59">haveReturn</a>) +00037 { +00038 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o58">isRunMsg</a> = <font class="keyword">false</font>; +00039 <font class="keywordtype">char</font> text[4096]; +00040 strcpy(text,<font class="stringliteral">"run message methode must return an message value"</font>); +00041 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>(text); +00042 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00043 } +00044 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o58">isRunMsg</a> = <font class="keyword">false</font>; +00045 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o59">haveReturn</a> = <font class="keyword">false</font>; +00046 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00047 } +00048 +<a name="l00049"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b58">00049</a> <font class="keywordtype">bool</font> CCompilateur::classIsAnOperator() +00050 { +00051 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00052 } +00053 +<a name="l00054"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b12">00054</a> sint32 CCompilateur::castVariable(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>,<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>) +00055 { +00056 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *var = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a3">getVar</a>(v.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a4">getString</a>()); +00057 <font class="keywordflow">if</font>(var != NULL) +00058 { +00059 <font class="keywordflow">try</font> +00060 { +00061 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>(t.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a4">getString</a>()); +00062 IOpType * c= <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(id)); +00063 CObjectUnknown *o = (CObjectUnknown *)((CVarPStackParam *)var)->getObject(); +00064 o->setBaseType(c); +00065 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00066 } +00067 <font class="keywordflow">catch</font>(<a class="code" href="classNLAIE_1_1IException.html">NLAIE::IException</a> &) +00068 { +00069 std::string text; +00070 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"can't find %s object in the class factory"</font>,t.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a4">getString</a>()); +00071 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>((<font class="keywordtype">char</font> *)text.c_str()); +00072 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00073 } +00074 +00075 } +00076 <font class="keywordflow">else</font> +00077 { +00078 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>(<font class="stringliteral">"cast service is reseved to the local variable"</font>); +00079 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00080 } +00081 } +<a name="l00082"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b18">00082</a> sint32 CCompilateur::processingVar() +00083 { +00084 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.size() >= 1) +00085 { +00086 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *var; +00087 var = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a3">getVar</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.front().data()); +00088 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.size() == 1) +00089 { +00090 <font class="keywordflow">if</font>(var == NULL) +00091 { +00092 sint32 i = ((IClassInterpret *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o7">_SelfClass</a>.get())-><a class="code" href="classNLAIAGENT_1_1IObjectIA.html#a6">getStaticMemberIndex</a>(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.front().data())); +00093 <font class="keywordflow">if</font>(i >= 0) +00094 { +00095 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.clear(); +00096 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.push_back(i <font class="comment">/*+ getCompementShift((IClassInterpret *)_SelfClass.get())*/</font>); +00097 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.ValueVar = NULL; +00098 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a5">varTypeMember</a>; +00099 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00100 <font class="keywordflow">try</font> +00101 { +00102 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <font class="keyword">delete</font> <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>; +00103 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> ((<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o7">_SelfClass</a>.get())->getStaticMember(i)->getType())); +00104 } +00105 <font class="keywordflow">catch</font>(<a class="code" href="classNLAIE_1_1IException.html">NLAIE::IException</a> &a) +00106 { +00107 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>((<font class="keywordtype">char</font> *)a.what()); +00108 <font class="keywordflow">return</font> 0; +00109 } +00110 } +00111 <font class="keywordflow">else</font> +00112 { +00113 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o18">_TypeList</a>.size()) +00114 { +00115 IOpType *<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o18">_TypeList</a>.back(); +00116 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o18">_TypeList</a>.pop_back(); +00117 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.clear(); +00118 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName.clear(); +00119 +00120 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00121 +00122 +00123 <font class="keywordflow">if</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->satisfied()) +00124 { +00125 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *c = (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *)((<a class="code" href="classNLAIC_1_1IClassFactory.html">NLAIC::IClassFactory</a> *)<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->getConstraintTypeOf()->getFactory())->getClass(); +00126 sint32 i = c-><a class="code" href="classNLAIAGENT_1_1IObjectIA.html#a6">getStaticMemberIndex</a>(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.front().data())); +00127 <font class="keywordflow">if</font>(i >= 0) +00128 { +00129 <font class="comment">/*if(((const NLAIC::CTypeOfObject &)*c->getType()) & NLAIC::CTypeOfObject::tAgentInterpret)</font> +00130 <font class="comment"> {</font> +00131 <font class="comment"> _LastFact.Member.push_back(i + getCompementShift((IClassInterpret *)c));</font> +00132 <font class="comment"> }</font> +00133 <font class="comment"> else*/</font> +00134 { +00135 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.push_back(i); +00136 } +00137 +00138 } +00139 <font class="keywordflow">else</font> +00140 { +00141 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->release(); +00142 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>(<font class="stringliteral">"attribut is not define"</font>); +00143 <font class="keywordflow">return</font> 0; +00144 } +00145 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a> = <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> (c-><a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>()); +00146 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(id); +00147 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->release(); +00148 } +00149 <font class="keywordflow">else</font> +00150 { +00151 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>; +00152 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->incRef(); +00153 IOpType *constr = (IOpType *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b32">getMethodConstraint</a>(CConstraintStackComp(CConstraintStackComp::stackCall,0,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName ,<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,0,0)); +00154 <font class="keywordflow">if</font>(constr == NULL) +00155 { +00156 constr = <font class="keyword">new</font> CConstraintStackComp(CConstraintStackComp::stackCall,0,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName,<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n25">yyLine</a>,<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n26">yyColone</a>); +00157 } +00158 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = constr; +00159 } +00160 +00161 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack->release(); +00162 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>; +00163 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack->incRef(); +00164 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.ValueVar = NULL; +00165 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a6">varTypeStackMember</a>; +00166 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00167 +00168 } +00169 <font class="keywordflow">else</font> +00170 { +00171 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>(<font class="stringliteral">"variable used but never declared"</font>); +00172 <font class="keywordflow">return</font> 0; +00173 } +00174 } +00175 } +00176 <font class="keywordflow">else</font> +00177 { +00178 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.ValueVar = var; +00179 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a8">varTypeLocal</a>; +00180 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00181 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.clear(); +00182 <font class="keywordflow">if</font>(var-><a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>() == CVarPStackParam::IdVarPStackParam) +00183 { +00184 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00185 <font class="keywordflow">try</font> +00186 { +00187 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(((CVarPStackParam *)var)->getVarType())); +00188 } +00189 <font class="keywordflow">catch</font>(<a class="code" href="classNLAIE_1_1CExceptionUnReference.html">NLAIE::CExceptionUnReference</a> &) +00190 { +00191 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = (IOpType *)((<font class="keyword">const</font> CObjectUnknown *)((CVarPStackParam *)var)->getObject())->getClassType(); +00192 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->incRef(); +00193 } +00194 } +00195 <font class="keywordflow">else</font> +00196 { +00197 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00198 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(var-><a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>())); +00199 } +00200 } +00201 } +00202 <font class="keywordflow">else</font> +00203 { +00204 +00205 CConstraintStackComp::OpCodeType opCodeType = CConstraintStackComp::stackCall; +00206 sint32 posStack = 0; +00207 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> varName(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.back().data()); +00208 <font class="keywordflow">if</font>(var != NULL) +00209 { +00210 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>.pop_front(); +00211 IOpType *cont = (IOpType *)((<font class="keyword">const</font> CObjectUnknown *)((CVarPStackParam *)var)->getObject())->getBaseType(); +00212 <font class="keywordflow">if</font>(cont->satisfied()) +00213 { +00214 <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> = *cont->getConstraintTypeOf(); +00215 IClassInterpret *cl; +00216 +00217 <font class="keywordflow">if</font>(strcmp((<font class="keyword">const</font> <font class="keywordtype">char</font> *)id,((IClassInterpret *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o7">_SelfClass</a>.get())-><a class="code" href="classNLAIC_1_1CIdentType.html#z194_0">getClassName</a>()->getString()) == 0) +00218 { +00219 cl = (IClassInterpret *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o7">_SelfClass</a>.get(); +00220 } +00221 <font class="keywordflow">else</font> cl = (IClassInterpret *)((CClassInterpretFactory *)id.<a class="code" href="classNLAIC_1_1CIdentType.html#a16">getFactory</a>())->getClass(); +00222 IOpType *c; +00223 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.clear(); +00224 <font class="keywordflow">if</font>(!<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a18">isValidateVarName</a>(cl,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>,c)) +00225 { +00226 <font class="keywordflow">if</font>(c) c->release(); +00227 std::string text; +00228 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"var '%s' is not define"</font>,varName.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a4">getString</a>()); +00229 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>((<font class="keywordtype">char</font> *)text.c_str()); +00230 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00231 } +00232 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = c; +00233 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack->release(); +00234 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>; +00235 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack->incRef(); +00236 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.ValueVar = var; +00237 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a7">varTypeHeapMember</a>; +00238 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00239 <font class="preprocessor">#ifdef NL_DEBUG</font> +00240 <font class="preprocessor"></font> <a class="code" href="classstd_1_1list.html">std::list<sint32></a>::iterator i_dbg = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.begin(); +00241 <font class="keywordflow">while</font>(i_dbg != <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.end()) +00242 { +00243 <font class="keywordtype">int</font> k = *i_dbg++; +00244 } +00245 +00246 <font class="preprocessor">#endif</font> +00247 <font class="preprocessor"></font> <font class="keywordflow">return</font> <font class="keyword">true</font>; +00248 } +00249 <font class="keywordflow">else</font> +00250 { +00251 opCodeType = CConstraintStackComp::heapCall; +00252 posStack = ((CVarPStackParam *)var)->getIndex(); +00253 cont->incRef(); +00254 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o18">_TypeList</a>.push_back(cont); +00255 } +00256 +00257 } +00258 +00259 <font class="keywordflow">if</font>(!<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o18">_TypeList</a>.size()) +00260 { +00261 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.clear(); +00262 IOpType *c; +00263 <font class="keywordflow">if</font>(!<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a18">isValidateVarName</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>,c)) +00264 { +00265 <font class="keywordflow">if</font>(c) c->release(); +00266 std::string text; +00267 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"var '%s' is not define"</font>,varName.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a4">getString</a>()); +00268 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>((<font class="keywordtype">char</font> *)text.c_str()); +00269 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00270 } +00271 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.ValueVar = NULL; +00272 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a5">varTypeMember</a>; +00273 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00274 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00275 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = (IOpType *)c; +00276 } +00277 <font class="keywordflow">else</font> +00278 { +00279 IOpType *<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o18">_TypeList</a>.back(); +00280 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o18">_TypeList</a>.pop_back(); +00281 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member.clear(); +00282 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName.clear(); +00283 +00284 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00285 +00286 <font class="keywordflow">if</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->satisfied()) +00287 { +00288 IClassInterpret *cl = (IClassInterpret *)<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->getConstraintTypeOf()->allocClass(); +00289 IOpType *c; +00290 <font class="keywordflow">if</font>(!<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a18">isValidateVarName</a>(cl,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Member,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>,c)) +00291 { +00292 <font class="keywordflow">if</font>(c) c->release(); +00293 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->release(); +00294 cl->release(); +00295 std::string text; +00296 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"var '%s' is not define"</font>,varName.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a4">getString</a>()); +00297 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>((<font class="keywordtype">char</font> *)text.c_str()); +00298 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00299 } +00300 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = (IOpType *)c; +00301 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->release(); +00302 cl->release(); +00303 } +00304 <font class="keywordflow">else</font> +00305 { +00306 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o16">_LasVarStr</a>; +00307 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>->incRef(); +00308 IOpType *constr = (IOpType *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b32">getMethodConstraint</a>(CConstraintStackComp(opCodeType,posStack,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName ,<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,0,0)); +00309 <font class="keywordflow">if</font>(constr == NULL) +00310 { +00311 constr = <font class="keyword">new</font> CConstraintStackComp(opCodeType,posStack,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.MemberName,<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n25">yyLine</a>,<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n26">yyColone</a>); +00312 } +00313 <font class="keywordflow">else</font> +00314 { +00315 constr->incRef(); +00316 } +00317 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = constr; +00318 } +00319 +00320 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack->release(); +00321 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>; +00322 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.TypeStack->incRef(); +00323 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.ValueVar = NULL; +00324 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a6">varTypeStackMember</a>; +00325 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00326 } +00327 } +00328 } +00329 <font class="keywordflow">else</font> +00330 { +00331 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>(<font class="stringliteral">"erreur de definition de variable"</font>); +00332 <font class="keywordflow">return</font> 0; +00333 } +00334 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00335 } +00336 +<a name="l00337"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b35">00337</a> <font class="keywordtype">bool</font> CCompilateur::setParamVarName() +00338 { +00339 <font class="keywordflow">try</font> +00340 { +00341 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> idType = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b0">getTypeOfClass</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o4">_LastString</a>); +00342 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *i; +00343 +00344 <font class="keywordflow">if</font>(_BaseObjectDef) +00345 { +00346 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> idBase = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b0">getTypeOfClass</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o5">_LastBaseObjectDef</a>); +00347 COperandSimple *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(idType)); +00348 COperandSimple *b = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(idBase)); +00349 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->push(<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>); +00350 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>->incRef(); +00351 i = <font class="keyword">new</font> CObjectUnknown(<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>,b); +00352 } +00353 <font class="keywordflow">else</font> +00354 { +00355 COperandSimple *c = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(idType)); +00356 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->push(c); +00357 c->incRef(); +00358 i = <font class="keyword">new</font> CObjectUnknown(c);<font class="comment">//(NLAIAGENT::IObjectIA *)NLAIC::createInstance(id);</font> +00359 } +00360 +00361 <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> (<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n23">LastyyText</a>[1]); +00362 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o21">_Attrib</a>.push_back(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#u0">pairType</a>(s,i)); +00363 +00364 i-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>(); +00365 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o15">_Heap</a>[(int)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o15">_Heap</a>] = i; +00366 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o15">_Heap</a> ++; +00367 } +00368 <font class="keywordflow">catch</font>(<a class="code" href="classNLAIE_1_1IException.html">NLAIE::IException</a> &e) +00369 { +00370 std::string text; +00371 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"Bad reference or class reference undefined '%s'"</font>, e.what()); +00372 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>((<font class="keywordtype">char</font> *)text.c_str()); +00373 <font class="keywordflow">return</font> 0; +00374 } +00375 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00376 +00377 } +00378 +<a name="l00379"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b38">00379</a> <font class="keywordtype">void</font> CCompilateur::addParamRuleCont() +00380 { +00381 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o3">_LastBloc</a>->addCode(<font class="keyword">new</font> CLdbOpCode (<a class="code" href="classNLAIAGENT_1_1CGroupType.html">NLAIAGENT::CGroupType</a>())); +00382 } +00383 +<a name="l00384"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b37">00384</a> <font class="keywordtype">void</font> CCompilateur::addParamCont() +00385 { +00386 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o3">_LastBloc</a>->addCode(<font class="keyword">new</font> CLdbOpCode (CPramContainer())); +00387 } +00388 +<a name="l00389"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b36">00389</a> <font class="keywordtype">void</font> CCompilateur::pushParamExpression() +00390 { +00391 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o3">_LastBloc</a>->addCode((<font class="keyword">new</font> CAddOpCode)); +00392 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->push(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>); +00393 <font class="keywordflow">if</font>(!<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>->satisfied()) +00394 { +00395 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o24">_ConstraintType</a>.push_back(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>); +00396 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>->incRef(); +00397 } +00398 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = NULL; +00399 } +00400 +<a name="l00401"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b41">00401</a> <font class="keywordtype">void</font> CCompilateur::setPerformative(<a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10">NLAIAGENT::IMessageBase::TPerformatif</a> p) +00402 { +00403 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value != NULL) +00404 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->release(); +00405 <font class="keywordflow">switch</font>(p) +00406 { +00407 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s1">NLAIAGENT::IMessageBase::PExec</a>: +00408 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPExec.html">NLAIAGENT::CPExec</a>(); +00409 <font class="keywordflow">break</font>; +00410 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s2">NLAIAGENT::IMessageBase::PAchieve</a>: +00411 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPAchieve.html">NLAIAGENT::CPAchieve</a>(); +00412 <font class="keywordflow">break</font>; +00413 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s3">NLAIAGENT::IMessageBase::PAsk</a>: +00414 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPAsk.html">NLAIAGENT::CPAsk</a>(); +00415 <font class="keywordflow">break</font>; +00416 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s4">NLAIAGENT::IMessageBase::PBreak</a>: +00417 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPBreak.html">NLAIAGENT::CPBreak</a>(); +00418 <font class="keywordflow">break</font>; +00419 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s5">NLAIAGENT::IMessageBase::PTell</a>: +00420 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPTell.html">NLAIAGENT::CPTell</a>(); +00421 <font class="keywordflow">break</font>; +00422 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s6">NLAIAGENT::IMessageBase::PKill</a>: +00423 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPKill.html">NLAIAGENT::CPKill</a>(); +00424 <font class="keywordflow">break</font>; +00425 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s7">NLAIAGENT::IMessageBase::PError</a>: +00426 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPError.html">NLAIAGENT::CPError</a>(); +00427 <font class="keywordflow">break</font>; +00428 <font class="keywordflow">case</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html#s10s8">NLAIAGENT::IMessageBase::PEven</a>: +00429 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CPEven.html">NLAIAGENT::CPEven</a>(); +00430 <font class="keywordflow">break</font>; +00431 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>; +00432 } +00433 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a4">varTypeImediate</a>; +00434 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00435 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00436 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->getType())); +00437 } +00438 +<a name="l00439"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b40">00439</a> <font class="keywordtype">void</font> CCompilateur::setImediateVarNill() +00440 { +00441 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value != NULL) +00442 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->release(); +00443 +00444 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = &<a class="code" href="classNLAIAGENT_1_1DigitalType.html#p0">NLAIAGENT::DigitalType::NullOperator</a>; +00445 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->incRef(); +00446 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a4">varTypeImediate</a>; +00447 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00448 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00449 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->getType())); +00450 } +00451 +<a name="l00452"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b39">00452</a> <font class="keywordtype">void</font> CCompilateur::setImediateVar() +00453 { +00454 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value != NULL) +00455 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->release(); +00456 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1DDigitalType.html">NLAIAGENT::DDigitalType</a>(<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n24">LastyyNum</a>); +00457 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a4">varTypeImediate</a>; +00458 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00459 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00460 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->getType())); +00461 } +00462 +<a name="l00463"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b42">00463</a> <font class="keywordtype">void</font> CCompilateur::setListVar() +00464 { +00465 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o3">_LastBloc</a>->addCode(<font class="keyword">new</font> CLdbOpCode (<a class="code" href="classNLAIAGENT_1_1CGroupType.html">NLAIAGENT::CGroupType</a>())); +00466 <a class="code" href="classNLAIAGENT_1_1CGroupType.html">NLAIAGENT::CGroupType</a> <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>; +00467 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00468 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(l.<a class="code" href="classNLAIAGENT_1_1CGroupType.html#a35">getType</a>())); +00469 } +00470 +<a name="l00471"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b43">00471</a> <font class="keywordtype">void</font> CCompilateur::setChaineVar() +00472 { +00473 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value != NULL) +00474 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->release(); +00475 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a>(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>(<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n23">LastyyText</a>[1])); +00476 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a4">varTypeImediate</a>; +00477 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00478 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00479 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->getType())); +00480 } +00481 +<a name="l00482"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b44">00482</a> <font class="keywordtype">void</font> CCompilateur::setStackVar(<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#a373">type</a>) +00483 { +00484 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value != NULL) +00485 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->release(); +00486 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a9">varForFunc</a>; +00487 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00488 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00489 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(type) ); +00490 } +00491 +<a name="l00492"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b45">00492</a> <font class="keywordtype">void</font> CCompilateur::setMethodVar() +00493 { +00494 +00495 <font class="preprocessor">#ifdef NL_DEBUG</font> +00496 <font class="preprocessor"></font> std::string mName; +00497 std::string pName; +00498 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->getDebugString(mName); +00499 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->getDebugString(pName); +00500 <font class="preprocessor">#endif</font> +00501 <font class="preprocessor"></font> <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value != NULL) +00502 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value->release(); +00503 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.Value = NULL; +00504 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.VarType = <a class="code" href="namespaceNLAISCRIPT.html#a51a9">varForFunc</a>; +00505 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o2">_LastFact</a>.IsUsed = <font class="keyword">false</font>; +00506 +00507 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> != NULL) +00508 { +00509 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00510 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = NULL; +00511 } +00512 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->incRef(); +00513 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->incRef(); +00514 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o37">_LastbaseClass</a> != NULL)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o37">_LastbaseClass</a>->incRef(); +00515 IConstraint *c = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b32">getMethodConstraint</a>(CConstraintMethode((CConstraintMethode::TCallTypeOpCode) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o36">_LastTypeCall</a>,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o35">_LastPosHeap</a>,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o37">_LastbaseClass</a>,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back(),<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back(),0,0)); +00516 <font class="keywordflow">if</font>(c == NULL) +00517 { +00518 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->incRef(); +00519 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->incRef(); +00520 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o37">_LastbaseClass</a> != NULL)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o37">_LastbaseClass</a>->incRef(); +00521 c = <font class="keyword">new</font> CConstraintMethode((CConstraintMethode::TCallTypeOpCode) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o36">_LastTypeCall</a>,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o35">_LastPosHeap</a>,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o37">_LastbaseClass</a>,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back(),<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back(),<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n25">yyLine</a>,<a class="code" href="classNLAISCRIPT_1_1yyFlexLexer.html#n26">yyColone</a>); +00522 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o23">_MethodConstraint</a>.push_back(c); +00523 } +00524 c->incRef(); +00525 IConstraint *cm = <font class="keyword">new</font> CConstraintChkMethodeType(c,0,0); +00526 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandUnknown(cm); +00527 +00528 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->release(); +00529 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.pop_back(); +00530 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->release(); +00531 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.pop_back(); +00532 <font class="preprocessor">#ifdef NL_DEBUG</font> +00533 <font class="preprocessor"></font> <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.size()) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->getDebugString(mName); +00534 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.size())<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->getDebugString(pName); +00535 +00536 <font class="preprocessor">#endif </font> +00537 <font class="preprocessor"></font> } +00538 +<a name="l00539"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b46">00539</a> <font class="keywordtype">bool</font> CCompilateur::buildObject() +00540 { +00541 <a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a> = (<a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a> *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->get(); +00542 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->size() == 1) +00543 { +00544 +00545 <font class="keywordflow">try</font> +00546 { +00547 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>(s-><a class="code" href="classNLAIAGENT_1_1CStringType.html#a10">getStr</a>().getString()); +00548 <font class="keywordflow">if</font>(_FlotingExpressionType) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->release(); +00549 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <font class="keyword">new</font> COperandSimple(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> (id)); +00550 +00551 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *i = (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *)<a class="code" href="namespaceNLAIC.html#a17">NLAIC::createInstance</a>(id); +00552 +00553 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o3">_LastBloc</a>->addCode( <font class="keyword">new</font> CLdbOpCode( *i ) ); +00554 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o3">_LastBloc</a>->addCode(<font class="keyword">new</font> CHaltOpCode()); +00555 CBagOfCode *b = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o3">_LastBloc</a>->getBagOfCode(); +00556 +00557 +00558 <a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *g = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CGroupType.html">NLAIAGENT::CGroupType</a>(); +00559 g-><a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_5">cpy</a>(<a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a>(<a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>(<a class="code" href="agent__method__def_8h.html#a16">_CONSTRUCTOR_</a>))); +00560 +00561 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->incRef(); +00562 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>->incRef(); +00563 CConstraintMethode *cm = <font class="keyword">new</font> CConstraintMethode(CConstraintMethode::newCall,0,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>,g,<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back(),0,0); +00564 IConstraint *c = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b32">getMethodConstraint</a>(*cm); +00565 <font class="keywordflow">if</font>(c == NULL) +00566 { +00567 c = cm; +00568 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o23">_MethodConstraint</a>.push_back(c); +00569 } +00570 <font class="keywordflow">else</font> +00571 { +00572 cm->release(); +00573 } +00574 b->addConstraint(c); +00575 i-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>(); +00576 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.back()->release(); +00577 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o25">_LastStringParam</a>.pop_back(); +00578 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.back()->release(); +00579 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o26">_Param</a>.pop_back(); +00580 } +00581 <font class="keywordflow">catch</font>(<a class="code" href="classNLAIE_1_1IException.html">NLAIE::IException</a> &) +00582 { +00583 std::string text; +00584 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"can't find '%s'"</font>,s-><a class="code" href="classNLAIAGENT_1_1CStringType.html#a10">getStr</a>().getString()); +00585 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#a14">yyerror</a>((<font class="keywordtype">char</font> *)text.c_str()); +00586 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00587 } +00588 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00589 } +00590 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00591 } +00592 +<a name="l00593"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b47">00593</a> <font class="keywordtype">void</font> CCompilateur::setTypeExpression() +00594 { +00595 <font class="keywordflow">if</font>(_ExpressionType) +00596 { +00597 COperandUnknown *gd = <font class="keyword">new</font> COperandUnknown(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>); +00598 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = gd; +00599 } +00600 <font class="keywordflow">else</font> +00601 { +00602 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = <font class="keyword">new</font> COperandUnknown(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>); +00603 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = NULL; +00604 } +00605 } +00606 +<a name="l00607"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b48">00607</a> <font class="keywordtype">void</font> CCompilateur::setTypeExpression(<a class="code" href="classNLAIC_1_1CTypeOfOperator.html#s15">NLAIC::CTypeOfOperator::TTypeOp</a> op,<font class="keyword">const</font> <font class="keywordtype">char</font> *txtOp) +00608 { +00609 <font class="keywordflow">if</font> ( _ExpressionType ) +00610 { +00611 COperationType *gd = <font class="keyword">new</font> COperationType; +00612 gd->setOperand(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>); +00613 gd->setOp(op); +00614 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = gd; +00615 } +00616 <font class="keywordflow">else</font> +00617 { +00618 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = <font class="keyword">new</font> COperationType; +00619 ((COperationType *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>)->setOperand(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>); +00620 ((COperationType *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>)->setOp(op); +00621 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = NULL; +00622 } +00623 } +00624 +<a name="l00625"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b49">00625</a> <font class="keywordtype">void</font> CCompilateur::setTypeExpressionG() +00626 { +00627 <font class="keywordflow">if</font>(_ExpressionType) +00628 { +00629 COperationTypeGD *gd = <font class="keyword">new</font> COperationTypeGD; +00630 gd->setOperationG(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>); +00631 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = gd; +00632 } +00633 <font class="keywordflow">else</font> +00634 { +00635 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = <font class="keyword">new</font> COperationTypeGD; +00636 ((COperationTypeGD *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>)->setOperationG(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>); +00637 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = NULL; +00638 } +00639 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o31">_ExpressionOp</a>.push_back(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>); +00640 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = NULL; +00641 } +00642 +<a name="l00643"></a><a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#b50">00643</a> <font class="keywordtype">void</font> CCompilateur::setTypeExpressionD(<a class="code" href="classNLAIC_1_1CTypeOfOperator.html#s15">NLAIC::CTypeOfOperator::TTypeOp</a> op,<font class="keyword">const</font> <font class="keywordtype">char</font> *txtOp) +00644 { +00645 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> != NULL && <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> == NULL) <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>; +00646 <font class="comment">//else if(_ExpressionType == NULL && _FlotingExpressionType != NULL) _FlotingExpressionType = _ExpressionType;</font> +00647 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a> = <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o31">_ExpressionOp</a>.back(); +00648 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o31">_ExpressionOp</a>.pop_back(); +00649 +00650 ((COperationTypeGD *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>)->setOperationD(<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a>); +00651 ((COperationTypeGD *)<a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o28">_ExpressionType</a>)->setOp(op); +00652 <a class="code" href="classNLAISCRIPT_1_1CCompilateur.html#o29">_FlotingExpressionType</a> = NULL; +00653 } +00654 } +</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> |