aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/codage_8h-source.html
blob: 46ef0971486568cb318276cd5339f27b11f9de97 (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
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
<!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>codage.h</h1><a href="codage_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00013 <font class="comment"> * any later version.</font>
00014 <font class="comment"></font>
00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00018 <font class="comment"> * General Public License for more details.</font>
00019 <font class="comment"></font>
00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00023 <font class="comment"> * MA 02111-1307, USA.</font>
00024 <font class="comment"> */</font>
00025 
00026 <font class="preprocessor">#ifndef NL_CODAGE_H</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_CODAGE_H</font>
00028 <font class="preprocessor"></font><font class="preprocessor">#ifdef NL_OS_WINDOWS</font>
00029 <font class="preprocessor"></font><font class="preprocessor">#pragma warning (disable: 4620)</font>
00030 <font class="preprocessor"></font><font class="preprocessor">#pragma warning (disable: 4621)</font>
00031 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00032 <font class="preprocessor"></font>
00033 
00034 <font class="preprocessor">#include "<a class="code" href="virtual__op__code_8h.html">nel/ai/script/virtual_op_code.h</a>"</font>
00035 <font class="preprocessor">#include "<a class="code" href="context__debug_8h.html">nel/ai/script/context_debug.h</a>"</font>
00036 
00037 <font class="keyword">namespace </font>NLAISCRIPT
00038 {
00039 
00040         <font class="comment">// ======================================================================================================</font>
<a name="l00052"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html">00052</a> <font class="comment"></font>        <font class="keyword">class </font>CIndexStackPointer
00053         {
00054         <font class="keyword">protected</font>:
<a name="l00056"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">00056</a>                 <font class="keywordtype">int</font>             <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a>;
00057 
00058         <font class="keyword">private</font>:
<a name="l00060"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#o0">00060</a>                 <a class="code" href="classstd_1_1list.html">std::list&lt;int&gt;</a> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#o0">_Marque</a>;
00061 
00062         <font class="keyword">public</font>:
<a name="l00063"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a0">00063</a>                 <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a0">CIndexStackPointer</a>():<a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a>(0)
00064                 {
00065                 }
00066 
<a name="l00068"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a1">00068</a>                 <font class="keyword">virtual</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a1">operator int </a>()
00069                 {
00070                         <font class="keywordflow">return</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a>;
00071                 }
00072 
<a name="l00074"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a2">00074</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a2">operator ++ </a>( <font class="keywordtype">int</font> )
00075                 {               
00076                         <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> ++;
00077                 }
00078 
<a name="l00080"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a3">00080</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a3">operator -- </a>( <font class="keywordtype">int</font> )
00081                 {               
00082                         <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> --;
00083                 }
00084 
<a name="l00086"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a4">00086</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a4">operator += </a>(<font class="keywordtype">int</font> k)
00087                 {
00088                         <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> += k;
00089                 }
00090 
<a name="l00092"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a5">00092</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a5">operator -= </a>(<font class="keywordtype">int</font> k)
00093                 {               
00094                         <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> -= k;
00095                 }
00096 
<a name="l00098"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a6">00098</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a6">pushMark</a>()
00099                 {
00100                         _Marque.push_back(<a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a>);
00101                 }
00102 
<a name="l00104"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a7">00104</a>                 <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a7">popMark</a>()
00105                 {
00106                         <font class="keywordtype">int</font> i = 0;                      
00107                         i = _Marque.back();
00108                         _Marque.pop_back();             
00109                         <font class="keywordflow">return</font> i;
00110                 }
00111 
<a name="l00112"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a8">00112</a>                 <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a8">markSize</a>()
00113                 {
00114                         <font class="keywordflow">return</font> _Marque.size();
00115                 }
00116 
<a name="l00118"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a9">00118</a>                 <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a9">mark</a>()
00119                 {
00120                         <font class="keywordflow">return</font> _Marque.back();          
00121                 }
00122 
<a name="l00124"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a10">00124</a>                 <font class="keywordtype">void</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a10">clear</a>()
00125                 {
00126                         <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> = 0;                        
00127                         _Marque.clear();
00128                 }
00129 
<a name="l00130"></a><a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a11">00130</a>                 <font class="keyword">virtual</font> <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#a11">~CIndexStackPointer</a>()   
00131                 {
00132                 }
00133 
00134         };
00135 
00136         <font class="comment">// ======================================================================================================</font>
<a name="l00148"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html">00148</a> <font class="comment"></font>        <font class="keyword">class </font>CStackPointer: <font class="keyword">public</font> CIndexStackPointer
00149         {
00150         <font class="keyword">private</font>:                                
<a name="l00152"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o0">00152</a>                 <font class="keywordtype">int</font>                             <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o0">_Count</a>;
<a name="l00154"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o1">00154</a>                 <font class="keywordtype">int</font>                             <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o1">_Bp</a>;
00155                 
<a name="l00157"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o2">00157</a>                 <font class="keywordtype">int</font>                             <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o2">_Sh</a>;
00158 
<a name="l00160"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o3">00160</a>                 <a class="code" href="classstd_1_1list.html">std::list&lt;int&gt;</a>  <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o3">_Decalage</a>;
<a name="l00162"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o4">00162</a>                 <a class="code" href="classstd_1_1list.html">std::list&lt;int&gt;</a>  <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o4">_Shift</a>;
00163 
<a name="l00165"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o5">00165</a>                 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a>    **<a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o5">_Stack</a>;       
00166 
00167         <font class="keyword">public</font>:
<a name="l00168"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a0">00168</a>                 <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a0">CStackPointer</a>(<font class="keywordtype">int</font> count = 1024*8)
00169                 {
00170                         <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o0">_Count</a> = count;
00171                         _Stack = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *[ count ];
00172                         <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = 0; i &lt; <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o0">_Count</a>; i ++)
00173                         {
00174                                 _Stack[i] = NULL;
00175                         }                       
00176                         <a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> = 0;
00177                         <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o1">_Bp</a> = 0;
00178                         <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o2">_Sh</a> = 0;
00179                 }
00180 
<a name="l00182"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a1">00182</a>                 <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *&amp;<a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a1">operator [] </a>(<font class="keywordtype">int</font> i)
00183                 {
00184 <font class="preprocessor">#ifdef NL_DEBUG</font>
00185 <font class="preprocessor"></font>                        <font class="keywordflow">if</font> ( (<a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o1">_Bp</a> + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o2">_Sh</a>) &gt;= <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o0">_Count</a> )
00186                         {
00187                                 <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionIndexError.html">NLAIE::CExceptionIndexError</a>();
00188                         }
00189 <font class="preprocessor">#endif                  </font>
00190 <font class="preprocessor"></font>                        <font class="keywordflow">return</font> _Stack[i + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o1">_Bp</a> + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o2">_Sh</a>];
00191                 }
00192 
<a name="l00194"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a2">00194</a>                 <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a2">operator NLAIAGENT::IObjectIA *</a>()
00195                 {
00196 <font class="preprocessor">#ifdef NL_DEBUG</font>
00197 <font class="preprocessor"></font>                        <font class="keywordflow">if</font> ( (<a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o1">_Bp</a> + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o2">_Sh</a>) &gt;= <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o0">_Count</a> )
00198                         {
00199                                 <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionIndexError.html">NLAIE::CExceptionIndexError</a>();
00200                         }
00201 <font class="preprocessor">#endif                  </font>
00202 <font class="preprocessor"></font>                        <font class="keywordflow">return</font> _Stack[<a class="code" href="classNLAISCRIPT_1_1CIndexStackPointer.html#n0">_Sp</a> + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o1">_Bp</a> + <a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#o2">_Sh</a>];
00203                 }
00204 
<a name="l00206"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a3">00206</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> operator -- (<font class="keywordtype">int</font>)
00207                 {
00208 <font class="preprocessor">#ifdef NL_DEBUG</font>
00209 <font class="preprocessor"></font>                        <font class="keywordflow">if</font> ( (_Sp + _Bp + _Sh) &gt;= _Count )
00210                         {
00211                                 <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionIndexError.html">NLAIE::CExceptionIndexError</a>();
00212                         }
00213 <font class="preprocessor">#endif                                          </font>
00214 <font class="preprocessor"></font>                        <font class="keywordtype">int</font> i = _Sp + _Bp  + _Sh;
00215                         <font class="keywordflow">if</font>(_Stack[i])
00216                         {                       
00217                                 _Stack[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>(); 
00218                                 _Stack[i] = NULL;
00219                         }
00220                         _Sp --;
00221                 }
00222                 
<a name="l00224"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a4">00224</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> operator -= (<font class="keywordtype">int</font> k)
00225                 {
00226 <font class="preprocessor">#ifdef NL_DEBUG</font>
00227 <font class="preprocessor"></font>                        <font class="keywordflow">if</font> ( (_Sp + _Bp + _Sh) &gt;= _Count )
00228                         {
00229                                 <font class="keywordflow">throw</font> <a class="code" href="classNLAIE_1_1CExceptionIndexError.html">NLAIE::CExceptionIndexError</a>();
00230                         }
00231 <font class="preprocessor">#endif                                          </font>
00232 <font class="preprocessor"></font>                        <font class="keywordtype">int</font> n = _Sp + _Bp + _Sh;
00233                         <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = n - k; i &lt; n; i ++) 
00234                         {
00235                                 <font class="keywordflow">if</font>(_Stack[i])
00236                                 {
00237                                         _Stack[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
00238                                         _Stack[i] = NULL;
00239                                 }
00240                         }
00241                         _Sp -= k;
00242                 }
00243 
<a name="l00245"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a5">00245</a>                 <font class="keywordtype">void</font> addStack(<font class="keywordtype">int</font> bp)
00246                 {
00247                         _Bp += bp;
00248                         _Sp -= bp;
00249                         _Decalage.push_back(bp);
00250                 }
00251 
<a name="l00253"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a6">00253</a>                 <font class="keywordtype">void</font> restoreStack()
00254                 {                       
00255                         <font class="keywordtype">int</font> k = _Bp;
00256                         _Bp -= _Decalage.back();
00257                         _Decalage.pop_back();
00258                         _Sp += k;
00259                         
00260                         *<font class="keyword">this</font> -= k;                             
00261                 }
00262 
<a name="l00264"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a7">00264</a>                 <font class="keywordtype">void</font> setShift(<font class="keywordtype">int</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>)
00265                 {
00266                         _Sh += <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>;
00267                         _Sp -= <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>;
00268                         _Shift.push_back(<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>);
00269                 }
00270 
<a name="l00272"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a8">00272</a>                 <font class="keywordtype">void</font> restoreShift()
00273                 {                       
00274                         <font class="keywordtype">int</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a> = _Shift.back();
00275                         _Shift.pop_back();
00276                         _Sp += <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>;
00277                         _Sh -= <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>;
00278                 }
00279 
00280 
<a name="l00282"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a9">00282</a>                 <font class="keywordtype">bool</font> restoreStackState()
00283                 {
00284                         <font class="keywordflow">return</font> _Decalage.size() != 0;
00285                 }
00286 
<a name="l00288"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a10">00288</a>                 <font class="keywordtype">bool</font> restoreShiftState()
00289                 {
00290                         <font class="keywordflow">return</font> _Shift.size() != 0;
00291                 }
00292                 
<a name="l00293"></a><a class="code" href="classNLAISCRIPT_1_1CStackPointer.html#a11">00293</a>                 ~CStackPointer()
00294                 {               
00295                         <font class="keywordflow">if</font>(_Stack)
00296                         {
00297                         
00298                                 <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = _Bp; i &lt; (_Sp + _Bp); i ++)
00299                                 {
00300                                         <font class="keywordflow">if</font>(_Stack[i] != NULL)
00301                                         {
00302                                                 _Stack[i]-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
00303                                                 _Stack[i] = NULL;
00304                                         }
00305                                 }
00306                                 <font class="keyword">delete</font> []_Stack;
00307                                 _Stack = NULL;
00308                         }                       
00309                 }
00310         };
00311 
00312 
00313         <font class="keyword">class </font>CCodeBrancheRun;
00314         <font class="keyword">typedef</font> CStackPointer   <a class="code" href="namespaceNLAISCRIPT.html#a0">tStackRef</a>;
00315         <font class="keyword">typedef</font> CCodeBrancheRun <a class="code" href="namespaceNLAISCRIPT.html#a1">tCodeRef</a>;
00316 
00317         <font class="comment">// ======================================================================================================</font>
<a name="l00330"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html">00330</a> <font class="comment"></font>        <font class="keyword">class </font>CCodeContext : <font class="keyword">public</font> NLAIAGENT::IObjectIA
00331         {               
00332         <font class="keyword">public</font>:
00333 
<a name="l00335"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m0">00335</a>                 tStackRef                       &amp;Stack;
<a name="l00337"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m1">00337</a>                 tStackRef                       &amp;Heap;
<a name="l00339"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m2">00339</a>                 <a class="code" href="namespaceNLAISCRIPT.html#a1">tCodeRef</a>                        *Code;
<a name="l00341"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m3">00341</a>                 <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a>      *Self;
<a name="l00343"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m4">00343</a>                 <a class="code" href="classNLAIC_1_1IIO.html">NLAIC::IIO</a>                      *InputOutput;
<a name="l00345"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m5">00345</a>                 <a class="code" href="classstd_1_1list.html">std::list&lt;NLAIAGENT::IObjectIA	*&gt;</a> <a class="code" href="namespaceNLAIAGENT.html#a13">Param</a>;
<a name="l00347"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#m6">00347</a>                 CContextDebug           ContextDebug;
00348 
00349         <font class="keyword">public</font>:
00351                 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> IdCodeContext;
00352 
00353         <font class="keyword">public</font>:
00354 
<a name="l00355"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#a0">00355</a>                 CCodeContext(tStackRef &amp;stackMem,tStackRef &amp;heapMem,<a class="code" href="namespaceNLAISCRIPT.html#a1">tCodeRef</a> *codeMem,<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *thisClass,<a class="code" href="classNLAIC_1_1IIO.html">NLAIC::IIO</a> *io):
00356                 Stack(stackMem),
00357                 Heap(heapMem),          
00358                 Code(codeMem),
00359                 Self(thisClass),
00360                 InputOutput(io)         
00361                 {
00362                         <font class="keywordflow">if</font>(InputOutput != NULL) InputOutput-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a2">incRef</a>();
00363                 }
00364 
<a name="l00366"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#a1">00366</a>                 <font class="keywordtype">void</font> init()
00367                 {
00368                         ContextDebug.init();
00369                 }
00370 
<a name="l00372"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#a2">00372</a>                 <font class="keywordtype">void</font> setIO(<a class="code" href="classNLAIC_1_1IIO.html">NLAIC::IIO</a> *io)
00373                 {
00374                         <font class="keywordflow">if</font>(InputOutput != NULL) InputOutput-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
00375                         InputOutput = io;                       
00376                 }
00377 
00379 
<a name="l00380"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z206_0">00380</a>                 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;getType(<font class="keywordtype">void</font>)<font class="keyword"> const</font>
00381 <font class="keyword">                </font>{
00382                         <font class="keywordflow">return</font> IdCodeContext;
00383                 }
<a name="l00384"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z206_1">00384</a>                 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *clone(<font class="keywordtype">void</font>)<font class="keyword"> const</font>
00385 <font class="keyword">                </font>{
00386                         CCodeContext *<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a> = <font class="keyword">new</font> CCodeContext(Stack,Heap,Code,Self,InputOutput);                   
00387                         <font class="keywordflow">return</font> x;
00388                 }
<a name="l00389"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z206_2">00389</a>                 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *newInstance(<font class="keywordtype">void</font>)<font class="keyword"> const</font>
00390 <font class="keyword">                </font>{
00391                         <font class="keywordflow">return</font> clone();
00392                 }
<a name="l00393"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z206_3">00393</a>                 <font class="keywordtype">void</font> getDebugString(std::string &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>)<font class="keyword"> const</font>
00394 <font class="keyword">                </font>{
00395                         <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"CCodeContext"</font>);
00396                 }
<a name="l00397"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z206_4">00397</a>                 <font class="keywordtype">void</font> save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f)
00398                 {                       
00399                 }
<a name="l00400"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z206_5">00400</a>                 <font class="keywordtype">void</font> load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f)
00401                 {
00402                 }
00404 
00406 
<a name="l00407"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z207_0">00407</a>                 <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">isEqual</a>(<font class="keyword">const</font> <font class="keyword">class</font> <a class="code" href="classNLAIAGENT_1_1IBasicObjectIA.html">NLAIAGENT::IBasicObjectIA</a> &amp;)<font class="keyword"> const</font>
00408 <font class="keyword">                </font>{
00409                         <font class="keywordflow">return</font> <font class="keyword">true</font>;
00410                 }
00412 
00414 
<a name="l00415"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#z208_0">00415</a>                 <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &amp;run(<font class="keywordtype">void</font>)
00416                 {
00417                         <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#p0">NLAIAGENT::IObjectIA::ProcessRun</a>;;
00418                 }
00420 
<a name="l00421"></a><a class="code" href="classNLAISCRIPT_1_1CCodeContext.html#a3">00421</a>                 ~CCodeContext()
00422                 {
00423                         <font class="keywordflow">if</font>(InputOutput != NULL) InputOutput-&gt;<a class="code" href="classNLAIC_1_1IPointerGestion.html#a3">release</a>();
00424                 }
00425         };
00426 
00427         <font class="keyword">class </font>IConstraint;
00428 
00429         <font class="comment">// ======================================================================================================</font>
<a name="l00442"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html">00442</a> <font class="comment"></font>        <font class="keyword">class </font>CBagOfCode 
00443         {
00444         <font class="keyword">private</font>:
<a name="l00445"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#o0">00445</a>                 IOpCode *_Opcode;
<a name="l00446"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#o1">00446</a>                 <a class="code" href="classstd_1_1list.html">std::list&lt;IConstraint *&gt;</a> _Constraint;
00447 
00448         <font class="keyword">public</font>:
<a name="l00449"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#a0">00449</a>                 CBagOfCode(IOpCode *opcode):_Opcode(opcode)
00450                 {
00451                         
00452                 }
00453 
<a name="l00455"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#a1">00455</a>                 operator IOpCode *()<font class="keyword"> const</font>
00456 <font class="keyword">                </font>{
00457                         <font class="keywordflow">return</font> _Opcode;
00458                 }
00459 
<a name="l00461"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#a2">00461</a>                 <font class="keywordtype">void</font> setCode(IOpCode *op)
00462                 {
00463                         _Opcode = op;   
00464                 }
00465 
<a name="l00467"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#a3">00467</a>                 <font class="keywordtype">void</font> addConstraint(IConstraint *c)
00468                 {                       
00469                         _Constraint.push_back(c);
00470                 }
00471 
<a name="l00473"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#a4">00473</a>                 <font class="keywordtype">void</font> addConstraint(CBagOfCode *b)
00474                 {       
00475                         <a class="code" href="classstd_1_1list.html">std::list&lt;IConstraint *&gt;</a>::iterator it = b-&gt;_Constraint.begin();
00476                         <font class="keywordflow">while</font>(it != b-&gt;_Constraint.end())
00477                         {                               
00478                                 _Constraint.push_back(*it++);
00479                         }                       
00480                 }
00481 
00484                 <font class="keywordtype">void</font> setConstraintIndex(<font class="keywordtype">int</font> i,CCodeBrancheRun *c);
00485 
<a name="l00486"></a><a class="code" href="classNLAISCRIPT_1_1CBagOfCode.html#a6">00486</a>                 ~CBagOfCode(){}
00487                 
00488 
00489         };
00490 
00491         <font class="keyword">typedef</font> <a class="code" href="classstd_1_1list.html">std::list&lt;CBagOfCode *&gt;</a> <a class="code" href="namespaceNLAISCRIPT.html#a2">tListCode</a>;
00492         <font class="keyword">typedef</font> <a class="code" href="classstd_1_1list.html">std::list&lt;CBagOfCode *&gt;</a>::iterator <a class="code" href="namespaceNLAISCRIPT.html#a3">tListCodeIter</a>;
00493 
00494         <font class="comment">// ======================================================================================================</font>
<a name="l00504"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html">00504</a> <font class="comment"></font>        <font class="keyword">class </font>CCodeBrancheRun: <font class="keyword">public</font> ICodeBranche
00505         {
00506         <font class="keyword">public</font>:
00507                 <font class="keyword">static</font> <a class="code" href="classNLAIC_1_1IIO.html">NLAIC::IIO</a>       *InputOutput;
00508 
00509         <font class="keyword">protected</font>:
<a name="l00511"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#n0">00511</a>                 IOpCode **_TableCode;
<a name="l00513"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#n1">00513</a>                 <font class="keywordtype">int</font>             _Ip;
<a name="l00515"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#n2">00515</a>                 <font class="keywordtype">int</font>             _Count;  
<a name="l00517"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#n3">00517</a>                 <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> _RunState;
00518 
00519         <font class="keyword">protected</font>:
00520 
<a name="l00522"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#b0">00522</a>                 <font class="keywordtype">void</font> del()
00523                 {
00524                         <font class="keywordflow">if</font>(_TableCode != NULL)
00525                         {
00526                                 <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = 0 ;i &lt; _Count; i ++)
00527                                 {
00528                                         <font class="keywordflow">if</font>(_TableCode[i]) _TableCode[i]-&gt;release();
00529                                 }
00530                                 <font class="keyword">delete</font> []_TableCode;
00531                         }
00532                 }
00533 
00534         <font class="keyword">public</font>:
00535                 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> IdCodeBrancheRun;
00536         <font class="keyword">public</font>:
00537 
00538                 
<a name="l00540"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a0">00540</a>                 CCodeBrancheRun(<font class="keyword">const</font> CCodeBrancheRun &amp;<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>):_TableCode(NULL),_Ip(0),_Count(<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>._Count)
00541                 {
00542                         _TableCode = <font class="keyword">new</font> IOpCode * [_Count];
00543                         <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = 0 ;i &lt; _Count; i ++) 
00544                         {
00545                                 _TableCode[i] = (IOpCode *)<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>._TableCode[i];<font class="comment">//-&gt;clone();                         </font>
00546                                 _TableCode[i]-&gt;incRef();
00547                         }
00548                 }
00549 
<a name="l00551"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a1">00551</a>                 CCodeBrancheRun(<font class="keyword">const</font> tListCode &amp;<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>):
00552                         _TableCode(NULL),_Ip(0),_Count(<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>.size())
00553                 {
00554                         initCode(<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>);    
00555                 }       
00556 
00558                 CCodeBrancheRun(<font class="keywordtype">int</font> N,<font class="keyword">const</font> IOpCode &amp;op);
00560                 CCodeBrancheRun(<font class="keywordtype">int</font> N);
00561 
<a name="l00563"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a4">00563</a>                 CCodeBrancheRun(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is):_TableCode(NULL),_Ip(0),_Count(0)
00564                 {
00565                         load(is);
00566                 }
00567 
<a name="l00568"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a5">00568</a>                 <font class="keyword">virtual</font> ~CCodeBrancheRun()
00569                 {
00570                         del();
00571                 }
00572 
00573                 
<a name="l00574"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a6">00574</a>                 <font class="keywordtype">void</font> initCode(<font class="keyword">const</font> tListCode &amp;<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>)
00575                 {
00576                         del();
00577                         _Count = l.size();
00578 
00579                         tListCode::const_iterator i;            
00580                         _TableCode = <font class="keyword">new</font> IOpCode * [l.size()];
00581                         i = l.begin();
00582                         <font class="keywordtype">int</font> k = 0;
00583                         <font class="keywordflow">while</font>(i != l.end())
00584                         {
00585                                 _TableCode[k ++] = (IOpCode *)*i++;
00586                         }               
00587                 }
00588 
<a name="l00589"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a7">00589</a>                 <font class="keywordtype">void</font> initCode(<font class="keyword">const</font> CCodeBrancheRun &amp;<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>)
00590                 {
00591                         del();
00592 
00593                         _Ip = 0;
00594                         _Count = l._Count;
00595                         
00596                         _TableCode = <font class="keyword">new</font> IOpCode * [_Count];            
00597                         <font class="keywordflow">for</font>(<font class="keywordtype">int</font> i = 0; i &lt; _Count;i ++)
00598                         {
00599                                 _TableCode[i ++] = (IOpCode *)l._TableCode[i]-&gt;clone();
00600                         }
00601                 }
00602 
<a name="l00604"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a8">00604</a>                 IOpCode *&amp;operator [] (<font class="keywordtype">int</font> i)
00605                 {
00606                         <font class="keywordflow">return</font> _TableCode[i];
00607                 }
00608 
<a name="l00610"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a9">00610</a>                 <font class="keywordtype">void</font> operator = (uint32 <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>)
00611                 {
00612                         _Ip = <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>;
00613                 }
00614 
<a name="l00616"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a10">00616</a>                 <font class="keywordtype">void</font> operator += (uint32 <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>)
00617                 {
00618                         _Ip += <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>;
00619                 }
00620 
<a name="l00622"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a11">00622</a>                 operator uint32 ()
00623                 {
00624                         <font class="keywordflow">return</font> _Ip;
00625                 }
00626 
<a name="l00627"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a12">00627</a>                 <font class="keywordtype">void</font> init()
00628                 {
00629                         _Ip = 0;
00630                 }
00631 
<a name="l00633"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#a13">00633</a>                 IOpCode &amp;nextCode()
00634                 {
00635                         <font class="keywordflow">return</font> *_TableCode[_Ip++];
00636                 }                                       
00637 
00639 
00640                 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &amp;run(<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> &amp;self);
00641                 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &amp;run(CCodeContext &amp;);
00642 
00643                 NLAIAGENT::TProcessStatement runOpCode(CCodeContext &amp;context);
00644                 <font class="keywordtype">void</font> getDebugResult(std::string &amp;str,CCodeContext &amp;context) <font class="keyword">const</font>;              
00646 
00648 
00649                 <font class="keywordtype">void</font> save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f);  
00650                 <font class="keywordtype">void</font> load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f);  
00651                 <font class="keywordtype">void</font> getDebugString(std::string &amp;) <font class="keyword">const</font>;
00652                 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;getType() <font class="keyword">const</font>;               
<a name="l00653"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#z210_4">00653</a>                 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *clone()<font class="keyword"> const </font>
00654 <font class="keyword">                </font>{
00655                         <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a> = <font class="keyword">new</font> CCodeBrancheRun(*<font class="keyword">this</font>);                      
00656                         <font class="keywordflow">return</font> x;
00657                 }
00658                 <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *newInstance() <font class="keyword">const</font>;
00659                 
00661 
00663 
<a name="l00664"></a><a class="code" href="classNLAISCRIPT_1_1CCodeBrancheRun.html#z211_0">00664</a>                 <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">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>{ <font class="keywordflow">return</font> <font class="keyword">true</font>;}   
00666 
00668 
00669                 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> &amp;run();              
00671                 
00672         };
00673 }
00674 <font class="preprocessor">#include "<a class="code" href="opcode_8h.html">nel/ai/script/opcode.h</a>"</font>
00675 
00676 <font class="preprocessor">#endif</font>
00677 <font class="preprocessor"></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>