diff options
Diffstat (limited to 'docs/doxygen/nel/agent__3dvector_8cpp-source.html')
-rw-r--r-- | docs/doxygen/nel/agent__3dvector_8cpp-source.html | 460 |
1 files changed, 460 insertions, 0 deletions
diff --git a/docs/doxygen/nel/agent__3dvector_8cpp-source.html b/docs/doxygen/nel/agent__3dvector_8cpp-source.html new file mode 100644 index 00000000..f9d0e25f --- /dev/null +++ b/docs/doxygen/nel/agent__3dvector_8cpp-source.html @@ -0,0 +1,460 @@ +<!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>agent_3dvector.cpp</h1><a href="agent__3dvector_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font> +00008 <font class="comment"> *</font> +00009 <font class="comment"> * This file is part of NEVRAX NEL.</font> +00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font> +00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> +00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font> +00013 <font class="comment"> * any later version.</font> +00014 <font class="comment"></font> +00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font> +00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> +00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> +00018 <font class="comment"> * General Public License for more details.</font> +00019 <font class="comment"></font> +00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font> +00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font> +00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font> +00023 <font class="comment"> * MA 02111-1307, USA.</font> +00024 <font class="comment"> */</font> +00025 +00026 +00027 <font class="preprocessor">#include "<a class="code" href="agent__digital_8h.html">nel/ai/agent/agent_digital.h</a>"</font> +00028 <font class="preprocessor">#include "<a class="code" href="interpret__methodes_8h.html">nel/ai/script/interpret_methodes.h</a>"</font> +00029 <font class="preprocessor">#include "<a class="code" href="type__def_8h.html">nel/ai/script/type_def.h</a>"</font> +00030 <font class="preprocessor">#include "<a class="code" href="object__type_8h.html">nel/ai/agent/object_type.h</a>"</font> +00031 <font class="preprocessor">#include "<a class="code" href="agent__method__def_8h.html">nel/ai/agent/agent_method_def.h</a>"</font> +00032 <font class="preprocessor">#include "<a class="code" href="agent__3dvector_8h.html">nel/ai/agent/agent_3dvector.h</a>"</font> +00033 +00034 <font class="comment">// Add some code in the namespace "NLAIAGENT".</font> +00035 <font class="keyword">namespace </font>NLAIAGENT +00036 { +00037 +00038 <font class="comment">/****************************************************</font> +00039 <font class="comment"> * </font> +00040 <font class="comment"> */</font> +<a name="l00041"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a29">00041</a> sint32 IVector::getMethodIndexSize()<font class="keyword"> const</font> +00042 <font class="keyword"> </font>{ +00043 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a29">getMethodIndexSize</a>() + 10; +00044 } +00045 +00046 <font class="comment">/****************************************************</font> +00047 <font class="comment"> * </font> +00048 <font class="comment"> */</font> +<a name="l00049"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a30">00049</a> <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> IVector::isMember(<font class="keyword">const</font> IVarName *baseClass,<font class="keyword">const</font> IVarName *methodName,<font class="keyword">const</font> IObjectIA &p)<font class="keyword"> const</font> +00050 <font class="keyword"> </font>{ +00051 <font class="comment">//Type IVarName voir agent_string.h.</font> +00052 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName methodX(<font class="stringliteral">"x"</font>); +00053 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName methodY(<font class="stringliteral">"y"</font>); +00054 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName methodZ(<font class="stringliteral">"z"</font>); +00055 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName methodSquareLength(<font class="stringliteral">"SquareLength"</font>); +00056 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName methodLength(<font class="stringliteral">"Length"</font>); +00057 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName methodUnit(<font class="stringliteral">"Unit"</font>); +00058 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName selfName((<font class="keyword">const</font> <font class="keywordtype">char</font> *)<a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>()); +00059 <font class="keyword">static</font> <font class="keyword">const</font> CStringVarName constructor(<a class="code" href="agent__method__def_8h.html#a16">_CONSTRUCTOR_</a>); +00060 +00061 <font class="comment">//NLAISCRIPT::CParam est le type reel de p voir nel/ai/script/interpret_methodes.h pour la declaration de la class.</font> +00062 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a> = (<font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a> &)p; +00063 +00064 <font class="keywordflow">if</font>(baseClass == NULL || (*baseClass) == selfName) +00065 { +00066 <font class="keywordflow">if</font>((*methodName) == methodX) +00067 { +00068 <font class="keywordflow">if</font>(!param.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>()) +00069 { +00070 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00071 <font class="comment">//Type du retour de la method x(), c'est un Float dont de type DDigitalType c'est à dire DDigitalType::IDDigitalType;</font> +00072 <font class="comment">//CObjectType est un IObjectIA qui permet d'encapsuler un NLAIC::CIdentType c'est à dire un type.</font> +00073 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType)); +00074 t-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>(); +00075 <font class="comment">//CIdMethod est dans basicai.h elle va être documenter.</font> +00076 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 1,0.0,NULL,t)); +00077 <font class="keywordflow">return</font> a; +00078 } +00079 <font class="keywordflow">else</font> +00080 { +00081 <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a> xParam; +00082 xParam.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">push</a>(<a class="code" href="classNLAISCRIPT_1_1COperandSimple.html">NLAISCRIPT::COperandSimple</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType))); +00083 <font class="keywordflow">if</font>(param == xParam) +00084 { +00085 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00086 <font class="comment">//Type du retour de la method x(), c'est un void dont de type VoidType c'est à dire NLAIC::CIdentType::VoidType;</font> +00087 <font class="comment">//CObjectType est un IObjectIA qui permet d'encapsuler un NLAIC::CIdentType c'est à dire un type.</font> +00088 <font class="comment">//la variable NLAIC::CIdentType::VoidType est un static dans la class NLAIC::CIdentType.</font> +00089 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a>)); +00090 t-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>(); +00091 <font class="comment">//CIdMethod est dans basicai.h elle va être documenter.</font> +00092 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 2,0.0,NULL,t)); +00093 <font class="keywordflow">return</font> a; +00094 } +00095 } +00096 } +00097 <font class="keywordflow">else</font> <font class="keywordflow">if</font>((*methodName) == methodY) +00098 { +00099 <font class="keywordflow">if</font>(!param.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>()) +00100 { +00101 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00102 <font class="comment">//Type du retour de la method y(), c'est un Float dont de type DDigitalType c'est à dire DDigitalType::IdDDigitalType;</font> +00103 <font class="comment">//CObjectType est un IObjectIA qui permet d'encapsuler un NLAIC::CIdentType c'est à dire un type.</font> +00104 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType)); +00105 t-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>(); +00106 <font class="comment">//CIdMethod est dans basicai.h elle va être documenter.</font> +00107 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 3,0.0,NULL,t)); +00108 <font class="keywordflow">return</font> a; +00109 } +00110 <font class="keywordflow">else</font> +00111 { +00112 <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a> xParam; +00113 xParam.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">push</a>(<a class="code" href="classNLAISCRIPT_1_1COperandSimple.html">NLAISCRIPT::COperandSimple</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType))); +00114 <font class="keywordflow">if</font>(param == xParam) +00115 { +00116 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00117 <font class="comment">//Type du retour de la method y(), c'est un void dont de type VoidType c'est à dire CIdentType::VoidType;</font> +00118 <font class="comment">//CObjectType est un IObjectIA qui permet d'encapsuler un NLAIC::CIdentType c'est à dire un type.</font> +00119 <font class="comment">//la variable NLAIC::CIdentType::VoidType est un static dans la class NLAIC::CIdentType.</font> +00120 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a>)); +00121 <font class="comment">//CIdMethod est dans basicai.h elle va être documenter.</font> +00122 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 4,0.0,NULL,t)); +00123 <font class="keywordflow">return</font> a; +00124 } +00125 } +00126 } +00127 <font class="keywordflow">if</font>((*methodName) == methodZ) +00128 { +00129 <font class="keywordflow">if</font>(!param.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>()) +00130 { +00131 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00132 <font class="comment">//Type du retour de la method x(), c'est un Float dont de type DDigitalType c'est à dire DDigitalType::IdDDigitalType;</font> +00133 <font class="comment">//CObjectType est un IObjectIA qui permet d'encapsuler un NLAIC::CIdentType c'est à dire un type.</font> +00134 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType)); +00135 <font class="comment">//CIdMethod est dans basicai.h elle va être documenter.</font> +00136 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 5,0.0,NULL,t)); +00137 <font class="keywordflow">return</font> a; +00138 } +00139 <font class="keywordflow">else</font> +00140 { +00141 <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a> xParam; +00142 xParam.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">push</a>(<a class="code" href="classNLAISCRIPT_1_1COperandSimple.html">NLAISCRIPT::COperandSimple</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType))); +00143 <font class="keywordflow">if</font>(param == xParam) +00144 { +00145 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00146 <font class="comment">//Type du retour de la method x(), c'est un void dont de type VoidType c'est à dire NLAIC::CIdentType::VoidType;</font> +00147 <font class="comment">//CObjectType est un IObjectIA qui permet d'encapsuler un NLAIC::CIdentType c'est à dire un type.</font> +00148 <font class="comment">//la variable NLAIC::CIdentType::VoidType est un static dans la class NLAIC::CIdentType.</font> +00149 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a>)); +00150 <font class="comment">//CIdMethod est dans basicai.h elle va être documenter.</font> +00151 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 6,0.0,NULL,t)); +00152 <font class="keywordflow">return</font> a; +00153 } +00154 } +00155 } +00156 <font class="keywordflow">else</font> <font class="keywordflow">if</font>((*methodName) == methodSquareLength) +00157 { +00158 <font class="keywordflow">if</font>(!param.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>()) +00159 { +00160 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00161 <font class="comment">//Return a void type (no value return)</font> +00162 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType)); +00163 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 7,0.0,NULL,t)); +00164 <font class="keywordflow">return</font> a; +00165 } +00166 } +00167 <font class="keywordflow">else</font> <font class="keywordflow">if</font>((*methodName) == methodLength) +00168 { +00169 <font class="keywordflow">if</font>(!param.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>()) +00170 { +00171 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00172 <font class="comment">//Return a digital type</font> +00173 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType)); +00174 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 8,0.0,NULL,t)); +00175 <font class="keywordflow">return</font> a; +00176 } +00177 } +00178 <font class="keywordflow">else</font> <font class="keywordflow">if</font>((*methodName) == methodUnit) +00179 { +00180 <font class="keywordflow">if</font>(!param.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a14">size</a>()) +00181 { +00182 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00183 <font class="comment">//Return a void type</font> +00184 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a>)); +00185 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 9,0.0,NULL,t)); +00186 <font class="keywordflow">return</font> a; +00187 } +00188 } +00189 <font class="keywordflow">else</font> <font class="keywordflow">if</font>((*methodName) == constructor) +00190 { +00191 <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a> constructParam; +00192 constructParam.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">push</a>(<a class="code" href="classNLAISCRIPT_1_1COperandSimpleListOr.html">NLAISCRIPT::COperandSimpleListOr</a>(2,<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType),<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType))); +00193 constructParam.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">push</a>(<a class="code" href="classNLAISCRIPT_1_1COperandSimpleListOr.html">NLAISCRIPT::COperandSimpleListOr</a>(2,<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType),<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType))); +00194 constructParam.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a8">push</a>(<a class="code" href="classNLAISCRIPT_1_1COperandSimpleListOr.html">NLAISCRIPT::COperandSimpleListOr</a>(2,<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType),<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(DDigitalType::IdDDigitalType))); +00195 <font class="keywordflow">if</font>(constructParam.<a class="code" href="classNLAISCRIPT_1_1CParam.html#a5">eval</a>(param) >= 0.0 ) +00196 { +00197 <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> a; +00198 <font class="comment">//Type du retour du constructeur , c'est un void dont de type VoidType c'est à dire CIdentType::VoidType;</font> +00199 <font class="comment">//CObjectType est un IObjectIA qui permet d'encapsuler un NLAIC::CIdentType c'est à dire un type.</font> +00200 <font class="comment">//la variable NLAIC::CIdentType::VoidType est un static dans la class NLAIC::CIdentType.</font> +00201 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAIC_1_1CIdentType.html#p0">NLAIC::CIdentType::VoidType</a>)); +00202 <font class="comment">//CIdMethod est dans basicai.h elle va être documentee.</font> +00203 a.push(CIdMethod(IObjetOp::getMethodIndexSize() + 0,0.0,NULL,t)); +00204 <font class="keywordflow">return</font> a; +00205 } +00206 } +00207 } +00208 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#z137_0">IObjetOp::isMember</a>(baseClass,methodName,p); +00209 } +00210 +00211 <font class="comment">/****************************************************</font> +00212 <font class="comment"> * </font> +00213 <font class="comment"> */</font> +<a name="l00214"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a33">00214</a> sint32 IVector::isClassInheritedFrom(<font class="keyword">const</font> IVarName &baseClass)<font class="keyword"> const</font> +00215 <font class="keyword"> </font>{ +00216 +00218 <font class="comment">//Cette class n'a aucun heritage.</font> +00219 <font class="keyword">const</font> CStringVarName selfName((<font class="keyword">const</font> <font class="keywordtype">char</font> *)<a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>()); +00220 <font class="comment">//ça c'est si jamais quelqu'un ecrit un truc du type Vector.x() où Vector est le non de cette class dans le script.</font> +00221 <font class="keywordflow">if</font>((baseClass) == selfName) <font class="keywordflow">return</font> 0; +00222 <font class="keywordflow">else</font> <font class="keywordflow">return</font> -1; +00224 <font class="comment">/*</font> +00225 <font class="comment"> //Cette class n'a aucun heritage.</font> +00226 <font class="comment"> const CStringVarName selfName((const char *)getType());</font> +00227 <font class="comment"> //ça c'est si jamais quelqu'un ecrit un truc du type Vector.x() où Vector est le non de cette class dans le script.</font> +00228 <font class="comment"> if((baseClass) == selfName) return 0 + IObjetOp::getInheritedSize();</font> +00229 <font class="comment"> else return IObjetOp::isClassInheritedFrom(baseClass);</font> +00230 <font class="comment">*/</font> +00231 } +00232 +00233 <font class="comment">/****************************************************</font> +00234 <font class="comment"> * </font> +00235 <font class="comment"> */</font> +<a name="l00236"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a31">00236</a> IObjectIA::CProcessResult IVector::runMethodeMember(sint32 baseClassTag, sint32 methodTag, IObjectIA *p) +00237 { +00239 <font class="keywordflow">if</font>(baseClassTag == 0) +00240 { +00241 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a31">runMethodeMember</a>(methodTag,p); +00242 } +00244 <font class="comment">/* if(baseClassTag == (0+IObjetOp::getInheritedSize()) )</font> +00245 <font class="comment"> {</font> +00246 <font class="comment"> return runMethodeMember(methodTag,p);</font> +00247 <font class="comment"> }</font> +00248 <font class="comment">*/</font> +00249 <font class="keywordflow">return</font> IObjectIA::runMethodeMember(baseClassTag,methodTag,p); +00250 +00251 } +00252 +00253 <font class="comment">/****************************************************</font> +00254 <font class="comment"> * </font> +00255 <font class="comment"> */</font> +<a name="l00256"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a32">00256</a> IObjectIA::CProcessResult IVector::runMethodeMember(sint32 methodTag,IObjectIA *p) +00257 { +00258 IBaseGroupType &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a> = (IBaseGroupType &)*p; +00259 +00260 <font class="keywordflow">switch</font>(methodTag - IObjetOp::getMethodIndexSize()) +00261 { +00262 <font class="keywordflow">case</font> 0: +00263 { +00264 CIteratorContener i = <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.getIterator(); +00265 <font class="keyword">const</font> INombreDefine *o = (<font class="keyword">const</font> INombreDefine *)i++; +00266 <a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>(o->getNumber()); +00267 o = (<font class="keyword">const</font> INombreDefine *)i++; +00268 <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>(o->getNumber()); +00269 o = (<font class="keyword">const</font> INombreDefine *)i++; +00270 <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>(o->getNumber()); +00271 IObjectIA::CProcessResult a; +00272 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00273 a.Result = NULL; +00274 <font class="keywordflow">return</font> a; +00275 } +00276 +00277 <font class="keywordflow">case</font> 1: +00278 { +00279 DDigitalType *<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <font class="keyword">new</font> DDigitalType(<a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>()); +00280 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>->incRef(); +00281 IObjectIA::CProcessResult a; +00282 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00283 a.Result = <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; +00284 <font class="keywordflow">return</font> a; +00285 } +00286 +00287 <font class="keywordflow">case</font> 2: +00288 { +00289 +00290 <a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>(((<font class="keyword">const</font> INombreDefine *)<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.get())->getNumber()); +00291 IObjectIA::CProcessResult a; +00292 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00293 a.Result = NULL; +00294 <font class="keywordflow">return</font> a; +00295 } +00296 +00297 <font class="keywordflow">case</font> 3: +00298 { +00299 DDigitalType *<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <font class="keyword">new</font> DDigitalType(<a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>()); +00300 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>->incRef(); +00301 IObjectIA::CProcessResult a; +00302 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00303 a.Result = <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; +00304 <font class="keywordflow">return</font> a; +00305 } +00306 +00307 <font class="keywordflow">case</font> 4: +00308 { +00309 <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>(((<font class="keyword">const</font> INombreDefine *)<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.get())->getNumber()); +00310 IObjectIA::CProcessResult a; +00311 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00312 a.Result = NULL; +00313 <font class="keywordflow">return</font> a; +00314 } +00315 +00316 <font class="keywordflow">case</font> 5: +00317 { +00318 DDigitalType *<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <font class="keyword">new</font> DDigitalType(<a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>()); +00319 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>->incRef(); +00320 IObjectIA::CProcessResult a; +00321 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00322 a.Result = <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; +00323 <font class="keywordflow">return</font> a; +00324 } +00325 +00326 <font class="keywordflow">case</font> 6: +00327 { +00328 <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>(((<font class="keyword">const</font> INombreDefine *)<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.get())->getNumber()); +00329 IObjectIA::CProcessResult a; +00330 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00331 a.Result = NULL; +00332 <font class="keywordflow">return</font> a; +00333 } +00334 +00335 <font class="keywordflow">case</font> 7: +00336 { +00337 DDigitalType *<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <font class="keyword">new</font> DDigitalType(<a class="code" href="classNLAIAGENT_1_1IVector.html#a19">squareLength</a>()); +00338 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>->incRef(); +00339 IObjectIA::CProcessResult a; +00340 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00341 a.Result = <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; +00342 <font class="keywordflow">return</font> a; +00343 } +00344 +00345 <font class="keywordflow">case</font> 8: +00346 { +00347 DDigitalType *<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <font class="keyword">new</font> DDigitalType(<a class="code" href="classNLAIAGENT_1_1IVector.html#a20">length</a>()); +00348 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>->incRef(); +00349 IObjectIA::CProcessResult a; +00350 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00351 a.Result = <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; +00352 <font class="keywordflow">return</font> a; +00353 } +00354 +00355 <font class="keywordflow">case</font> 9: +00356 { +00357 <a class="code" href="classNLAIAGENT_1_1IVector.html#a21">unit</a>(); +00358 IObjectIA::CProcessResult a; +00359 a.ResultState = <a class="code" href="namespaceNLAIAGENT.html#a50a2">processIdle</a>; +00360 a.Result = NULL; +00361 <font class="keywordflow">return</font> a; +00362 } +00363 +00364 <font class="keywordflow">default</font>: +00365 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#z137_1">IObjetOp::runMethodeMember</a>(methodTag,p); +00366 <font class="keywordflow">break</font>; +00367 } +00368 } +00369 +00370 <font class="comment">/****************************************************</font> +00371 <font class="comment"> * </font> +00372 <font class="comment"> */</font> +<a name="l00373"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a9">00373</a> <font class="keyword">const</font> IObjectIA::CProcessResult &VectorType::run() +00374 { +00375 <font class="keywordflow">return</font> IObjectIA::ProcessRun; +00376 } +00377 +00378 <font class="comment">/****************************************************</font> +00379 <font class="comment"> * </font> +00380 <font class="comment"> */</font> +<a name="l00381"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a7">00381</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &VectorType::getType()<font class="keyword"> const</font> +00382 <font class="keyword"> </font>{ +00383 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1VectorType.html#p0">IdVectorType</a>; +00384 } +00385 +00386 }<font class="comment">// Enf of the namespace "NLAIAGENT" //</font> +00387 +00388 <font class="keyword">using</font> <font class="keyword">namespace </font>NLAIAGENT; +00389 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> VectorType::IdVectorType(<font class="stringliteral">"Vector3D"</font>,<a class="code" href="classNLAIC_1_1CSelfClassFactory.html">NLAIC::CSelfClassFactory</a>(VectorType(0, 0, 0)), +00390 <a class="code" href="classNLAIC_1_1CTypeOfObject.html">NLAIC::CTypeOfObject</a>(<a class="code" href="classNLAIC_1_1CTypeOfObject.html#s12s6">NLAIC::CTypeOfObject::tObject</a>), +00391 <a class="code" href="classNLAIC_1_1CTypeOfOperator.html">NLAIC::CTypeOfOperator</a>(<a class="code" href="classNLAIC_1_1CTypeOfOperator.html#s15s1">NLAIC::CTypeOfOperator::opAdd</a> | +00392 <a class="code" href="classNLAIC_1_1CTypeOfOperator.html#s15s2">NLAIC::CTypeOfOperator::opSub</a> | +00393 <a class="code" href="classNLAIC_1_1CTypeOfOperator.html#s15s5">NLAIC::CTypeOfOperator::opEq</a> | +00394 <a class="code" href="classNLAIC_1_1CTypeOfOperator.html#s15s11">NLAIC::CTypeOfOperator::opDiff</a>)); +00395 +</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> |