aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03613.html
blob: f751f84210c43c22f3237008633c77aca88afb49 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NLLIGO::CTransition class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NLLIGO::CTransition Class Reference</h1><code>#include &lt;<a class="el" href="a06579.html">transition.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A transition template<p>
<dl compact><dt><b>Author:</b></dt><dd>Cyril 'Hulud' Corvazier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06579.html#l00050">50</a> of file <a class="el" href="a06579.html">transition.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <a class="el" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw2">ZoneEdgeCount</a> =  4, 
<a class="el" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw1">TransitionZoneCount</a> =  9
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Some define.  <a href="#NLLIGO_1_1CTransitionw0">More...</a><br><br></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03613.html#NLLIGO_1_1CTransitiona0">build</a> (const <a class="el" href="a02840.html">CMaterial</a> &amp;mat0, const <a class="el" href="a02840.html">CMaterial</a> &amp;mat1, const std::vector&lt; const <a class="el" href="a03764.html">CZoneTemplate</a> * &gt; &amp;arrayTemplate, const <a class="el" href="a02756.html">CLigoConfig</a> &amp;config, <a class="el" href="a02757.html">CLigoError</a> *errors, <a class="el" href="a02757.html">CLigoError</a> &amp;mainErrors)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03613.html#NLLIGO_1_1CTransitiona1">check</a> (const <a class="el" href="a03764.html">CZoneTemplate</a> &amp;zoneTemplate, <a class="el" href="a04558.html#a15">uint</a> transitionNumber, const <a class="el" href="a02756.html">CLigoConfig</a> &amp;config, <a class="el" href="a02757.html">CLigoError</a> &amp;errors) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03613.html#NLLIGO_1_1CTransitiona2">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &amp;<a class="el" href="a04223.html#a626">s</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Serial.  <a href="#NLLIGO_1_1CTransitiona2"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03737.html">CZoneEdge</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a> [ZoneEdgeCount]</td></tr>

<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03613.html#NLLIGO_1_1CTransitionv0">TransitionZoneEdges</a> [TransitionZoneCount][4]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Some static arries.  <a href="#NLLIGO_1_1CTransitionv0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03613.html#NLLIGO_1_1CTransitionv1">TransitionZoneOffset</a> [TransitionZoneCount][2]</td></tr>

</table>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="NLLIGO_1_1CTransitionw0" doxytag="NLLIGO::CTransition::@41" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> anonymous enum
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Some define. 
<p>
<dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="anchor" name="NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw2" doxytag="ZoneEdgeCount" ></a>ZoneEdgeCount</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw1" doxytag="TransitionZoneCount" ></a>TransitionZoneCount</em>&nbsp;</td><td>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="a06579.html#l00055">55</a> of file <a class="el" href="a06579.html">transition.h</a>.
<p>
<div class="fragment"><pre>00056         {
00057                 <a class="code" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw2">ZoneEdgeCount</a> = 4,
00058                 <a class="code" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw1">TransitionZoneCount</a> = 9,
00059         };
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLLIGO_1_1CTransitiona0" doxytag="NLLIGO::CTransition::build" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NLLIGO::CTransition::build </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02840.html">CMaterial</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mat0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02840.html">CMaterial</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mat1</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::vector&lt; const <a class="el" href="a03764.html">CZoneTemplate</a> * &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>arrayTemplate</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02756.html">CLigoConfig</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>config</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02757.html">CLigoError</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>errors</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02757.html">CLigoError</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mainErrors</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Build method<p>
We need 9 zone templates to create a transition set<p>
0<p>
1*0000* 1*0000* 1*0000* 1*0000* 1****** 111111*<p>
1<p>
0*1111* 0*1111* 0*1111* 0*1111* 1111* 111111*<p>
2<p>
0*1111* 0*1111* 0*1111* 0*1111* 0*1111*<p>
3<p>
111111* 111111* 111111* 111111* 1111* 0*1111*<p>
4<p>
0000*1* 0000*1* 0000*1* 0000*1* 0000*** 000000*<p>
5<p>
000000* 000000* 000000* 000000* 0000*** 0000*1*<p>
6<p>
000000* 000000* 000000* 000000*<p>
111111*<p>
7<p>
000000* 0000*** 000*11* 00*111* 1111* 111111*<p>
8<p>
000000* 0* 1111*0* 1111*0* 1111*0* 1111*0*<p>
The nine zones must be assembled like this:<p>
Oy<p>
^ | +-+-+-+-+ |5|6|7|8| +-+-+-+-+ |4|3| | | +-+-+-+-+ | |2| | | +-+-+-+-+ |0|1| | | -----------&gt; Ox<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>tplt0</em>&nbsp;</td><td>is the material lingo config file </td></tr>
    <tr><td valign=top><em>config</em>&nbsp;</td><td>is the current lingo config file </td></tr>
    <tr><td valign=top><em>arrayTemplate</em>&nbsp;</td><td>is an array of ligo zone template pointer of size 9. If a pointer is NULL, checks will be done on non NULL pointer but build will not be done. </td></tr>
    <tr><td valign=top><em>arrayZone</em>&nbsp;</td><td>is an array of nel zone pointer of size 9. If a pointer is NULL, checks will be done but build will not be done. </td></tr>
    <tr><td valign=top><em>config</em>&nbsp;</td><td>is the current lingo config file </td></tr>
    <tr><td valign=top><em>errors</em>&nbsp;</td><td>is an array of error structure of size 9. One error structure by zone. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if check success false if problem detected. Build is done if all the 18 pointers are not NULL.</dd></dl>

