diff options
Diffstat (limited to 'docs/doxygen/nel/interpret__object__agent_8cpp-source.html')
-rw-r--r-- | docs/doxygen/nel/interpret__object__agent_8cpp-source.html | 1091 |
1 files changed, 1091 insertions, 0 deletions
diff --git a/docs/doxygen/nel/interpret__object__agent_8cpp-source.html b/docs/doxygen/nel/interpret__object__agent_8cpp-source.html new file mode 100644 index 00000000..fc5ae094 --- /dev/null +++ b/docs/doxygen/nel/interpret__object__agent_8cpp-source.html @@ -0,0 +1,1091 @@ +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD> + <TITLE>nevrax.org : docs</TITLE> + <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css"> + <link href="doxygen.css" rel="stylesheet" type="text/css"> +</HEAD> +<BODY MARGINHEIGHT="0" MARGINWIDTH="0"> + +<!-- uplinks --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD> + </TR> +</TABLE> + +<!-- banner Nevrax --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%> + <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR> +</TABLE> + +<!-- main table --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + + <!------ Begin Box ------> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black> + <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF> + <TABLE cellspacing=0 cellpadding=1 border=0> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr> + </TABLE> + </TD></TR></TABLE></TD></TR></TABLE> + <!------ End Box ------> + + </TD> + <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + +<!-- title --> +<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td> +<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A> +</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT=""> +</td></tr></table> + + +<!-- block --> +<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD> + <TD><B>Documentation</B></TD> + <TD ALIGN=RIGHT> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.14 --> +<center> +<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> </center> +<hr><h1>interpret_object_agent.cpp</h1><a href="interpret__object__agent_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00006 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font> +00007 <font class="comment"> *</font> +00008 <font class="comment"> * This file is part of NEVRAX NEL.</font> +00009 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font> +00010 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> +00011 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font> +00012 <font class="comment"> * any later version.</font> +00013 <font class="comment"></font> +00014 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font> +00015 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> +00016 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> +00017 <font class="comment"> * General Public License for more details.</font> +00018 <font class="comment"></font> +00019 <font class="comment"> * You should have received a copy of the GNU General Public License</font> +00020 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font> +00021 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font> +00022 <font class="comment"> * MA 02111-1307, USA.</font> +00023 <font class="comment"> */</font> +00024 <font class="preprocessor">#include "<a class="code" href="interpret__object__agent_8h.html">nel/ai/script/interpret_object_agent.h</a>"</font> +00025 <font class="preprocessor">#include "<a class="code" href="registry__class_8h.html">nel/ai/c/registry_class.h</a>"</font> +00026 <font class="preprocessor">#include "<a class="code" href="agent__script_8h.html">nel/ai/agent/agent_script.h</a>"</font> +00027 <font class="preprocessor">#include "<a class="code" href="type__def_8h.html">nel/ai/script/type_def.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="lexsupport_8h.html">nel/ai/script/lexsupport.h</a>"</font> +00030 <font class="preprocessor">#include "<a class="code" href="libcode_8h.html">nel/ai/script/libcode.h</a>"</font> +00031 +00032 <font class="keyword">namespace </font>NLAISCRIPT +00033 { +<a name="l00034"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a12">00034</a> <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &CAgentClass::run() +00035 { +00036 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#p0">NLAIAGENT::IObjectIA::ProcessRun</a>; +00037 } +00038 +<a name="l00039"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">00039</a> CAgentClass::CAgentClass(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name) : _Components(0),_Inheritance(NULL) +00040 { +00041 <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a6">setType</a>(name, *<font class="keyword">this</font>); +00042 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> = -1; +00043 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o7">_RunIndex</a> = -1; +00044 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00045 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))-><a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>()); +00046 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))); +00047 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> = NULL; +00048 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00049 } +00050 +<a name="l00051"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a1">00051</a> CAgentClass::CAgentClass(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name, <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &base_class_name) : +00052 _Components(0), +00053 _Inheritance( (NLAIAGENT::IVarName *)base_class_name.clone() ) +00054 { +00055 <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a6">setType</a>(name, *<font class="keyword">this</font>); +00056 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> = -1; +00057 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o7">_RunIndex</a> = -1; +00058 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00059 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))-><a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>()); +00060 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))); +00061 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> = NULL; +00062 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00063 } +00064 +<a name="l00065"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a2">00065</a> CAgentClass::CAgentClass( <font class="keyword">const</font> CAgentClass &a): +00066 _Components(a._Components),_Inheritance(a._Inheritance == NULL ? NULL : (NLAIAGENT::IVarName *)a._Inheritance->clone()) +00067 { +00068 <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a6">setType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(a.getType())); +00069 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> = -1; +00070 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o7">_RunIndex</a> = -1; +00071 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00072 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))-><a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>()); +00073 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))); +00074 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> = a._Base_class; +00075 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = a._ConstructorIndex; +00076 } +00077 +<a name="l00078"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a3">00078</a> CAgentClass::CAgentClass(<font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &ident):_Components(0),_Inheritance(NULL) +00079 { +00080 <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a6">setType</a>(<font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(ident)); +00081 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> = -1; +00082 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o7">_RunIndex</a> = -1; +00083 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00084 +00085 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))-><a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>()); +00086 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))); +00087 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> = NULL; +00088 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00089 } +00090 +<a name="l00091"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a4">00091</a> CAgentClass::CAgentClass():_Components(0),_Inheritance(NULL) +00092 { +00093 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> = -1; +00094 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o7">_RunIndex</a> = -1; +00095 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00096 +00097 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); +00098 +00099 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a3">setBaseMethodCount</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))-><a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>()); +00100 <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a5">setBaseObjectInstance</a>(((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *)(<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#p17">NLAIAGENT::CAgentScript::IdAgentScript</a>.getFactory()->getClass()))); +00101 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> = NULL; +00102 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = -1; +00103 } +00104 +<a name="l00105"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a5">00105</a> CAgentClass::~CAgentClass() +00106 { +00107 sint32 i; +00108 <font class="keywordflow">for</font>(i = 0; i < (sint32)<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size(); i++) +00109 { +00110 CComponent *c = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]; +00111 <font class="keywordflow">if</font>(c->ObjectName) c->ObjectName->release(); +00112 <font class="keywordflow">if</font>(c->RegisterName) c->RegisterName->release(); +00113 <font class="keyword">delete</font> c; +00114 } +00115 +00116 <font class="keywordflow">for</font>(i = 0; i < (sint32) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o2">_StaticComponents</a>.size(); i++ ) +00117 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o2">_StaticComponents</a>[i]->release(); +00118 +00119 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#c1">clearIndirectMsgTable</a>(); +00120 +00121 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a> != NULL) +00122 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>(); +00123 +00124 } +00125 +<a name="l00126"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#c1">00126</a> <font class="keywordtype">void</font> CAgentClass::clearIndirectMsgTable() +00127 { +00128 <font class="keywordflow">for</font> (<font class="keywordtype">int</font> i = 0; i < (int) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>.size(); i++ ) +00129 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>[i] != NULL ) +00130 <font class="keyword">delete</font>[] <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>[i]; +00131 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>.clear(); +00132 } +00133 +<a name="l00134"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#c0">00134</a> <font class="keywordtype">bool</font> CAgentClass::isMessageFunc(<font class="keyword">const</font> CParam &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>)<font class="keyword"> const </font> +00135 <font class="keyword"> </font>{ +00136 <font class="keywordflow">if</font> ( <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.size() == 1 ) +00137 { +00138 IOpType &msg_arg = *((IOpType *)<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>[0]); +00139 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &msg_type = *msg_arg.getConstraintTypeOf(); +00140 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *child_class = (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *) msg_type.<a class="code" href="classNLAIC_1_1CIdentType.html#a16">getFactory</a>()->getClass(); +00141 +00142 <font class="keywordflow">if</font> ( child_class->isClassInheritedFrom( <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>(<font class="stringliteral">"Message"</font>) ) != -1 ) +00143 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00144 } +00145 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00146 } +00147 +<a name="l00150"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z233_3">00150</a> <font class="keywordtype">void</font> CAgentClass::buildChildsMessageMap() +00151 { +00152 +00153 sint32 i,j; +00154 sint32 child_index; +00155 sint32 nb_scripted_components = 0; +00156 +00157 <font class="preprocessor">#ifdef NL_DEBUG</font> +00158 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_this_class_name = <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>()-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(); +00159 <font class="preprocessor">#endif</font> +00160 <font class="preprocessor"></font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#c1">clearIndirectMsgTable</a>(); +00161 +00163 std::vector<CComponent *> <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>; +00164 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.size() ) +00165 { +00166 <font class="keywordflow">for</font> ( i = 0; i < (int) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.size(); i++ ) +00167 { +00168 <font class="keywordflow">for</font> ( j = 0; j < (int) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[i]->_Components.size(); j++ ) +00169 { +00170 <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>.push_back( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[i]-><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[j] ); +00171 } +00172 } +00173 } +00174 +00175 +00177 <font class="keywordflow">for</font> (i =0; i < (int) <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>.size() ; i++ ) <font class="comment">// ... for each of its components ...</font> +00178 { +00179 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> c_type( <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>[ i ]->RegisterName->getString() ); +00180 <font class="keywordflow">if</font>( ((<font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CTypeOfObject.html">NLAIC::CTypeOfObject</a> &) c_type) & <a class="code" href="classNLAIC_1_1CTypeOfObject.html#s12s5">NLAIC::CTypeOfObject::tInterpret</a> ) <font class="comment">// ...if it's a scripted agent...</font> +00181 nb_scripted_components ++; +00182 } +00183 +00184 <font class="comment">// For each message processing function of the father, </font> +00185 <font class="comment">// allocates the table with by default -1, which means the child doesn't process the</font> +00186 <font class="comment">// message.</font> +00187 <font class="keywordflow">for</font> ( i = 0; i < (int) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); i++ ) +00188 { +00189 CMethodeName &method = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_1">getBrancheCode</a>( (<font class="keywordtype">int</font>) i ); +00190 <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#c0">isMessageFunc</a>( method.getParam() ) ) +00191 { +00192 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>.push_back( <font class="keyword">new</font> sint32[nb_scripted_components ] ); +00193 <font class="keywordflow">for</font> ( child_index = 0; child_index < nb_scripted_components; child_index++ ) +00194 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>[i][child_index] = -1; +00195 } +00196 <font class="keywordflow">else</font> +00197 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>.push_back( NULL ); +00198 } +00199 +00200 sint32 index_component = 0; +00201 +00202 <font class="keywordflow">for</font> (i =0; i < (int) <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>.size() ; i++ ) <font class="comment">// ... for each of its components ...</font> +00203 { +00204 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> c_type( <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>[ i ]->RegisterName->getString() ); +00205 <font class="preprocessor">#ifdef NL_DEBUG</font> +00206 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class_name = <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>[ i ]->RegisterName->getString(); +00207 <font class="preprocessor">#endif</font> +00208 <font class="preprocessor"></font> <font class="keywordflow">if</font>( ((<font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CTypeOfObject.html">NLAIC::CTypeOfObject</a> &) c_type) & <a class="code" href="classNLAIC_1_1CTypeOfObject.html#s12s5">NLAIC::CTypeOfObject::tInterpret</a> ) <font class="comment">// ...if it's a scripted agent...</font> +00209 { +00210 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *child_class = (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *) c_type.<a class="code" href="classNLAIC_1_1CIdentType.html#a16">getFactory</a>()->getClass(); +00211 <font class="preprocessor">#ifdef NL_DEBUG</font> +00212 <font class="preprocessor"></font> sint32 dbg_nb_funcs = child_class->getBrancheCodeSize(); +00213 <font class="preprocessor">#endif</font> +00214 <font class="preprocessor"></font> <font class="keywordflow">for</font> (child_index =0; child_index < child_class->getBrancheCodeSize(); child_index++ ) <font class="comment">// ... for each of its methods...</font> +00215 { +00216 CMethodeName &method = child_class->getBrancheCode( (<font class="keywordtype">int</font>) child_index ); +00217 <font class="preprocessor">#ifdef NL_DEBUG</font> +00218 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_meth_name = method.getName().getString(); +00219 <font class="preprocessor">#endif</font> +00220 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#c0">isMessageFunc</a>( method.getParam() ) ) <font class="comment">// ... if it's a message processing function...</font> +00221 { +00222 <font class="comment">// Looks if the father has a procecessing function for this message</font> +00223 sint32 father_index = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a28">findMethod</a>( method.getName(), method.getParam() ); +00224 <font class="keywordflow">if</font> ( father_index != -1 ) +00225 { +00226 <font class="comment">// The father processes this message. Puts the index for the child in the table.</font> +00227 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>[ father_index ][ index_component ] = child_index; +00228 } +00229 <font class="keywordflow">else</font> +00230 { +00231 <font class="comment">// Ajoute la méthode chez le père</font> +00232 father_index = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_0">addBrancheCode</a>( method.getName(), method.getParam() ); +00233 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[ father_index ].Method->setCode((IOpCode *)NULL); +00234 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[ father_index ].Method->setTypeOfMethode( <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandVoid.html">NLAISCRIPT::COperandVoid</a>() ); +00235 +00236 +00237 <font class="comment">// Créée le tableau</font> +00238 <font class="keywordflow">if</font> ( father_index >= (int) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>.size() ) +00239 { +00240 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>.push_back( <font class="keyword">new</font> sint32[ nb_scripted_components ] ); +00241 sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>; +00242 <font class="keywordflow">for</font> ( <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a> =0; <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a> < nb_scripted_components; <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>++) +00243 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>[ father_index ][<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>] = -1; +00244 } +00245 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>[ father_index ] [ index_component ] = child_index; +00246 } +00247 } +00248 } +00249 index_component++; +00250 } +00251 } +00252 } +00253 +<a name="l00254"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a29">00254</a> sint32 CAgentClass::getChildMessageIndex(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *msg, sint32 child_index ) +00255 { +00256 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o5">_MsgIndirectTable</a>[ msg-><a class="code" href="classNLAIAGENT_1_1IMessageBase.html#z166_1">getMethodIndex</a>() - <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>() ][child_index]; +00257 } +00258 +<a name="l00259"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a14">00259</a> <font class="keywordtype">void</font> CAgentClass::classIsMounted() +00260 { +00261 } +00262 +<a name="l00264"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a15">00264</a> sint32 CAgentClass::registerComponent(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &type_name) +00265 { +00266 <font class="comment">/*#ifdef NL_DEBUG</font> +00267 <font class="comment"> std::string dbugS;</font> +00268 <font class="comment"> type_name.getDebugString(dbugS);</font> +00269 <font class="comment"> NLAIC::Out("registerComponent<%s>\n", dbugS.c_str());</font> +00270 <font class="comment">#endif*/</font> +00271 CComponent *c = <font class="keyword">new</font> CComponent(); +00272 c->RegisterName = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *)type_name.<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00273 c->ObjectName = NULL; +00274 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.push_back(c); +00275 +00276 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size() - 1; +00277 } +00278 +<a name="l00280"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a16">00280</a> sint32 CAgentClass::registerComponent(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &type_name, <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> &field_name) +00281 { +00282 CComponent *c = <font class="keyword">new</font> CComponent(); +00283 c->RegisterName = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *)type_name.<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00284 c->ObjectName = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *)field_name.<a class="code" href="classNLAIAGENT_1_1CStringVarName.html#a12">clone</a>(); +00285 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.push_back(c); +00286 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size() - 1; +00287 } +00288 +00289 +<a name="l00290"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a19">00290</a> sint32 CAgentClass::getComponentIndex(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name)<font class="keyword"> const</font> +00291 <font class="keyword"> </font>{ +00292 <font class="keywordflow">for</font>(sint32 i = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size() - 1; i >= 0; i --) +00293 { +00294 +00295 <font class="preprocessor">#ifdef NL_DEBUG</font> +00296 <font class="preprocessor"></font> std::string buffer; +00297 name.<a class="code" href="classNLAIC_1_1IBasicType.html#a5">getDebugString</a>( buffer ); +00298 std::string buffer2; +00299 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]->ObjectName->getDebugString( buffer2 ); +00300 <font class="preprocessor">#endif</font> +00301 <font class="preprocessor"></font> <font class="keywordflow">if</font> (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]->ObjectName !=NULL && (*<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]->ObjectName) == name) +00302 <font class="keywordflow">return</font> i; +00303 } +00304 <font class="keywordflow">return</font> -1; +00305 } +00306 +<a name="l00307"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a18">00307</a> CComponent *CAgentClass::getComponent(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name)<font class="keyword"> const</font> +00308 <font class="keyword"> </font>{ +00309 <font class="keywordflow">for</font>(sint32 i = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size() - 1; i >= 0; i --) +00310 { +00311 <font class="keywordflow">if</font> (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]->ObjectName !=NULL && *<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]->ObjectName == name) +00312 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]; +00313 } +00314 <font class="keywordflow">return</font> NULL; +00315 } +00316 +00317 +<a name="l00318"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a20">00318</a> sint32 CAgentClass::getStaticMemberIndex(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name)<font class="keyword"> const</font> +00319 <font class="keyword"> </font>{ +00320 sint32 n = 0; +00321 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#b0">IClassInterpret</a> *classType = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_3">getBaseClass</a>(); +00322 <font class="keywordflow">while</font>(classType != NULL) +00323 { +00324 n += classType->getStaticMemberSize(); +00325 classType = classType->getBaseClass(); +00326 } +00327 classType = <font class="keyword">this</font>; +00328 <font class="keywordflow">while</font>(classType != NULL) +00329 { +00330 <font class="keywordflow">for</font>(sint32 i = classType->getStaticMemberSize() - 1; i >= 0; i --) +00331 { +00332 <font class="keywordflow">if</font> (classType->getComponent(i)->ObjectName != NULL && *classType->getComponent(i)->ObjectName == name) +00333 { +00334 <font class="keywordflow">return</font> i + n; +00335 } +00336 } +00337 classType = classType->getBaseClass(); +00338 <font class="keywordflow">if</font>(classType != NULL) n -= classType->getStaticMemberSize(); +00339 } +00340 +00341 <font class="keywordflow">return</font> -1; +00342 } +00343 +<a name="l00344"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a23">00344</a> sint32 CAgentClass::getInheritedStaticMemberIndex(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name)<font class="keyword"> const</font> +00345 <font class="keyword"> </font>{ +00346 +00347 <font class="preprocessor">#ifdef NL_DEBUG</font> +00348 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_this_type = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a5">getType</a>(); +00349 std::string buffer; +00350 name.<a class="code" href="classNLAIC_1_1IBasicType.html#a5">getDebugString</a>(buffer); +00351 <font class="preprocessor">#endif</font> +00352 <font class="preprocessor"></font> +00353 +00354 sint32 nb_components = 0; +00355 std::vector<const CAgentClass *>::const_iterator it_bc = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.begin(); +00356 sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>; +00357 <font class="keywordflow">while</font> ( it_bc != <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.end() && ( ( <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> = (*it_bc)->getComponentIndex( name ) ) == -1 ) ) +00358 { +00359 nb_components += (*it_bc)->getStaticMemberSize(); +00360 it_bc++; +00361 } +00362 +00363 <font class="keywordflow">if</font> ( it_bc != <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.end() && <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> != -1) +00364 <font class="keywordflow">return</font> nb_components + <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>; +00365 <font class="keywordflow">else</font> +00366 <font class="keywordflow">return</font> -1; +00367 } +00368 +<a name="l00369"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a21">00369</a> <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *CAgentClass::getStaticMember(sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>)<font class="keyword"> const</font> +00370 <font class="keyword"> </font>{ +00371 <font class="keywordflow">try</font> +00372 { +00373 <font class="comment">/*NLAIC::CIdentType id(_Components[i]->RegisterName->getString());</font> +00374 <font class="comment"> const NLAIAGENT::IObjectIA *o = (const NLAIAGENT::IObjectIA *)id.getFactory()->getClass();</font> +00375 <font class="comment"> return o;*/</font> +00376 sint32 n = 0; +00377 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#b0">IClassInterpret</a> *classType = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_3">getBaseClass</a>(); +00378 <font class="keywordflow">while</font>(classType != NULL) +00379 { +00380 n += classType->getStaticMemberSize(); +00381 classType = classType->getBaseClass(); +00382 } +00383 classType = <font class="keyword">this</font>; +00384 <font class="keywordflow">while</font>(classType != NULL) +00385 { +00386 <font class="keywordflow">for</font>(sint32 i = classType->getStaticMemberSize() - 1; i >= 0; i --) +00387 { +00388 <font class="keywordflow">if</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> == i + n) +00389 { +00390 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>(classType->getComponent(i)->RegisterName->getString()); +00391 <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *o = (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *)id.<a class="code" href="classNLAIC_1_1CIdentType.html#a16">getFactory</a>()->getClass(); +00392 <font class="keywordflow">return</font> o; +00393 } +00394 <font class="comment">/*if (classType->getComponent(i)->ObjectName != NULL && *classType->getComponent(i)->ObjectName == name) </font> +00395 <font class="comment"> { </font> +00396 <font class="comment"> return i + n;</font> +00397 <font class="comment"> }*/</font> +00398 } +00399 classType = classType->getBaseClass(); +00400 <font class="keywordflow">if</font>(classType != NULL) n -= classType->getStaticMemberSize(); +00401 } +00402 } +00403 <font class="keywordflow">catch</font>(<a class="code" href="classNLAIE_1_1IException.html">NLAIE::IException</a> &) +00404 { +00405 <font class="comment">//throw NLAIE::CExceptionContainer(e.what());</font> +00406 } +00407 +00408 <font class="keywordflow">return</font> NULL; +00409 } +00410 +<a name="l00411"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a22">00411</a> sint32 CAgentClass::getStaticMemberSize()<font class="keyword"> const</font> +00412 <font class="keyword"> </font>{ +00413 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size(); +00414 } +00415 +<a name="l00416"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a17">00416</a> CComponent *CAgentClass::getComponent(sint32 i)<font class="keyword"> const</font> +00417 <font class="keyword"> </font>{ +00418 <font class="keywordflow">if</font> ( i < (sint32) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size() ) +00419 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[ i ]; +00420 <font class="keywordflow">else</font> +00421 <font class="keywordflow">return</font> NULL; +00422 } +00423 +<a name="l00424"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_2">00424</a> CMethodeName &CAgentClass::getBrancheCode(sint32 i)<font class="keyword"> const</font> +00425 <font class="keyword"> </font>{ +00426 <font class="preprocessor">#ifdef NL_DEBUG</font> +00427 <font class="preprocessor"></font> sint kkk = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); +00428 <font class="preprocessor">#endif</font> +00429 <font class="preprocessor"></font> CMethodeName *a = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i].Method; +00430 <font class="keywordflow">return</font> *a; +00431 } +00432 +<a name="l00433"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_4">00433</a> sint32 CAgentClass::getBrancheCodeSize()<font class="keyword"> const</font> +00434 <font class="keyword"> </font>{ +00435 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); +00436 } +00437 +<a name="l00438"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_3">00438</a> CMethodeName &CAgentClass::getBrancheCode(sint32 no_base_class, sint32 no_methode)<font class="keyword"> const</font> +00439 <font class="keyword"> </font>{ +00440 <font class="preprocessor">#ifdef NL_DEBUG</font> +00441 <font class="preprocessor"></font> <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *o = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[ no_base_class ]; +00442 <font class="preprocessor">#endif</font> +00443 <font class="preprocessor"></font> +00444 <font class="keywordflow">return</font> _VTable[ no_base_class ]->getBrancheCode( no_methode ); +00445 } +00446 +<a name="l00447"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_1">00447</a> CMethodeName &CAgentClass::getBrancheCode()<font class="keyword"> const</font> +00448 <font class="keyword"> </font>{ +00449 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> < 0) <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionUnReference.html">NLAIE::CExceptionUnReference</a>(<font class="stringliteral">"you try to access to an unrefrence index"</font>); +00450 <font class="keywordflow">return</font> *<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a>].Method; +00451 } +00452 +<a name="l00453"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_7">00453</a> sint32 CAgentClass::getMethodIndexSize()<font class="keyword"> const</font> +00454 <font class="keyword"> </font>{ +00455 <font class="keywordflow">return</font> (sint32)<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size() + <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>(); +00456 } +00457 +<a name="l00458"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_0">00458</a> sint32 CAgentClass::addBrancheCode(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name,<font class="keyword">const</font> CParam &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>) +00459 { +00460 <font class="preprocessor">#ifdef NL_DEBUG</font> +00461 <font class="preprocessor"></font> std::string txtClass; +00462 std::string txt; +00463 <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.getDebugString(txtClass); +00464 txt = name.<a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>() + txtClass; +00465 txtClass = <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>()-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(); +00466 <font class="preprocessor">#endif</font> +00467 <font class="preprocessor"></font> sint32 i = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a28">findMethod</a>(name,<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>); +00468 <font class="keywordflow">if</font>(i >= 0) +00469 { +00470 CMethodeName *oldM = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[ i ].Method; +00471 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[ i ].isBasedOnBaseClass()) +00472 { +00473 CMethodeName *m = <font class="keyword">new</font> CMethodeName(name); +00474 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[ i ].setMethodBasedOnBaseClassState(<font class="keyword">false</font>); +00475 oldM->release(); +00476 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i] = m; +00477 m->setParam( <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a> ) ; +00478 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> = i; +00479 } +00480 <font class="keywordflow">else</font> +00481 { +00482 +00483 std::string txtP; +00484 std::string txt; +00485 <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.getDebugString(txtP); +00486 txt = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"%s%s is all ready defined in '%s'"</font>,name.<a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(),txtP.c_str(),<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>()-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>()); +00487 <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionAllReadyExist.html">NLAIE::CExceptionAllReadyExist</a>((<font class="keywordtype">char</font> *)txt.c_str()); +00488 } +00489 } +00490 <font class="keywordflow">else</font> +00491 { +00492 CMethodeName *m = <font class="keyword">new</font> CMethodeName(name); +00493 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.push_back( CMethodType( m )); +00494 m->setParam( <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a> ); +00495 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a> = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size() - 1; +00496 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.back().setMethodBasedOnBaseClassState(<font class="keyword">false</font>); +00497 } +00498 +00499 <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> constructor_name(<font class="stringliteral">"Constructor"</font>); +00500 <font class="keywordflow">if</font> ( name == constructor_name ) +00501 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a>; +00502 +00503 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o6">_lastRef</a>; +00504 } +00505 +<a name="l00506"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_6">00506</a> NLAIAGENT::tQueue CAgentClass::getPrivateMember(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *className,<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *methodName,<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>)<font class="keyword"> const</font> +00507 <font class="keyword"> </font>{ +00508 NLAIAGENT::tQueue <a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>; +00509 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#b0">IClassInterpret</a> *classType = <font class="keyword">this</font>; +00510 <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a> k; +00511 +00512 <font class="keywordflow">for</font>(sint32 i = 0; i < <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_7">getMethodIndexSize</a>() - <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>(); i ++) +00513 { +00514 CMethodeName &m = classType->getBrancheCode(i); +00515 <font class="preprocessor">#ifdef NL_DEBUG</font> +00516 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_this_name = m.getName().getString(); +00517 <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_func_name = methodName-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(); +00518 <font class="preprocessor">#endif</font> +00519 <font class="preprocessor"></font> <font class="keywordflow">if</font>(m.getName() == *methodName ) +00520 { +00521 k.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m1">Weight</a> = m.getParam().eval((<font class="keyword">const</font> CParam &)param); +00522 <font class="keywordflow">if</font>(k.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m1">Weight</a> < 0.0) <font class="keywordflow">continue</font>; +00523 k.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m0">Index</a> = i + <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>(); +00524 k.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m2">Method</a> = &m; +00525 IOpType *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = (IOpType *)m.getTypeOfMethode(); +00526 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>->incRef(); +00527 +00528 <font class="keywordflow">if</font>(k.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m3">ReturnType</a> != NULL) +00529 { +00530 k.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m3">ReturnType</a>->release(); +00531 } +00532 +00533 k.<a class="code" href="structNLAIAGENT_1_1CIdMethod.html#m3">ReturnType</a> = <font class="keyword">new</font> CObjectUnknown(<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>); +00534 <a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>.push(k); +00535 } +00536 } +00537 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>; +00538 } +00539 +<a name="l00540"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_5">00540</a> NLAIAGENT::tQueue CAgentClass::isMember(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *className,<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *methodName,<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>)<font class="keyword"> const</font> +00541 <font class="keyword"> </font>{ +00542 +00543 <font class="preprocessor">#ifdef NL_DEBUG</font> +00544 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( className != NULL ) +00545 <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class_name = className-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(); +00546 <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_method_name = methodName-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(); +00547 <font class="preprocessor">#endif</font> +00548 <font class="preprocessor"></font> +00549 NLAIAGENT::tQueue <a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>; +00550 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#b0">IClassInterpret</a> *classType = <font class="keyword">this</font>; +00551 <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a> k; +00552 +00553 <font class="keywordflow">if</font>( className != NULL ) +00554 { +00555 classType = NULL; +00556 <font class="keywordflow">for</font>(sint32 i = 1; i < (sint32)<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.size(); i ++) +00557 { +00558 <font class="keywordflow">if</font>(*<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[i]->getClassName() == *className) +00559 { +00560 classType = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[i]; +00561 } +00562 } +00563 } +00564 +00565 <font class="keywordflow">if</font>( classType != NULL ) +00566 { +00567 <a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>= <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_6">getPrivateMember</a>(className,methodName,param); +00568 } +00569 +00570 <font class="keywordflow">if</font>( !<a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>.size() ) +00571 { +00572 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a4">getBaseObjectInstance</a>()-><a class="code" href="classNLAIAGENT_1_1IObjectIA.html#a12">isMember</a>(className,methodName,param); +00573 } +00574 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>; +00575 } +00576 +<a name="l00577"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a28">00577</a> sint32 CAgentClass::findMethod(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name,<font class="keyword">const</font> CParam &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>)<font class="keyword"> const</font> +00578 <font class="keyword"> </font>{ +00579 <font class="keywordflow">for</font>(sint32 i = 0 ; i < (sint32)<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); i ++) +00580 { +00581 <font class="preprocessor">#ifdef NL_DEBUG</font> +00582 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_method_name = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i].Method->getName().getString(); +00583 <font class="preprocessor">#endif²</font> +00584 <font class="preprocessor"></font> CMethodeName *m = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i].Method; +00585 <font class="keyword">const</font> CParam &p = (<font class="keyword">const</font> CParam &)m->getParam(); +00586 <font class="keywordflow">if</font>( m->getName() == name && p == <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a> ) +00587 <font class="keywordflow">return</font> i; +00588 } +00589 <font class="keywordflow">return</font> -1; +00590 } +00591 +<a name="l00592"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a25">00592</a> <font class="keywordtype">void</font> CAgentClass::createBaseClassComponents( <a class="code" href="classstd_1_1list.html">std::list<NLAIAGENT::IObjectIA *></a> &comps)<font class="keyword"> const</font> +00593 <font class="keyword"> </font>{ +00594 <font class="preprocessor">#ifdef NL_DEBUG</font> +00595 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *txt = NULL; +00596 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a25">getName</a>() != NULL) txt = <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a25">getName</a>()-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(); +00597 <font class="preprocessor">#endif </font> +00598 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( _Inheritance ) +00599 { +00600 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *base_class = (<font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_3">getBaseClass</a>(); +00601 base_class->createBaseClassComponents( comps ); +00602 } +00603 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a24">createComponents</a>( comps ); +00604 <font class="preprocessor">#ifdef NL_DEBUG</font> +00605 <font class="preprocessor"></font> sint32 i = (sint32)comps.size(); +00606 <font class="preprocessor">#endif </font> +00607 <font class="preprocessor"></font> } +00608 +<a name="l00609"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a24">00609</a> <font class="keywordtype">void</font> CAgentClass::createComponents( <a class="code" href="classstd_1_1list.html">std::list<NLAIAGENT::IObjectIA *></a> &comps)<font class="keyword"> const</font> +00610 <font class="keyword"> </font>{ +00611 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *obj; +00612 <font class="keywordflow">for</font> (sint32 i = 0; i < (sint32) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size(); i++) +00613 { +00614 CComponent *comp = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]; +00615 <font class="keywordflow">if</font> ( !comp->Static ) +00616 { +00617 <font class="comment">//sint32 class_index = NLAIC::getRegistry()->getNumIdent( comp->RegisterName->getString() );</font> +00618 <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>(comp->RegisterName->getString()); +00619 sint class_index = id.<a class="code" href="classNLAIC_1_1CIdentType.html#a14">getIndex</a>(); +00620 obj = (<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *) <a class="code" href="namespaceNLAIC.html#a14">NLAIC::getRegistry</a>()->createInstance( class_index ); +00621 } +00622 <font class="keywordflow">else</font> +00623 { +00624 <font class="preprocessor">#ifdef NL_DEBUG</font> +00625 <font class="preprocessor"></font> std::string comp_name; +00626 comp->RegisterName->getDebugString( comp_name ); +00627 +00628 std::string comp_type; +00629 comp->ObjectName->getDebugString( comp_type ); +00630 +00631 std::string buf; +00632 comp->StaticValue->getDebugString(buf); +00633 <font class="preprocessor">#endif</font> +00634 <font class="preprocessor"></font> obj = comp->StaticValue; +00635 comp->StaticValue-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>(); +00636 } +00637 comps.push_back( obj ); +00638 } +00639 } +00640 +<a name="l00641"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z233_0">00641</a> <font class="keywordtype">void</font> CAgentClass::buildVTable() +00642 { +00643 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.clear(); +00644 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_5">getClassPath</a>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>); +00645 +00646 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z233_1">buildVMethode</a>(); +00647 } +00648 +<a name="l00649"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z233_1">00649</a> <font class="keywordtype">void</font> CAgentClass::buildVMethode() +00650 { +00651 <font class="preprocessor">#ifdef NL_DEBUG</font> +00652 <font class="preprocessor"></font> <font class="keywordtype">char</font> txtClass[2048*8]; +00653 strcpy(txtClass,<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>()->getString()); +00654 <font class="preprocessor">#endif </font> +00655 <font class="preprocessor"></font> <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z233_2">sizeVTable</a>() > 1 ) +00656 { +00657 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#b0">IClassInterpret</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>= <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z233_2">sizeVTable</a>() - 2]; +00658 +00659 <font class="keywordflow">if</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>->getMethodIndexSize() > <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>()) +00660 { +00661 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.resize(<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>->getMethodIndexSize() - <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>()); +00662 +00663 <font class="keywordtype">int</font> mmax = <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>->getMethodIndexSize() - <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>(); +00664 <font class="keywordflow">for</font>(sint32 i = 0; i < mmax; i ++) +00665 { +00666 CMethodeName *m = &<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>->getBrancheCode(i); +00667 <font class="preprocessor">#ifdef NL_DEBUG</font> +00668 <font class="preprocessor"></font> std::string txt; +00669 m->getDebugString(txt); +00670 <font class="preprocessor">#endif</font> +00671 <font class="preprocessor"></font> m->incRef(); +00672 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i] = m; +00673 } +00674 } +00675 } +00676 } +00677 +<a name="l00678"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_0">00678</a> sint32 CAgentClass::isClassInheritedFrom(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &className)<font class="keyword"> const</font> +00679 <font class="keyword"> </font>{ +00680 <font class="keywordflow">for</font>(sint32 i = 0; i < (sint32)<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.size(); i ++) +00681 { +00682 <font class="preprocessor">#ifdef NL_DEBUG</font> +00683 <font class="preprocessor"></font> <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *o = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[i]; +00684 <font class="preprocessor">#endif</font> +00685 <font class="preprocessor"></font> <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *thisName = _VTable[i]-><a class="code" href="classNLAIC_1_1IPointerGestion.html#z193_0">getClassName</a>(); +00686 <font class="keywordflow">if</font>(thisName == NULL) +00687 { +00688 <font class="comment">//thisName = </font> +00689 <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> = &_VTable[i]-><a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>(); +00690 <font class="keywordflow">if</font>(id == NULL) +00691 { +00692 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>() != NULL) +00693 { +00694 <font class="keywordflow">if</font>(*<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>() == className) <font class="keywordflow">return</font> i; +00695 <font class="keywordflow">else</font> <font class="keywordflow">return</font> -1; +00696 } +00697 <font class="keywordflow">else</font> <font class="keywordflow">return</font> -1; +00698 } +00699 <font class="keywordflow">else</font> +00700 <font class="keywordflow">if</font>(strcmp((<font class="keyword">const</font> <font class="keywordtype">char</font> *)*id , className.<a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>()) == 0) +00701 { +00702 <font class="keywordflow">return</font> i; +00703 } +00704 } +00705 <font class="keywordflow">else</font> +00706 { +00707 <font class="keywordflow">if</font>(*(_VTable[i]-><a class="code" href="classNLAIC_1_1IPointerGestion.html#z193_0">getClassName</a>()) == className) +00708 { +00709 <font class="keywordflow">return</font> i; +00710 } +00711 } +00712 } +00713 <font class="keywordflow">return</font> -1; +00714 } +00715 +<a name="l00716"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a27">00716</a> <font class="keyword">const</font> IClassInterpret *CAgentClass::getInheritance(sint32 n)<font class="keyword"> const</font> +00717 <font class="keyword"> </font>{ +00718 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>[n]; +00719 } +00720 +<a name="l00721"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z233_2">00721</a> sint32 CAgentClass::sizeVTable()<font class="keyword"> const</font> +00722 <font class="keyword"> </font>{ +00723 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.size(); +00724 } +00725 +<a name="l00726"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a6">00726</a> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *CAgentClass::buildNewInstance()<font class="keyword"> const</font> +00727 <font class="keyword"> </font>{ +00728 <font class="comment">// Création des composants statiques</font> +00729 <a class="code" href="classstd_1_1list.html">std::list<NLAIAGENT::IObjectIA *></a> <a class="code" href="driver__opengl__extension__def_8h.html#a413">components</a>; +00730 +00731 <font class="comment">// Composants des classes de base</font> +00732 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a25">createBaseClassComponents</a>( components ); +00733 +00734 <font class="comment">// Création de l'agent</font> +00735 <a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a> *instance = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CAgentScript.html">NLAIAGENT::CAgentScript</a>(NULL, NULL, components, (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *) <font class="keyword">this</font> ); +00736 +00737 +00738 <font class="comment">// TODO: add constructor call here!!!!!</font> +00739 +00740 <font class="keywordflow">return</font> instance; +00741 } +00742 +<a name="l00743"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a7">00743</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CAgentClass::clone()<font class="keyword"> const</font> +00744 <font class="keyword"> </font>{ +00745 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a> = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a4">CAgentClass</a>(*<font class="keyword">this</font>); +00746 <font class="keywordflow">return</font> x; +00747 } +00748 +<a name="l00749"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a8">00749</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CAgentClass::newInstance()<font class="keyword"> const</font> +00750 <font class="keyword"> </font>{ +00751 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a> = <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a4">CAgentClass</a>(); +00752 <font class="keywordflow">return</font> x; +00753 } +00754 +<a name="l00755"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a9">00755</a> <font class="keywordtype">void</font> CAgentClass::getDebugString(std::string &<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>)<font class="keyword"> const</font> +00756 <font class="keyword"> </font>{ +00757 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"<CAgentClass> %s\n"</font>, <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>()->getString() ); +00758 } +00759 +<a name="l00760"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a10">00760</a> <font class="keywordtype">void</font> CAgentClass::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &os) +00761 { +00762 <font class="comment">// Saves static components</font> +00763 sint32 size = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size(); +00764 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( size ); +00765 sint32 i; +00766 <font class="keywordflow">for</font> ( i = 0; i < (sint32) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.size() ; i++ ) +00767 { +00768 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>[i]->save( os ); +00769 } +00770 +00771 <font class="comment">// Saves class methods</font> +00772 size = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); +00773 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( size ); +00774 <font class="keywordflow">for</font> ( i = 0; i < (sint32) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); i++) +00775 { +00776 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &)<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i].Method->getType() ); +00777 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i].Method->save( os ); +00778 } +00779 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIC_1_1IBasicType.html#a2">getType</a>() ); +00780 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIC_1_1IBasicInterface.html#a4">save</a>( os ); +00781 } +00782 +<a name="l00783"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a11">00783</a> <font class="keywordtype">void</font> CAgentClass::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is) +00784 { +00785 <font class="comment">// Saves static components</font> +00786 sint32 _NbComponents; +00787 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( _NbComponents ); +00788 sint32 i; +00789 <font class="keywordflow">for</font> ( i = 0; i < (sint32) _NbComponents ; i++ ) +00790 { +00791 <a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>; +00792 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( id ); +00793 CComponent *comp = (CComponent *)id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>(); +00794 comp->load(is); +00795 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o0">_Components</a>.push_back( comp ); +00796 } +00797 +00798 <font class="keywordflow">for</font> ( i = 0; i < (sint32) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.size(); i++) +00799 { +00800 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>[i].Method->release(); +00801 } +00802 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.clear(); +00803 +00804 <font class="comment">// Loads class methods</font> +00805 sint32 nb_methods; +00806 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( nb_methods ); +00807 <font class="keywordflow">for</font> ( i = 0; i < (sint32) nb_methods; i++) +00808 { +00809 <a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>; +00810 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( id ); +00811 CMethodeName *methode = (CMethodeName *)id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>(); +00812 methode->load(is); +00813 methode->incRef(); +00814 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o3">_Methode</a>.push_back( CMethodType(methode)); +00815 } +00816 +00817 <a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>; +00818 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( id ); +00819 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a> = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *) id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>(); +00820 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIC_1_1IBasicInterface.html#a5">load</a>( is ); +00821 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>(); +00822 } +00823 +00824 +<a name="l00825"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a13">00825</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CAgentClass::isEqual</a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IBasicObjectIA.html">NLAIAGENT::IBasicObjectIA</a> &a)<font class="keyword"> const</font> +00826 <font class="keyword"> </font>{ +00827 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> &i = (<font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> &)a; +00828 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a17">getClassName</a>() == i.<a class="code" href="classNLAIC_1_1IPointerGestion.html#z193_0">getClassName</a>(); +00829 } +00830 +<a name="l00831"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_1">00831</a> <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *CAgentClass::getInheritanceName()<font class="keyword"> const</font> +00832 <font class="keyword"> </font>{ +00833 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>; +00834 } +00835 +<a name="l00836"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_2">00836</a> <font class="keywordtype">void</font> CAgentClass::setInheritanceName(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> &name) +00837 { +00838 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a> != NULL) +00839 { +00840 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>(); +00841 } +00842 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a> = (<a class="code" href="classNLAIAGENT_1_1IVarName.html">NLAIAGENT::IVarName</a> *)name.<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00843 +00844 } +00845 +<a name="l00846"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_7">00846</a> <font class="keyword">const</font> IClassInterpret *CAgentClass::getComputeBaseClass() +00847 { +00848 <font class="keywordflow">if</font> ( _Inheritance ) +00849 { +00850 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> == NULL) +00851 { +00852 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> = (<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#b0">IClassInterpret</a> *)( (CClassInterpretFactory *) <a class="code" href="namespaceNLAIC.html#a14">NLAIC::getRegistry</a>()->getFactory( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>() ) )->getClass(); +00853 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a>; +00854 } +00855 <font class="keywordflow">else</font> +00856 { +00857 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a>; +00858 } +00859 } +00860 <font class="keywordflow">else</font> +00861 { +00862 <font class="keywordflow">return</font> NULL; +00863 } +00864 } +00865 +<a name="l00866"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_3">00866</a> <font class="keyword">const</font> IClassInterpret *CAgentClass::getBaseClass()<font class="keyword"> const</font> +00867 <font class="keyword"> </font>{ +00868 <font class="keywordflow">if</font> ( _Inheritance ) +00869 { +00870 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a> == NULL) +00871 { +00872 <font class="keywordflow">return</font> (<font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#b0">IClassInterpret</a> *)( (CClassInterpretFactory *) <a class="code" href="namespaceNLAIC.html#a14">NLAIC::getRegistry</a>()->getFactory( <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o10">_Inheritance</a>-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>() ) )->getClass(); +00873 } +00874 <font class="keywordflow">else</font> +00875 { +00876 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o8">_Base_class</a>; +00877 } +00878 } +00879 <font class="keywordflow">else</font> +00880 <font class="keywordflow">return</font> NULL; +00881 } +00882 +00883 <font class="comment">// Returns the highest class in the class hiérarchy (SuperClass)</font> +<a name="l00884"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_4">00884</a> <font class="keyword">const</font> CAgentClass *CAgentClass::getSuperClass()<font class="keyword"> const</font> +00885 <font class="keyword"> </font>{ +00886 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *base_class = <font class="keyword">this</font>; +00887 +00888 <font class="keywordflow">while</font> ( base_class->getBaseClass() ) +00889 { +00890 base_class = (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *) base_class->getBaseClass(); +00891 } +00892 <font class="keywordflow">return</font> base_class; +00893 } +00894 +<a name="l00896"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_5">00896</a> <font class="keyword">const</font> <font class="keywordtype">void</font> CAgentClass::getClassPath(std::vector<const CAgentClass *> &path)<font class="keyword"> const</font> +00897 <font class="keyword"> </font>{ +00898 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *base_class = (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *) <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_3">getBaseClass</a>(); +00899 <font class="preprocessor">#ifdef NL_DEBUG</font> +00900 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *txt = NULL; +00901 <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a25">getName</a>() != NULL) txt = <a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a25">getName</a>()-><a class="code" href="classNLAIAGENT_1_1IVarName.html#a1">getString</a>(); +00902 <font class="keywordflow">else</font> <font class="keywordflow">if</font>(<a class="code" href="classNLAISCRIPT_1_1IClassInterpret.html#a25">getName</a>() != NULL) txt = base_class->getName()->getString(); +00903 <font class="preprocessor">#endif </font> +00904 <font class="preprocessor"></font> <font class="keywordflow">if</font> ( base_class <font class="comment">/*&& !(base_class->getType() == IdAgentClass)*/</font>) +00905 { +00906 base_class->getClassPath( path ); +00907 } +00908 path.push_back( <font class="keyword">this</font> ); +00909 } +00910 +<a name="l00912"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z234_6">00912</a> sint32 CAgentClass::getNbBaseClass()<font class="keyword"> const</font> +00913 <font class="keyword"> </font>{ +00914 sint32 dist = 0; +00915 <font class="keyword">const</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *base_class = <font class="keyword">this</font>; +00916 <font class="keywordflow">while</font> ( base_class->getBaseClass() ) +00917 { +00918 base_class = (<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a0">CAgentClass</a> *) base_class->getBaseClass(); +00919 dist++; +00920 } +00921 <font class="keywordflow">return</font> dist; +00922 } +00923 +<a name="l00924"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a26">00924</a> <font class="keyword">const</font> <font class="keywordtype">char</font> *CAgentClass::getComponentName(sint32 i)<font class="keyword"> const</font> +00925 <font class="keyword"> </font>{ +00926 sint32 nb_components = 0; +00927 std::vector<const CAgentClass *>::const_iterator it_bc = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.begin(); +00928 <font class="keywordflow">while</font> ( it_bc != <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.end() && nb_components <= i ) +00929 { +00930 nb_components = nb_components + (*it_bc)->getStaticMemberSize(); +00931 it_bc++; +00932 } +00933 it_bc--; +00934 CComponent *component = (*it_bc)->getComponent( i - ( nb_components - (*it_bc)->getStaticMemberSize() ) ); +00935 <font class="keywordflow">return</font> component->ObjectName->getString(); +00936 } +00937 +<a name="l00938"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_8">00938</a> sint32 CAgentClass::getRunMethod()<font class="keyword"> const</font> +00939 <font class="keyword"> </font>{ +00940 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o7">_RunIndex</a>; +00941 } +00942 +<a name="l00943"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_9">00943</a> <font class="keywordtype">void</font> CAgentClass::setRunMethod(sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>) +00944 { +00945 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o7">_RunIndex</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> + <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>(); +00946 } +00947 +<a name="l00948"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_10">00948</a> sint32 CAgentClass::getConstroctorMethod()<font class="keyword"> const</font> +00949 <font class="keyword"> </font>{ +00950 <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a>; +00951 } +00952 +<a name="l00953"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_11">00953</a> <font class="keywordtype">void</font> CAgentClass::setConstroctorMethod(sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>) +00954 { +00955 <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o9">_ConstructorIndex</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> + <a class="code" href="classNLAISCRIPT_1_1IAgentMultiClass.html#a2">getBaseMethodCount</a>(); +00956 } +00957 +<a name="l00958"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a30">00958</a> <font class="keywordtype">void</font> CAgentClass::initStatics() +00959 { +00960 <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> staticinit_func_name(<font class="stringliteral">"StaticInit"</font>); +00961 sint32 id_func = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a28">findMethod</a>( staticinit_func_name, <a class="code" href="classNLAISCRIPT_1_1CParam.html">NLAISCRIPT::CParam</a>() ); +00962 <font class="keywordflow">if</font> ( id_func != -1 ) +00963 { +00964 <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html">NLAISCRIPT::CStackPointer</a> stack; +00965 <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html">NLAISCRIPT::CStackPointer</a> heap; +00966 <a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">NLAISCRIPT::CCodeContext</a> codeContext(stack,heap,NULL,<font class="keyword">this</font>, <a class="code" href="classNLAISCRIPT_1_1CCallPrint.html#p1">NLAISCRIPT::CCallPrint::inputOutput</a>); +00967 codeContext.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m3">Self</a> = <font class="keyword">this</font>; +00968 <a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *o = (<a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html">NLAISCRIPT::CCodeBrancheRun</a> *)<a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#z232_1">getBrancheCode</a>( id_func ).getCode(); +00969 codeContext.<a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">Code</a> = o; +00970 o-><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#z209_0">run</a>(codeContext); +00971 } +00972 } +00973 +<a name="l00974"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a31">00974</a> <font class="keywordtype">bool</font> CAgentClass::setStaticMember(sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *obj) +00975 { +00976 <font class="preprocessor">#ifdef NL_DEBUG</font> +00977 <font class="preprocessor"></font> std::string buf; +00978 obj-><a class="code" href="classNLAIC_1_1IBasicType.html#a5">getDebugString</a>(buf); +00979 <font class="preprocessor">#endif</font> +00980 <font class="preprocessor"></font> sint32 nb_components = 0; +00981 std::vector<const CAgentClass *>::const_iterator it_bc = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.begin(); +00982 <font class="keywordflow">while</font> ( it_bc != <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.end() && nb_components <= <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> ) +00983 { +00984 nb_components = nb_components + (*it_bc)->getStaticMemberSize(); +00985 it_bc++; +00986 } +00987 it_bc--; +00988 CComponent *component = (*it_bc)->getComponent( <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> - ( nb_components - (*it_bc)->getStaticMemberSize() ) ); +00989 <font class="preprocessor">#ifdef NL_DEBUG</font> +00990 <font class="preprocessor"></font> std::string buf2, buf3; +00991 component->RegisterName->getDebugString(buf2); +00992 component->ObjectName->getDebugString(buf3); +00993 <font class="preprocessor">#endif</font> +00994 <font class="preprocessor"></font> +00995 <font class="keywordflow">if</font>(component->StaticValue != obj ) component->StaticValue = obj; +00996 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00997 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00998 } +00999 +<a name="l01000"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a32">01000</a> <font class="keywordtype">void</font> CAgentClass::updateStaticMember(sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *obj) +01001 { +01002 <font class="preprocessor">#ifdef NL_DEBUG</font> +01003 <font class="preprocessor"></font> std::string buf; +01004 obj-><a class="code" href="classNLAIC_1_1IBasicType.html#a5">getDebugString</a>(buf); +01005 <font class="preprocessor">#endif</font> +01006 <font class="preprocessor"></font> sint32 nb_components = 0; +01007 std::vector<const CAgentClass *>::const_iterator it_bc = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.begin(); +01008 <font class="keywordflow">while</font> ( it_bc != <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#o4">_VTable</a>.end() && nb_components <= <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> ) +01009 { +01010 nb_components = nb_components + (*it_bc)->getStaticMemberSize(); +01011 it_bc++; +01012 } +01013 it_bc--; +01014 CComponent *component = (*it_bc)->getComponent( <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> - ( nb_components - (*it_bc)->getStaticMemberSize() ) ); +01015 <font class="preprocessor">#ifdef NL_DEBUG</font> +01016 <font class="preprocessor"></font> std::string buf2, buf3; +01017 component->RegisterName->getDebugString(buf2); +01018 component->ObjectName->getDebugString(buf3); +01019 <font class="preprocessor">#endif</font> +01020 <font class="preprocessor"></font> +01021 (*component->StaticValue) = *obj; +01022 } +01023 +<a name="l01024"></a><a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a33">01024</a> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *CAgentClass::getStaticComponentValue(std::string &c_name) +01025 { +01026 CComponent *component = <a class="code" href="classNLAISCRIPT_1_1CAgentClass.html#a17">getComponent</a>( <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a>( c_name.c_str() ) ); +01027 <font class="keywordflow">return</font> component->StaticValue; +01028 } +01029 } +</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> |