aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/goal__stack_8cpp-source.html
blob: e4cb859e74e356b73386731a9d2ff9519173b01d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
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="/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="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=140 BGCOLOR=#dddddd><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
        <TD><IMG  width=6 height=14  SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
 </TR>
</TABLE> 

<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 WIDTH=100%>
 <TR><TD  BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG  SRC="/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="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
	<TD WIDTH=140   BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG  SRC="/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="/news/" TITLE="Rubrique news"><img width=13 height=15  hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a  class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11  hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a  class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16  hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a  class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17  hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a  class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16  hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a  class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img  width=18 height=12   hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a  class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
		</TABLE>
		</TD></TR></TABLE></TD></TR></TABLE>
		<!------ End Box  ------>

	</TD>
	<TD WIDTH=15><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
	<TD ALIGN=left valign=top><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

<!-- title -->
<TABLE  background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG  SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
&nbsp;

<!-- 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="/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> &nbsp; </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 &amp;g)
00013         {
00014                 <font class="keywordtype">int</font> i;
00015                 <font class="keywordflow">for</font>( i = 0; i &lt; (int) g._Goals.size(); i++ )
00016                 {
00017                         <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o0">_Goals</a>.push_back( (CGoal *) g._Goals[i]-&gt;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() &gt; 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 &lt; (sint32) _Goals.size(); i++ )</font>
00039 <font class="comment">                {</font>
00040 <font class="comment">                        std::string tmp;</font>
00041 <font class="comment">                         _Goals[i]-&gt;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&lt;CGoal *&gt;::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)-&gt;priority() &gt; 0 )
00052                         {               
00053                                 <font class="keywordflow">if</font> ( (*it_g)-&gt;isExclusive() )
00054                                 {
00055                                         <font class="keywordflow">if</font> ( i &lt; <a class="code" href="classNLAILOGIC_1_1CGoalStack.html#o1">_MaxGoals</a> )            <font class="comment">// Exclusive operators</font>
00056                                         {
00057                                                 (*it_g)-&gt;select();
00058                                                 i++;
00059                                         }
00060                                         <font class="keywordflow">else</font>
00061                                                 (*it_g)-&gt;unSelect();
00062                                 }
00063                                 <font class="keywordflow">else</font>
00064                                         (*it_g)-&gt;select();                      <font class="comment">// Background operators</font>
00065                         }
00066                         <font class="keywordflow">else</font>
00067                                 (*it_g)-&gt;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&lt;CGoal *&gt;::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)-&gt;cancel();
00085                         (*it_g)-&gt;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&lt;CGoal *&gt;::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)-&gt;cancel();
00099                                 <font class="comment">//Samos</font>
00100                                 (*it_g)-&gt;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 &amp;<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 &lt; (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]-&gt;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]-&gt;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]-&gt;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> &amp;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> &amp;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> &amp;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> &amp;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 &amp;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> &amp;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&lt;CGoal *&gt; &amp;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> &amp;<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-&gt;<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-&gt;<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z122_11">getFront</a>();
00244                                         param-&gt;<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-&gt;<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-&gt;<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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
</TD>
<TD WIDTH=15><IMG  SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>