diff options
Diffstat (limited to 'docs/doxygen/nel/goal__stack_8cpp-source.html')
-rw-r--r-- | docs/doxygen/nel/goal__stack_8cpp-source.html | 334 |
1 files changed, 334 insertions, 0 deletions
diff --git a/docs/doxygen/nel/goal__stack_8cpp-source.html b/docs/doxygen/nel/goal__stack_8cpp-source.html new file mode 100644 index 00000000..801436ce --- /dev/null +++ b/docs/doxygen/nel/goal__stack_8cpp-source.html @@ -0,0 +1,334 @@ +<!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>goal_stack.cpp</h1><a href="goal__stack_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="preprocessor">#include "<a class="code" href="agent_2goal__stack_8h.html">nel/ai/agent/goal_stack.h</a>"</font> +00002 <font class="preprocessor">#include "<a class="code" href="object__type_8h.html">nel/ai/agent/object_type.h</a>"</font> +00003 <font class="preprocessor">#include "<a class="code" href="agent__digital_8h.html">nel/ai/agent/agent_digital.h</a>"</font> +00004 +00005 <font class="keyword">namespace </font>NLAILOGIC +00006 { +<a name="l00007"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a1">00007</a> CGoalStack::CGoalStack() +00008 { +00009 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o1">_MaxGoals</a> = 1; +00010 } +00011 +<a name="l00012"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a2">00012</a> CGoalStack::CGoalStack(<font class="keyword">const</font> CGoalStack &g) +00013 { +00014 <font class="keywordtype">int</font> i; +00015 <font class="keywordflow">for</font>( i = 0; i < (int) g._Goals.size(); i++ ) +00016 { +00017 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.push_back( (CGoal *) g._Goals[i]->clone() ); +00018 } +00019 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o1">_MaxGoals</a> = g._MaxGoals; +00020 } +00021 +<a name="l00022"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a3">00022</a> CGoalStack::~CGoalStack() +00023 { +00024 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a7">removeGoal</a>(); +00025 } +00026 +<a name="l00027"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a4">00027</a> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> CGoalStack::runActivity() +00028 { +00029 <a class="code" href="types__nl_8h.html#a8">sint32</a> i; +00030 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.size() > 1) +00031 { +00032 CGoal *old_top = <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.front(); +00033 std::sort(<a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.begin(), <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.end(), greater()); +00034 } +00035 +00036 <font class="preprocessor">#ifdef NL_DEBUG</font> +00037 <font class="preprocessor"></font> <font class="comment">/*std::string dbg_stack;</font> +00038 <font class="comment"> for ( i = 0; i < (sint32) _Goals.size(); i++ )</font> +00039 <font class="comment"> {</font> +00040 <font class="comment"> std::string tmp;</font> +00041 <font class="comment"> _Goals[i]->getDebugString( tmp );</font> +00042 <font class="comment"> dbg_stack += tmp;</font> +00043 <font class="comment"> }</font> +00044 <font class="comment"> const char *dbg_str = dbg_stack.c_str();*/</font> +00045 <font class="preprocessor">#endif</font> +00046 <font class="preprocessor"></font> +00047 i = 0; +00048 std::vector<CGoal *>::iterator it_g = <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.begin(); +00049 <font class="keywordflow">while</font> ( ( it_g != <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.end() ) ) +00050 { +00051 <font class="keywordflow">if</font> ( (*it_g)->priority() > 0 ) +00052 { +00053 <font class="keywordflow">if</font> ( (*it_g)->isExclusive() ) +00054 { +00055 <font class="keywordflow">if</font> ( i < <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o1">_MaxGoals</a> ) <font class="comment">// Exclusive operators</font> +00056 { +00057 (*it_g)->select(); +00058 i++; +00059 } +00060 <font class="keywordflow">else</font> +00061 (*it_g)->unSelect(); +00062 } +00063 <font class="keywordflow">else</font> +00064 (*it_g)->select(); <font class="comment">// Background operators</font> +00065 } +00066 <font class="keywordflow">else</font> +00067 (*it_g)->unSelect(); +00068 it_g++; +00069 } +00070 <font class="keywordflow">return</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a>(); +00071 } +00072 +00073 +<a name="l00074"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a5">00074</a> <font class="keywordtype">void</font> CGoalStack::addGoal(CGoal *g) +00075 { +00076 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.push_back( g ); +00077 } +00078 +<a name="l00079"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a7">00079</a> <font class="keywordtype">void</font> CGoalStack::removeGoal() +00080 { +00081 std::vector<CGoal *>::iterator it_g = <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.begin(); +00082 <font class="keywordflow">while</font> ( it_g != <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.end() ) +00083 { +00084 (*it_g)->cancel(); +00085 (*it_g)->release(); +00086 it_g++; +00087 } +00088 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.clear(); +00089 } +00090 +<a name="l00091"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a6">00091</a> <font class="keywordtype">void</font> CGoalStack::removeGoal(CGoal *g) +00092 { +00093 std::vector<CGoal *>::iterator it_g = <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.begin(); +00094 <font class="keywordflow">while</font> ( it_g != <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.end() ) +00095 { +00096 <font class="keywordflow">if</font> ( (**it_g) == *g ) +00097 { +00098 (*it_g)->cancel(); +00099 <font class="comment">//Samos</font> +00100 (*it_g)->release(); +00101 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.erase( it_g ); +00102 <font class="keywordflow">return</font>; +00103 } +00104 it_g++; +00105 } +00106 } +00107 +<a name="l00108"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a8">00108</a> CGoal *CGoalStack::getTopGoal() +00109 { +00110 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.size() ) +00111 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.front(); +00112 <font class="keywordflow">else</font> +00113 <font class="keywordflow">return</font> NULL; +00114 } +00115 +<a name="l00116"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a10">00116</a> CGoal *CGoalStack::operator[](<a class="code" href="types__nl_8h.html#a8">sint32</a> <a class="code" href="driver__opengl__extension__def_8h.html#a225">index</a>) +00117 { +00118 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>[<a class="code" href="driver__opengl__extension__def_8h.html#a225">index</a>]; +00119 } +00120 +<a name="l00121"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a11">00121</a> <font class="keywordtype">void</font> CGoalStack::getDebugString(std::string &<a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a>)<font class="keyword"> const</font> +00122 <font class="keyword"> </font>{ +00123 <font class="keywordflow">for</font> (<font class="keywordtype">int</font> i = 0; i < (int) <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.size(); i++ ) +00124 { +00125 <a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a> += <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>[i]->getName().getString(); +00126 std::string text; +00127 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">" %f "</font>, <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>[i]->priority() ); +00128 <a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a> += text; +00129 <font class="keywordflow">if</font> ( <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>[i]->isSelected() ) +00130 <a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a> += <font class="stringliteral">"Selected"</font>; +00131 <font class="keywordflow">else</font> +00132 <a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a> += <font class="stringliteral">"Not selected"</font>; +00133 <a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a> += <font class="charliteral">'\n'</font>; +00134 } +00135 } +00136 +<a name="l00137"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a0">00137</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &CGoalStack::getType()<font class="keyword"> const</font> +00138 <font class="keyword"> </font>{ +00139 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#p0">IdGoalStack</a>; +00140 } +00141 +<a name="l00142"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a12">00142</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CGoalStack::clone()<font class="keyword"> const</font> +00143 <font class="keyword"> </font>{ +00144 <font class="keywordflow">return</font> <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a1">CGoalStack</a>( *<font class="keyword">this</font> ); +00145 } +00146 +<a name="l00147"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a13">00147</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CGoalStack::newInstance()<font class="keyword"> const</font> +00148 <font class="keyword"> </font>{ +00149 <font class="keywordflow">return</font> <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a1">CGoalStack</a>(); +00150 } +00151 +<a name="l00152"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a14">00152</a> <font class="keywordtype">void</font> CGoalStack::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &os) +00153 { +00154 } +00155 +<a name="l00156"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a15">00156</a> <font class="keywordtype">void</font> CGoalStack::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is) +00157 { +00158 } +00159 +<a name="l00160"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a16">00160</a> <font class="keywordtype">bool</font> CGoalStack::isTrue()<font class="keyword"> const</font> +00161 <font class="keyword"> </font>{ +00162 <font class="comment">// TODO</font> +00163 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00164 } +00165 +<a name="l00166"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a17">00166</a> <font class="keywordtype">float</font> CGoalStack::truthValue()<font class="keyword"> const</font> +00167 <font class="keyword"> </font>{ +00168 <font class="comment">// TODO</font> +00169 <font class="keywordflow">return</font> 0.0; +00170 } +00171 +<a name="l00172"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a18">00172</a> <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &CGoalStack::run() +00173 { +00174 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#p0">NLAIAGENT::IObjectIA::ProcessRun</a>; +00175 } +00176 +<a name="l00177"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a19">00177</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CGoalStack::isEqual</a>(<font class="keyword">const</font> CGoal &a)<font class="keyword"> const</font> +00178 <font class="keyword"> </font>{ +00179 <font class="comment">// TODO:</font> +00180 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00181 } +00182 +<a name="l00183"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a20">00183</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CGoalStack::isEqual</a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IBasicObjectIA.html">NLAIAGENT::IBasicObjectIA</a> &a)<font class="keyword"> const</font> +00184 <font class="keyword"> </font>{ +00185 <font class="comment">// TODO:</font> +00186 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00187 } +00188 +<a name="l00189"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a9">00189</a> <font class="keyword">const</font> std::vector<CGoal *> &CGoalStack::getStack() +00190 { +00191 <font class="keywordflow">return</font> <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>; +00192 } +00193 +<a name="l00194"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a21">00194</a> <font class="keywordtype">void</font> CGoalStack::setMaxGoals(<a class="code" href="types__nl_8h.html#a8">sint32</a> max) +00195 { +00196 <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o1">_MaxGoals</a> = max; +00197 } +00198 +<a name="l00199"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a22">00199</a> NLAIAGENT::tQueue CGoalStack::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> *funcName,<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#a224">params</a>)<font class="keyword"> const</font> +00200 <font class="keyword"> </font>{ +00201 +00202 <font class="preprocessor">#ifdef NL_DEBUG </font> +00203 <font class="preprocessor"></font> std::string nameP; +00204 std::string nameM; +00205 funcName-><a class="code" href="classNLAIC_1_1IBasicType.html#a5">getDebugString</a>(nameM); +00206 params.<a class="code" href="classNLAIC_1_1IBasicType.html#a5">getDebugString</a>(nameP); +00207 +00208 <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_class_name = (<font class="keyword">const</font> <font class="keywordtype">char</font> *) <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a0">getType</a>(); +00209 <font class="preprocessor">#endif</font> +00210 <font class="preprocessor"></font> <font class="keyword">static</font> <a class="code" href="classNLAIAGENT_1_1CStringVarName.html">NLAIAGENT::CStringVarName</a> maxgoals_name(<font class="stringliteral">"setMaxGoals"</font>); +00211 NLAIAGENT::tQueue <a class="code" href="driver__opengl__extension__def_8h.html#a246">r</a>; +00212 <font class="keywordflow">if</font>(className == NULL) +00213 { +00214 <font class="keywordflow">if</font>( (*funcName) == maxgoals_name ) +00215 { +00216 <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a> *c = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CObjectType.html">NLAIAGENT::CObjectType</a>( <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>( CGoal::IdGoal ) ); +00217 <a class="code" href="driver__opengl__extension__def_8h.html#a246">r</a>.push( <a class="code" href="structNLAIAGENT_1_1CIdMethod.html">NLAIAGENT::CIdMethod</a>( 0 + IObjectIA::getMethodIndexSize(), 0.0, NULL, c) ); +00218 } +00219 } +00220 +00221 <font class="keywordflow">if</font> ( <a class="code" href="driver__opengl__extension__def_8h.html#a246">r</a>.empty() ) +00222 <font class="keywordflow">return</font> IObjectIA::isMember(className, funcName, params); +00223 <font class="keywordflow">else</font> +00224 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a246">r</a>; +00225 } +00226 +00228 +<a name="l00229"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a23">00229</a> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> CGoalStack::runMethodeMember(<a class="code" href="types__nl_8h.html#a8">sint32</a>, <a class="code" href="types__nl_8h.html#a8">sint32</a>, <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *) +00230 { +00231 <font class="keywordflow">return</font> IObjectIA::CProcessResult(); +00232 } +00233 +<a name="l00234"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a24">00234</a> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> CGoalStack::runMethodeMember(<a class="code" href="types__nl_8h.html#a8">sint32</a> <a class="code" href="driver__opengl__extension__def_8h.html#a225">index</a>, <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *p) +00235 { +00236 <a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *param = (<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)p; +00237 +00238 <font class="keywordflow">switch</font> ( <a class="code" href="driver__opengl__extension__def_8h.html#a225">index</a> - IObjectIA::getMethodIndexSize() ) +00239 { +00240 <font class="keywordflow">case</font> 0: +00241 { +00242 +00243 <a class="code" href="classNLAIAGENT_1_1DigitalType.html">NLAIAGENT::DigitalType</a> *maxgoals = (<a class="code" href="classNLAIAGENT_1_1DigitalType.html">NLAIAGENT::DigitalType</a> *) param-><a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z122_11">getFront</a>(); +00244 param-><a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z122_9">popFront</a>(); +00245 <font class="preprocessor">#ifdef NL_DEBUG</font> +00246 <font class="preprocessor"></font> std::string buf; +00247 maxgoals-><a class="code" href="classNLAIAGENT_1_1DigitalType.html#z106_3">getDebugString</a>(buf); +00248 <font class="preprocessor">#endif</font> +00249 <font class="preprocessor"></font> <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o1">_MaxGoals</a> = (sint32) maxgoals-><a class="code" href="classNLAIAGENT_1_1IDigital.html#a5">getNumber</a>(); +00250 <font class="keywordflow">return</font> IObjectIA::CProcessResult(); +00251 } +00252 <font class="keywordflow">break</font>; +00253 } +00254 <font class="keywordflow">return</font> IObjectIA::CProcessResult(); +00255 } +00256 +<a name="l00257"></a><a class="code" href="classNLAILOGIC_1_1CGoalStack.html#a25">00257</a> <a class="code" href="types__nl_8h.html#a8">sint32</a> CGoalStack::getMethodIndexSize()<font class="keyword"> const</font> +00258 <font class="keyword"> </font>{ +00259 <font class="keywordflow">return</font> IObjectIA::getMethodIndexSize() + 1; +00260 } +00261 } <font class="comment">// NLAILOGIC</font> +</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> |