<p>
Definition at line <a class="el" href="a06578.html#l00068">68</a> of file <a class="el" href="a06578.html">transition.cpp</a>.
<p>
References <a class="el" href="a06579.html#l00209">_EdgeZone</a>, <a class="el" href="a05908.html#l00056">NLLIGO::CMaterial::getEdge()</a>, <a class="el" href="a06766.html#l00195">NLLIGO::CZoneEdge::invert()</a>, <a class="el" href="a06766.html#l00138">NLLIGO::CZoneEdge::isTheSame()</a>, <a class="el" href="a05906.html#l00124">NLLIGO::CLigoError::MainError</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw1">TransitionZoneCount</a>, <a class="el" href="a06578.html#l00038">TransitionZoneEdges</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw2">ZoneEdgeCount</a>.
<p>
<div class="fragment"><pre>00070 {
00071         <span class="comment">// Check size</span>
00072         <span class="keywordflow">if</span> ((arrayTemplate.size() != <a class="code" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw1">TransitionZoneCount</a>))
00073         {
00074                 <span class="comment">// Error message</span>
00075                 mainErrors.MainError = CLigoError::UnknownError;
00076                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00077         }
00078 
00079         <span class="comment">// Ok ?</span>
00080         <span class="keywordtype">bool</span> ok=<span class="keyword">true</span>;
00081 
00082         <span class="comment">// Check zone template edge count</span>
00083         <a class="code" href="a04558.html#a15">uint</a> i;
00084         <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw1">TransitionZoneCount</a>; i++)
00085         {
00086                 <span class="comment">// Must have 4 edges</span>
00087                 <span class="keywordflow">if</span> (arrayTemplate[i]&amp;&amp;(arrayTemplate[i]-&gt;getEdges ().size()!=4))
00088                 {
00089                         <span class="comment">// Error code</span>
00090                         mainErrors.MainError = CLigoError::MustHave4Edges;
00091                         errors[i].MainError = CLigoError::MustHave4Edges;
00092                 }
00093         }
00094 
00095         <span class="comment">// continue ?</span>
00096         <span class="keywordflow">if</span> (ok)
00097         {
00098                 <span class="comment">// Get first edge</span>
00099                 <a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[0]=mat0.getEdge ();
00100 
00101                 <span class="comment">// Get second edge</span>
00102                 <a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[1]=mat1.getEdge ();
00103 
00104                 <span class="comment">// For the two others edges</span>
00105                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a10">sint32</a> k=2; k&lt;(<a class="code" href="a04558.html#a10">sint32</a>)<a class="code" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw2">ZoneEdgeCount</a>; k++)
00106                 {
00107                         <span class="comment">// Get the first third edge found</span>
00108                         <span class="keywordflow">for</span> (i=0; i&lt;TransitionZoneCount; i++)
00109                         {
00110                                 <span class="comment">// This template exist ?</span>
00111                                 <span class="keywordflow">if</span> (arrayTemplate[i])
00112                                 {
00113                                         <a class="code" href="a04558.html#a15">uint</a> j;
00114                                         <span class="keywordflow">for</span> (j=0; j&lt;4; j++)
00115                                         {
00116                                                 <span class="comment">// Get edge</span>
00117                                                 <a class="code" href="a04558.html#a10">sint32</a> edge = <a class="code" href="a03613.html#NLLIGO_1_1CTransitionv0">TransitionZoneEdges</a>[i][j];
00118 
00119                                                 <span class="comment">// The good edge ?</span>
00120                                                 <span class="keywordflow">if</span> (((edge==k+1)||(edge==-(k+1))))
00121                                                 {
00122                                                         <span class="comment">// Back the ege</span>
00123                                                         <a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[k]=arrayTemplate[i]-&gt;getEdges ()[j];
00124 
00125                                                         <span class="comment">// Invert it if negative</span>
00126                                                         <span class="keywordflow">if</span> (edge&lt;0)
00127                                                         {
00128                                                                 <span class="comment">// Invert</span>
00129                                                                 <a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[k].invert (config);
00130                                                         }
00131 
00132                                                         <span class="comment">// Break</span>
00133                                                         <span class="keywordflow">break</span>;
00134                                                 }
00135                                         }
00136                                         <span class="keywordflow">if</span> (j&lt;4)
00137                                                 <span class="keywordflow">break</span>;
00138                                 }
00139                         }
00140                 }
00141 
00142                 <span class="comment">// Get the inverted edges</span>
00143                 CZoneEdge invertedEdges[4];
00144                 <span class="keywordflow">for</span> (i=0; i&lt;4; i++)
00145                 {
00146                         <span class="comment">// Copy the edge</span>
00147                         invertedEdges[i]=<a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[i];
00148 
00149                         <span class="comment">// Invert it</span>
00150                         invertedEdges[i].invert(config);
00151                 }
00152 
00153                 <span class="comment">// false if can't build because some template are missing</span>
00154                 <span class="keywordtype">bool</span> <a class="code" href="a03613.html#NLLIGO_1_1CTransitiona0">build</a>=<span class="keyword">true</span>;
00155 
00156                 <span class="comment">// Now check each zones against the edges</span>
00157                 <span class="keywordflow">for</span> (i=0; i&lt;TransitionZoneCount; i++)
00158                 {
00159                         <span class="comment">// Template present ?</span>
00160                         <span class="keywordflow">if</span> (arrayTemplate[i])
00161                         {
00162                                 <span class="comment">// For each edge</span>
00163                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;4; j++)
00164                                 {
00165                                         <span class="comment">// Get the edge number</span>
00166                                         <a class="code" href="a04558.html#a10">sint32</a> edge=<a class="code" href="a03613.html#NLLIGO_1_1CTransitionv0">TransitionZoneEdges</a>[i][j];
00167 
00168                                         <span class="comment">// Compare the edge</span>
00169                                         <span class="keywordflow">if</span> (edge&lt;0)
00170                                         {
00171                                                 <span class="comment">// The same edge ?</span>
00172                                                 <span class="keywordflow">if</span> (!invertedEdges[-edge-1].isTheSame (arrayTemplate[i]-&gt;getEdges()[j], config, errors[i]))
00173                                                 {
00174                                                         ok=<span class="keyword">false</span>;
00175                                                 }
00176                                         }
00177                                         <span class="keywordflow">else</span>
00178                                         {
00179                                                 <span class="comment">// The same edge ?</span>
00180                                                 <span class="keywordflow">if</span> (!<a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[edge-1].isTheSame (arrayTemplate[i]-&gt;getEdges()[j], config, errors[i]))
00181                                                 {
00182                                                         ok=<span class="keyword">false</span>;
00183                                                 }
00184                                         }
00185                                 }
00186                         }
00187                         <span class="keywordflow">else</span>
00188                                 <span class="comment">// Can't build</span>
00189                                 build=<span class="keyword">false</span>;
00190                 }
00191 
00192                 <span class="comment">// Ok to build ?</span>
00193                 <span class="keywordflow">if</span> (ok &amp;&amp; build)
00194                 {
00195                 }
00196         }
00197 
00198         <span class="comment">// Return error code</span>
00199         <span class="keywordflow">return</span> ok;
00200 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLIGO_1_1CTransitiona1" doxytag="NLLIGO::CTransition::check" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NLLIGO::CTransition::check </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03764.html">CZoneTemplate</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>zoneTemplate</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>transitionNumber</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02756.html">CLigoConfig</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>config</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02757.html">CLigoError</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>errors</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Check if a transition zone template match with this transition template.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>zoneTemplate</em>&nbsp;</td><td>is a zone template. </td></tr>
    <tr><td valign=top><em>transition</em>&nbsp;</td><td>number is the number of the transition to test (0 ~ 8) </td></tr>
    <tr><td valign=top><em>config</em>&nbsp;</td><td>is the current lingo config file </td></tr>
    <tr><td valign=top><em>errors</em>&nbsp;</td><td>is an error handler filled with error code and message if the method return false.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if check success false if problem detected. Errors are reported in the the error[0].</dd></dl>

<p>
Definition at line <a class="el" href="a06578.html#l00228">228</a> of file <a class="el" href="a06578.html">transition.cpp</a>.
<p>
References <a class="el" href="a06579.html#l00209">_EdgeZone</a>, <a class="el" href="a06781.html#l00068">NLLIGO::CZoneTemplate::getEdges()</a>, <a class="el" href="a06766.html#l00195">NLLIGO::CZoneEdge::invert()</a>, <a class="el" href="a06766.html#l00138">NLLIGO::CZoneEdge::isTheSame()</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06578.html#l00038">TransitionZoneEdges</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00229 {
00230         <span class="comment">// Return value</span>
00231         <span class="keywordtype">bool</span> ok = <span class="keyword">true</span>;
00232 
00233         <span class="comment">// For each edge</span>
00234         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;4; j++)
00235         {
00236                 <span class="comment">// Get the edge number</span>
00237                 <a class="code" href="a04558.html#a10">sint32</a> edge=<a class="code" href="a03613.html#NLLIGO_1_1CTransitionv0">TransitionZoneEdges</a>[transitionNumber][j];
00238 
00239                 <span class="comment">// Compare the edge</span>
00240                 <span class="keywordflow">if</span> (edge&lt;0)
00241                 {
00242                         <span class="comment">// Invert the edge</span>
00243                         CZoneEdge invertedEdges = <a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[-edge-1];
00244                         invertedEdges.invert(config);
00245 
00246                         <span class="comment">// The same edge ?</span>
00247                         <span class="keywordflow">if</span> (!invertedEdges.isTheSame (zoneTemplate.getEdges()[j], config, errors))
00248                         {
00249                                 ok=<span class="keyword">false</span>;
00250                         }
00251                 }
00252                 <span class="keywordflow">else</span>
00253                 {
00254                         <span class="comment">// The same edge ?</span>
00255                         <span class="keywordflow">if</span> (!<a class="code" href="a03613.html#NLLIGO_1_1CTransitionr0">_EdgeZone</a>[edge-1].isTheSame (zoneTemplate.getEdges()[j], config, errors))
00256                         {
00257                                 ok=<span class="keyword">false</span>;
00258                         }
00259                 }
00260         }
00261 
00262         <span class="comment">// Return status</span>
00263         <span class="keywordflow">return</span> ok;
00264 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLIGO_1_1CTransitiona2" doxytag="NLLIGO::CTransition::serial" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLLIGO::CTransition::serial </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Serial. 
<p>

<p>
Definition at line <a class="el" href="a06578.html#l00204">204</a> of file <a class="el" href="a06578.html">transition.cpp</a>.
<p>
References <a class="el" href="a06579.html#l00209">_EdgeZone</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw2">ZoneEdgeCount</a>.
<p>
<div class="fragment"><pre>00205 {
00206         <span class="comment">// Serial the main node</span>
00207         <a class="code" href="a04223.html#a626">s</a>.xmlPush (<span class="stringliteral">"LIGO_TRANSITION"</span>);
00208 
00209                 <span class="comment">// Serial the header</span>
00210                 <a class="code" href="a04223.html#a626">s</a>.serialCheck ((<a class="code" href="a04558.html#a11">uint32</a>)'STGL');
00211 
00212                 <span class="comment">// Serial the version</span>
00213                 <span class="comment">/*sint ver =*/</span> <a class="code" href="a04223.html#a626">s</a>.serialVersion (0);
00214 
00215                 <span class="comment">// Serial the edgezones</span>
00216                 <a class="code" href="a04558.html#a15">uint</a> i;
00217                 <a class="code" href="a04223.html#a626">s</a>.xmlPush (<span class="stringliteral">"EDGE_ZONES"</span>);
00218                         <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a03613.html#NLLIGO_1_1CTransitionw0NLLIGO_1_1CTransitionw2">ZoneEdgeCount</a>; i++)
00219                                 <a class="code" href="a04223.html#a626">s</a>.xmlSerial (_EdgeZone[i], <span class="stringliteral">"ELM"</span>);
00220                 <a class="code" href="a04223.html#a626">s</a>.xmlPop ();
00221 
00222         <span class="comment">// Close the main node</span>
00223         <a class="code" href="a04223.html#a626">s</a>.xmlPop ();
00224 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLLIGO_1_1CTransitionr0" doxytag="NLLIGO::CTransition::_EdgeZone" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03737.html">CZoneEdge</a> <a class="el" href="a03613.html#NLLIGO_1_1CTransitionr0">NLLIGO::CTransition::_EdgeZone</a>[ZoneEdgeCount]<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The 4 Edges that define the transitions set<p>
the 4 transitions are: 0 : *000000* 1 : *111111* 2 : *0*1111* 3 : *0000*1*
<p>
Definition at line <a class="el" href="a06579.html#l00209">209</a> of file <a class="el" href="a06579.html">transition.h</a>.
<p>
Referenced by <a class="el" href="a06578.html#l00068">build()</a>, <a class="el" href="a06578.html#l00228">check()</a>, and <a class="el" href="a06578.html#l00204">serial()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLLIGO_1_1CTransitionv0" doxytag="NLLIGO::CTransition::TransitionZoneEdges" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a10">sint32</a> <a class="el" href="a03613.html#NLLIGO_1_1CTransitionv0">NLLIGO::CTransition::TransitionZoneEdges</a><code> [static, private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Initial value:</b><div class="fragment"><pre>
{
        {+2, +2, -4, +4},       
        {+4, +2, +2, -3},       
        {+1, +3, +2, -3},       
        {-3, +3, +2, +2},       
        {+1, +1, +3, -4},       
        {+1, +4, -4, +1},       
        {+4, +2, -4, +1},       
        {+4, +2, -3, +1},       
        {+3, -3, +1, +1},       
}
</pre></div>Some static arries. 
<p>

<p>
Definition at line <a class="el" href="a06578.html#l00038">38</a> of file <a class="el" href="a06578.html">transition.cpp</a>.
<p>
Referenced by <a class="el" href="a06578.html#l00068">build()</a>, and <a class="el" href="a06578.html#l00228">check()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLLIGO_1_1CTransitionv1" doxytag="NLLIGO::CTransition::TransitionZoneOffset" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a10">sint32</a> <a class="el" href="a03613.html#NLLIGO_1_1CTransitionv1">NLLIGO::CTransition::TransitionZoneOffset</a><code> [static, private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Initial value:</b><div class="fragment"><pre>
{
        {0, 1},         
        {1, 1},         
        {1, 2},         
        {1, 3},         
        {0, 3},         
        {0, 4},         
        {1, 4},         
        {2, 4},         
        {3, 4},         
}
</pre></div>
<p>
Definition at line <a class="el" href="a06578.html#l00053">53</a> of file <a class="el" href="a06578.html">transition.cpp</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06579.html">transition.h</a><li><a class="el" href="a06578.html">transition.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 12:51:02 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>