aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/agent_nombre_h-source.html
blob: bc0936330290988d8d0e0d7683846a2d9892acda (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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<!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>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</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>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><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="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>
&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="http://www.nevrax.org/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.2 on Mon Mar 5 22:00:39 2001 -->
<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:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
<hr><h1>agent_nombre.h</h1><a href="agent_nombre_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.
</font>00008 <font class="comment"> *
</font>00009 <font class="comment"> * This file is part of NEVRAX NEL.
</font>00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify
</font>00011 <font class="comment"> * it under the terms of the GNU General Public License as published by
</font>00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)
</font>00013 <font class="comment"> * any later version.
</font>00014 <font class="comment">
</font>00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but
</font>00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of
</font>00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
</font>00018 <font class="comment"> * General Public License for more details.
</font>00019 <font class="comment">
</font>00020 <font class="comment"> * You should have received a copy of the GNU General Public License
</font>00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the
</font>00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
</font>00023 <font class="comment"> * MA 02111-1307, USA.
</font>00024 <font class="comment"> */</font>
00025 <font class="preprocessor">#ifndef NL_AGENT_NOMBRE_H
</font>00026 <font class="preprocessor"></font><font class="preprocessor">#define NL_AGENT_NOMBRE_H
</font>00027 <font class="preprocessor"></font>
00028 <font class="comment">//#include "nel/ai/agent/agent_object.h"</font>
00029 <font class="preprocessor">#include "<a class="code" href="boolval_h.html">nel/ai/logic/boolval.h</a>"</font>
00030 <font class="preprocessor">#include "<a class="code" href="vector_h.html">nel/misc/vector.h</a>"</font>
00031 
00032 <font class="keyword">namespace</font> NLAIAGENT
00033 {       
00034 
<a name="l00041"></a><a class="code" href="class_NLAIAGENT__INombreDefine.html">00041</a>         <font class="keyword">class </font>INombreDefine: <font class="keyword">public</font> IObjetOp
00042         {
00043 
00044         <font class="keyword">public</font>:
00045 
<a name="l00047"></a><a class="code" href="class_NLAIAGENT__INombreDefine.html#s2">00047</a>                 <font class="keyword">enum</font>  TMethodNumDef {
00048                         TConst, 
00049                         TLastM 
00050                 };
00051 
<a name="l00053"></a><a class="code" href="class_NLAIAGENT__INombreDefine__CMethodCall.html">00053</a>                 <font class="keyword">struct </font>CMethodCall
00054                 {
<a name="l00055"></a><a class="code" href="class_NLAIAGENT__INombreDefine__CMethodCall.html#a0">00055</a>                         CMethodCall(<font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">int</font> i): MethodName (name)
00056                         {                               
00057                                 Index = i;
00058                         }
<a name="l00060"></a><a class="code" href="class_NLAIAGENT__INombreDefine__CMethodCall.html#m0">00060</a>                         CStringVarName MethodName;
<a name="l00062"></a><a class="code" href="class_NLAIAGENT__INombreDefine__CMethodCall.html#m1">00062</a>                         sint32 Index;
00063                 };
00065                 <font class="keyword">static</font> CMethodCall StaticMethod[];
00066 
00067         <font class="keyword">public</font>:
<a name="l00068"></a><a class="code" href="class_NLAIAGENT__INombreDefine.html#a0">00068</a>                 INombreDefine()<font class="keyword">
</font>00069 <font class="keyword">                </font>{
00070                 }
00071 
<a name="l00072"></a><a class="code" href="class_NLAIAGENT__INombreDefine.html#a1">00072</a>                 INombreDefine(<font class="keyword">const</font> INombreDefine &amp;value):IObjetOp(value)
00073                 {
00074                 }
00075 
00077 
00078                 <font class="keyword">virtual</font> sint32 getMethodIndexSize() <font class="keyword">const</font>;
00079                 <font class="keyword">virtual</font> sint32 isClassInheritedFrom(<font class="keyword">const</font> IVarName &amp;) <font class="keyword">const</font>;
00080                 <font class="keyword">virtual</font> tQueue isMember(<font class="keyword">const</font> IVarName *,<font class="keyword">const</font> IVarName *,<font class="keyword">const</font> IObjectIA &amp;) <font class="keyword">const</font>;             
00082 
00083 
00085                 <font class="keyword">virtual</font> <font class="keywordtype">double</font> getNumber() <font class="keyword">const</font> = 0;
<a name="l00086"></a><a class="code" href="class_NLAIAGENT__INombreDefine.html#a6">00086</a>                 <font class="keyword">virtual</font> ~INombreDefine()<font class="keyword">
</font>00087 <font class="keyword">                </font>{
00088                 }
00089 
00090         };
00091 
00100         template &lt;class tNombre&gt; 
<a name="l00101"></a><a class="code" href="class_NLAIAGENT__INombre.html">00101</a>         <font class="keyword">class </font>INombre: <font class="keyword">public</font> INombreDefine
00102         {       
00103 
00104         <font class="keyword">protected</font>:
<a name="l00105"></a><a class="code" href="class_NLAIAGENT__INombre.html#n0">00105</a>                 tNombre _Value;
00106 
00107         <font class="keyword">public</font>:
<a name="l00108"></a><a class="code" href="class_NLAIAGENT__INombre.html#a0">00108</a>                 INombre(tNombre value):_Value(value)
00109                 {
00110                 }
<a name="l00111"></a><a class="code" href="class_NLAIAGENT__INombre.html#a1">00111</a>                 INombre(<font class="keyword">const</font> INombre &amp;value):INombreDefine(value),_Value((tNombre)value._Value)
00112                 {
00113                 }
<a name="l00114"></a><a class="code" href="class_NLAIAGENT__INombre.html#a2">00114</a>                 INombre()<font class="keyword">
</font>00115 <font class="keyword">                </font>{                       
00116                 }
<a name="l00117"></a><a class="code" href="class_NLAIAGENT__INombre.html#a3">00117</a>                 INombre(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;is)<font class="keyword">
</font>00118 <font class="keyword">                </font>{
00119                         load(is);
00120                 }
00121 
<a name="l00122"></a><a class="code" href="class_NLAIAGENT__INombre.html#a4">00122</a>                 <font class="keyword">virtual</font> ~INombre()<font class="keyword">
</font>00123 <font class="keyword">                </font>{
00124                 }
00125 
<a name="l00126"></a><a class="code" href="class_NLAIAGENT__INombre.html#a5">00126</a>                 <font class="keyword">virtual</font> <font class="keywordtype">double</font> getNumber()<font class="keyword"> const
</font>00127 <font class="keyword">                </font>{
00128                         <font class="keywordflow">return</font> (<font class="keywordtype">double</font>)_Value;
00129                 }
00130 
00132 
<a name="l00133"></a><a class="code" href="class_NLAIAGENT__INombre.html#a6">00133</a>                 <font class="keyword">virtual</font> CProcessResult runMethodeMember(sint32, sint32, IObjectIA *)<font class="keyword">
</font>00134 <font class="keyword">                </font>{
00135                         <font class="keywordflow">return</font> IObjectIA::CProcessResult();
00136                 }
<a name="l00137"></a><a class="code" href="class_NLAIAGENT__INombre.html#a7">00137</a>                 <font class="keyword">virtual</font> CProcessResult runMethodeMember(sint32 index,IObjectIA *p)<font class="keyword">
</font>00138 <font class="keyword">                </font>{
00139                         IBaseGroupType *param = (IBaseGroupType *)p;
00140 
00141                         <font class="keywordflow">switch</font>(index - IObjetOp::getMethodIndexSize())
00142                         {
00143                         <font class="keywordflow">case</font> INombreDefine::TConst:
00144                                 {                                       
00145                                         INombre *o = (INombre *)param-&gt;get();
00146                                         _Value = (tNombre )((INombreDefine *)param-&gt;get())-&gt;getNumber();
00147                                         <font class="keywordflow">return</font> IObjectIA::CProcessResult();             
00148                                 }
00149                         }
00150 
00151                         <font class="keywordflow">return</font> IObjectIA::CProcessResult();
00152                 }
00154 
<a name="l00155"></a><a class="code" href="class_NLAIAGENT__INombre.html#a8">00155</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> save(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;os)<font class="keyword">
</font>00156 <font class="keyword">                </font>{       
00157                         tNombre v = _Value;
00158                         <font class="comment">// TODO</font>
00159                         os.<a class="code" href="class_NLMISC__IStream.html#a3">serial</a>( v );
00160                 }
00161 
<a name="l00162"></a><a class="code" href="class_NLAIAGENT__INombre.html#a9">00162</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> load(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;is)<font class="keyword">
</font>00163 <font class="keyword">                </font>{                               
00164                         <font class="comment">// TODO</font>
00165                         is.<a class="code" href="class_NLMISC__IStream.html#a3">serial</a>( _Value );                    
00166 
00167                 }               
00168 
<a name="l00169"></a><a class="code" href="class_NLAIAGENT__INombre.html#a10">00169</a>                 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> isEqual(<font class="keyword">const</font> IBasicObjectIA &amp;a)<font class="keyword"> const
</font>00170 <font class="keyword">                </font>{                       
00171                         <font class="keywordflow">return</font> !(*(IObjectIA *)<font class="keyword">this</font> == (IObjetOp &amp;)a);
00172                 }
00173 
<a name="l00174"></a><a class="code" href="class_NLAIAGENT__INombre.html#a11">00174</a>                 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> isTrue()<font class="keyword"> const
</font>00175 <font class="keyword">                </font>{
00176                         <font class="keywordflow">return</font> _Value != (tNombre)0;
00177                 }
00178 
<a name="l00179"></a><a class="code" href="class_NLAIAGENT__INombre.html#a12">00179</a>                 tNombre getValue()<font class="keyword"> const
</font>00180 <font class="keyword">                </font>{
00181                         <font class="keywordflow">return</font> _Value;
00182                 }
<a name="l00183"></a><a class="code" href="class_NLAIAGENT__INombre.html#a13">00183</a>                 <font class="keywordtype">void</font> setValue(tNombre value)<font class="keyword"> 
</font>00184 <font class="keyword">                </font>{
00185                         _Value = value;
00186                 }               
00187 
<a name="l00188"></a><a class="code" href="class_NLAIAGENT__INombre.html#a14">00188</a>                 <font class="keyword">virtual</font> IObjectIA &amp;operator = (<font class="keyword">const</font> IObjectIA &amp;a)<font class="keyword">
</font>00189 <font class="keyword">                </font>{                       
00190                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00191                         _Value = v;
00192                         chekBorn();
00193                         <font class="keywordflow">return</font> *<font class="keyword">this</font>;
00194                 }
00195 
<a name="l00196"></a><a class="code" href="class_NLAIAGENT__INombre.html#a15">00196</a>                 <font class="keyword">virtual</font> IObjetOp &amp;operator += (<font class="keyword">const</font> IObjetOp &amp;a)<font class="keyword">
</font>00197 <font class="keyword">                </font>{
00198                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00199                         addValue(v);
00200                         <font class="keywordflow">return</font> *<font class="keyword">this</font>;
00201                 }
00202 
<a name="l00203"></a><a class="code" href="class_NLAIAGENT__INombre.html#a16">00203</a>                 <font class="keyword">virtual</font> IObjetOp &amp;operator -= (<font class="keyword">const</font> IObjetOp &amp;a)<font class="keyword">
</font>00204 <font class="keyword">                </font>{
00205                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00206                         subValue(v);
00207                         <font class="keywordflow">return</font> *<font class="keyword">this</font>;
00208                 }
00209 
<a name="l00210"></a><a class="code" href="class_NLAIAGENT__INombre.html#a17">00210</a>                 <font class="keyword">virtual</font> IObjetOp &amp;neg()<font class="keyword">
</font>00211 <font class="keyword">                </font>{
00212                         _Value = -_Value;
00213                         chekBorn();
00214                         <font class="keywordflow">return</font> *<font class="keyword">this</font>;
00215                 }
00216 
<a name="l00217"></a><a class="code" href="class_NLAIAGENT__INombre.html#a18">00217</a>                 <font class="keyword">virtual</font> IObjetOp &amp;operator *= (<font class="keyword">const</font> IObjetOp &amp;a)<font class="keyword">
</font>00218 <font class="keyword">                </font>{
00219                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00220                         mulValue(v);
00221                         <font class="keywordflow">return</font> *<font class="keyword">this</font>;
00222                 }
00223 
<a name="l00224"></a><a class="code" href="class_NLAIAGENT__INombre.html#a19">00224</a>                 <font class="keyword">virtual</font> IObjetOp &amp;operator /= (<font class="keyword">const</font> IObjetOp &amp;a)<font class="keyword">
</font>00225 <font class="keyword">                </font>{
00226                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00227                         divValue(v);
00228                         <font class="keywordflow">return</font> *<font class="keyword">this</font>;
00229                 }
00230 
<a name="l00231"></a><a class="code" href="class_NLAIAGENT__INombre.html#a20">00231</a>                 <font class="keyword">virtual</font> IObjetOp *<a class="code" href="ucstring_h.html#a6">operator + </a>(<font class="keyword">const</font> IObjetOp &amp;a)  <font class="keyword">const</font>
00232                 {
00233                         IObjetOp *o = (IObjetOp *)clone();                      
00234                         *o += a;
00235                         <font class="keywordflow">return</font> o;
00236                 }
00237 
<a name="l00238"></a><a class="code" href="class_NLAIAGENT__INombre.html#a21">00238</a>                 <font class="keyword">virtual</font> IObjetOp *operator - (<font class="keyword">const</font> IObjetOp &amp;a)  <font class="keyword">const</font>
00239                 {
00240                         IObjetOp *o = (IObjetOp *)clone();                      
00241                         *o -= a;
00242                         <font class="keywordflow">return</font> o;
00243                 }
00244 
<a name="l00245"></a><a class="code" href="class_NLAIAGENT__INombre.html#a22">00245</a>                 <font class="keyword">virtual</font> <font class="keyword">const</font> IObjetOp *operator * (<font class="keyword">const</font> IObjetOp &amp;a)  <font class="keyword">const</font>
00246                 {
00247                         IObjetOp *o = (IObjetOp *)clone();                      
00248                         *o *= a;
00249                         <font class="keywordflow">return</font> o;
00250                 }
00251 
<a name="l00252"></a><a class="code" href="class_NLAIAGENT__INombre.html#a23">00252</a>                 <font class="keyword">virtual</font> <font class="keyword">const</font> IObjetOp *operator / (<font class="keyword">const</font> IObjetOp &amp;a)  <font class="keyword">const</font>
00253                 {
00254                         IObjetOp *o = (IObjetOp *)clone();                      
00255                         *o /= a;
00256                         <font class="keywordflow">return</font> o;
00257                 }
00258 
00259 
<a name="l00260"></a><a class="code" href="class_NLAIAGENT__INombre.html#a24">00260</a>                 <font class="keyword">virtual</font> IObjetOp *operator &lt; (IObjetOp &amp;a)<font class="keyword"> const
</font>00261 <font class="keyword">                </font>{
00262                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00263                         <a class="code" href="class_NLAILOGIC__CBoolType.html">NLAILOGIC::CBoolType</a> *x = <font class="keyword">new</font> NLAILOGIC::CBoolType(_Value &lt; v);                 
00264                         <font class="keywordflow">return</font> x;
00265                 }
00266 
<a name="l00267"></a><a class="code" href="class_NLAIAGENT__INombre.html#a25">00267</a>                 <font class="keyword">virtual</font> IObjetOp *operator &gt; (IObjetOp &amp;a)<font class="keyword"> const
</font>00268 <font class="keyword">                </font>{
00269                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00270                         <a class="code" href="class_NLAILOGIC__CBoolType.html">NLAILOGIC::CBoolType</a> *x = <font class="keyword">new</font> NLAILOGIC::CBoolType(_Value &gt; v);                 
00271                         <font class="keywordflow">return</font> x;
00272                 }
00273 
<a name="l00274"></a><a class="code" href="class_NLAIAGENT__INombre.html#a26">00274</a>                 <font class="keyword">virtual</font> IObjetOp *operator &lt;= (IObjetOp &amp;a)<font class="keyword"> const
</font>00275 <font class="keyword">                </font>{
00276                         tNombre v = (tNombre)((<font class="keyword">const</font> INombre &amp;)a).getValue();
00277                         <a class="code" href="class_NLAILOGIC__CBoolType.html">NLAILOGIC::CBoolType</a> *x = <font class="keyword">new</font> NLAILOGIC::CBoolType(_Value &lt;= v);                        
00278                         <font class="keywordflow">return</font> x;
00279                 }
00280 
<a name="l00281"></a><a class="code" href="class_NLAIAGENT__INombre.html#a27">00281</a>                 <font class="keyword">virtual</font> IObjetOp *operator &gt;= (IObjetOp &amp;a)<font class="keyword"> const
</font>00282 <font class="keyword">                </font>{
00283                         tNombre v = (tNombre)((<font class="keyword">const</font> INombre &amp;)a).getValue();
00284                         <a class="code" href="class_NLAILOGIC__CBoolType.html">NLAILOGIC::CBoolType</a> *x = <font class="keyword">new</font> NLAILOGIC::CBoolType(_Value &gt;= v);                        
00285                         <font class="keywordflow">return</font> x;
00286                 }
00287 
<a name="l00288"></a><a class="code" href="class_NLAIAGENT__INombre.html#a28">00288</a>                 <font class="keyword">virtual</font> IObjetOp *operator ! ()<font class="keyword"> const
</font>00289 <font class="keyword">                </font>{                       
00290                         <a class="code" href="class_NLAILOGIC__CBoolType.html">NLAILOGIC::CBoolType</a> *x = <font class="keyword">new</font> NLAILOGIC::CBoolType(_Value == (tNombre)0);                       
00291                         <font class="keywordflow">return</font> x;
00292                 }
00293 
<a name="l00294"></a><a class="code" href="class_NLAIAGENT__INombre.html#a29">00294</a>                 <font class="keyword">virtual</font> IObjetOp *operator != (IObjetOp &amp;a)<font class="keyword"> const
</font>00295 <font class="keyword">                </font>{
00296                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00297                         <a class="code" href="class_NLAILOGIC__CBoolType.html">NLAILOGIC::CBoolType</a> *x = <font class="keyword">new</font> NLAILOGIC::CBoolType(_Value != v);
00298                         <font class="keywordflow">return</font> x;
00299                 }
00300 
<a name="l00301"></a><a class="code" href="class_NLAIAGENT__INombre.html#a30">00301</a>                 <font class="keyword">virtual</font> IObjetOp *operator == (IObjetOp &amp;a)<font class="keyword"> const
</font>00302 <font class="keyword">                </font>{
00303                         tNombre v = (tNombre)((<font class="keyword">const</font> INombreDefine &amp;)a).getNumber();
00304                         <a class="code" href="class_NLAILOGIC__CBoolType.html">NLAILOGIC::CBoolType</a> *x = <font class="keyword">new</font> NLAILOGIC::CBoolType(_Value == v);
00305                         <font class="keywordflow">return</font> x;
00306                 }
00307 
00308                 
00309         <font class="keyword">protected</font>:
00310 
<a name="l00311"></a><a class="code" href="class_NLAIAGENT__INombre.html#b0">00311</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> chekBorn()<font class="keyword"></font>{}
00312                 
<a name="l00313"></a><a class="code" href="class_NLAIAGENT__INombre.html#b1">00313</a>                 <font class="keywordtype">void</font> addValue(tNombre value)<font class="keyword">
</font>00314 <font class="keyword">                </font>{
00315                         _Value += value;
00316                         chekBorn();
00317                 }
00318 
<a name="l00319"></a><a class="code" href="class_NLAIAGENT__INombre.html#b2">00319</a>                 <font class="keywordtype">void</font> subValue(tNombre value)<font class="keyword">
</font>00320 <font class="keyword">                </font>{
00321                         _Value -= value;
00322                         chekBorn();
00323                 }
00324 
<a name="l00325"></a><a class="code" href="class_NLAIAGENT__INombre.html#b3">00325</a>                 <font class="keywordtype">void</font> mulValue(tNombre value)<font class="keyword">
</font>00326 <font class="keyword">                </font>{
00327                         _Value *= value;
00328                         chekBorn();
00329                 }
00330 
<a name="l00331"></a><a class="code" href="class_NLAIAGENT__INombre.html#b4">00331</a>                 <font class="keywordtype">void</font> divValue(tNombre value)<font class="keyword">
</font>00332 <font class="keyword">                </font>{
00333                         _Value /= value;
00334                         chekBorn();
00335                 }
00336         };
00337 
00338         template &lt;class tNombre&gt; 
<a name="l00339"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html">00339</a>         <font class="keyword">class  </font>IBornNombre: <font class="keyword">public</font> INombre&lt;tNombre&gt;
00340         {
00341         <font class="keyword">private</font>:
<a name="l00342"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#o1">00342</a>                 tNombre _inf,_sup;
00343         <font class="keyword">public</font>:
<a name="l00344"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a0">00344</a>                 IBornNombre(tNombre value,tNombre inf,tNombre sup):INombre&lt;tNombre&gt;(value),_inf((tNombre)inf),_sup((tNombre)sup)
00345                 {
00346                 }
<a name="l00347"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a1">00347</a>                 IBornNombre(<font class="keyword">const</font> IBornNombre &amp;value):INombre&lt;tNombre&gt;(value),_inf((tNombre)value._inf),_sup((tNombre)value._sup)
00348                 {
00349                 }
<a name="l00350"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a2">00350</a>                 IBornNombre(tNombre inf,tNombre sup):_inf((tNombre)inf),_sup((tNombre)sup)
00351                 {                       
00352                 }
<a name="l00353"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a3">00353</a>                 IBornNombre(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;is):INombre&lt;tNombre&gt;(is)
00354                 {                       
00355                 }
<a name="l00356"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a4">00356</a>                 <font class="keyword">virtual</font> ~IBornNombre()<font class="keyword">
</font>00357 <font class="keyword">                </font>{
00358                 }
00359 
<a name="l00360"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a5">00360</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> save(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;)<font class="keyword">
</font>00361 <font class="keyword">                </font>{
00362 <font class="comment">/*                      INombre&lt;tNombre&gt;::save(os);
</font>00363 <font class="comment">                        os.serial( _sup );
</font>00364 <font class="comment">                        os.serial(_inf );*/</font>
00365                 }
00366 
<a name="l00367"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a6">00367</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> load(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &amp;)<font class="keyword">
</font>00368 <font class="keyword">                </font>{
00369                         <font class="comment">// TODO</font>
00370 <font class="comment">/*                      INombre&lt;tNombre&gt;::load(is);
</font>00371 <font class="comment">                        is.serial( _sup );
</font>00372 <font class="comment">                        is.serial( _inf );*/</font>
00373                 }
00374 
<a name="l00375"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a7">00375</a>                 tNombre getSup()<font class="keyword"> const
</font>00376 <font class="keyword">                </font>{
00377                         <font class="keywordflow">return</font> _sup;
00378                 }
<a name="l00379"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#a8">00379</a>                 tNombre getInf()<font class="keyword"> const
</font>00380 <font class="keyword">                </font>{
00381                         <font class="keywordflow">return</font> _inf;
00382                 }
00383         <font class="keyword">protected</font>:
00384 
<a name="l00385"></a><a class="code" href="class_NLAIAGENT__IBornNombre.html#b0">00385</a>                 <font class="keywordtype">void</font> chekBorn()<font class="keyword">
</font>00386 <font class="keyword">                </font>{
00387                         <font class="keywordflow">if</font>(_Value &gt; _sup) _Value = _sup;
00388                         <font class="keywordflow">if</font>(_Value &lt; _inf) _Value = _inf;
00389                 }                                       
00390         };
00391 }
00392 
00393 <font class="preprocessor">#endif
</font></div></pre>

<!-- 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=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>