aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a04778.html
blob: fb3bf2c6f4a9fde25d03162dd640597aaf0999a9 (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
<!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: primitive_class.cpp File 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>primitive_class.cpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Ligo primitive class description. Give access at common properties for a primitive class. Properties are given in an XML file<p>
<dl compact><dt><b>Id</b></dt><dd><a class="el" href="a04778.html">primitive_class.cpp</a>,v 1.11 2004/01/23 13:39:13 corvazier Exp </dd></dl>

<p>
Definition in file <a class="el" href="a06201.html">primitive_class.cpp</a>.
<p>
<code>#include &lt;<a class="el" href="a06202.html">nel/ligo/primitive_class.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="a06196.html">nel/ligo/primitive.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="a05904.html">nel/ligo/ligo_config.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="a05801.html">nel/misc/i_xml.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="a06168.html">nel/misc/path.h</a>&gt;</code><br>

<p>
<a href="a06201.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>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="a04778.html#a2">ReadBool</a> (const char *propName, bool &amp;result, xmlNodePtr xmlNode, const char *<a class="el" href="a04560.html#a1">filename</a>, CLigoConfig &amp;config)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04778.html#a4">ReadChild</a> (<a class="el" href="a03108.html">CPrimitiveClass::CChild</a> &amp;child, xmlNodePtr childNode, const char *<a class="el" href="a04560.html#a1">filename</a>, bool _static, CLigoConfig &amp;config)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04778.html#a3">ReadColor</a> (<a class="el" href="a03337.html">CRGBA</a> &amp;color, xmlNodePtr node)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04778.html#a0">ReadFloat</a> (const char *propName, float &amp;result, xmlNodePtr xmlNode)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04778.html#a1">ReadInt</a> (const char *propName, int &amp;result, xmlNodePtr xmlNode)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a2" doxytag="primitive_class.cpp::ReadBool" ></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 ReadBool </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>propName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>xmlNodePtr&nbsp;</td>
          <td class="mdname" nowrap> <em>xmlNode</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>CLigoConfig &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>config</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>

<p>
Definition at line <a class="el" href="a06201.html#l00070">70</a> of file <a class="el" href="a06201.html">primitive_class.cpp</a>.
<p>
Referenced by <a class="el" href="a06201.html#l00193">NLLIGO::CPrimitiveClass::read()</a>.
<p>
<div class="fragment"><pre>00071 {
00072         string str;
00073         <span class="keywordflow">if</span> (CIXml::getPropertyString (str, xmlNode, propName))
00074         {
00075                 <span class="keywordflow">if</span> (str == <span class="stringliteral">"true"</span>)
00076                         result = <span class="keyword">true</span>;
00077                 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (str == <span class="stringliteral">"false"</span>)
00078                         result = <span class="keyword">false</span>;
00079                 <span class="keywordflow">else</span>
00080                 {
00081                         config.syntaxError (filename, xmlNode, <span class="stringliteral">"Unknown (%s) parameter (%s), should be false or true"</span>, propName, str.c_str ());
00082                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00083                 }
00084                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00085         }
00086         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00087 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="primitive_class.cpp::ReadChild" ></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 ReadChild </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03108.html">CPrimitiveClass::CChild</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>child</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>xmlNodePtr&nbsp;</td>
          <td class="mdname" nowrap> <em>childNode</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>_static</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>CLigoConfig &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>config</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>

<p>
Definition at line <a class="el" href="a06201.html#l00122">122</a> of file <a class="el" href="a06201.html">primitive_class.cpp</a>.
<p>
References <a class="el" href="a06202.html#l00211">NLLIGO::CPrimitiveClass::CChild::ClassName</a>, <a class="el" href="a06202.html#l00128">NLLIGO::CPrimitiveClass::CInitParameters::DefaultValue</a>, <a class="el" href="a06202.html#l00125">NLLIGO::CPrimitiveClass::CInitParameters::Name</a>, <a class="el" href="a06202.html#l00208">NLLIGO::CPrimitiveClass::CChild::Name</a>, <a class="el" href="a06202.html#l00214">NLLIGO::CPrimitiveClass::CChild::Parameters</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05646.html#l01132">value</a>.
<p>
Referenced by <a class="el" href="a06201.html#l00193">NLLIGO::CPrimitiveClass::read()</a>.
<p>
<div class="fragment"><pre>00123 {
00124         <span class="comment">// Read the class name</span>
00125         <span class="keywordflow">if</span> (config.getPropertyString (child.<a class="code" href="a03108.html#NLLIGO_1_1CPrimitiveClass_1_1CChildo0">ClassName</a>, filename, childNode, <span class="stringliteral">"CLASS_NAME"</span>))
00126         {
00127                 <span class="comment">// Read the name</span>
00128                 <span class="keywordflow">if</span> (!_static || config.getPropertyString (child.<a class="code" href="a03108.html#NLLIGO_1_1CPrimitiveClass_1_1CChildo1">Name</a>, filename, childNode, <span class="stringliteral">"NAME"</span>))
00129                 {
00130                         <span class="comment">// Read the parameters</span>
00131                         xmlNodePtr childParamNode = CIXml::getFirstChildNode (childNode, <span class="stringliteral">"PARAMETER"</span>);
00132                         child.<a class="code" href="a03108.html#NLLIGO_1_1CPrimitiveClass_1_1CChildo2">Parameters</a>.reserve (CIXml::countChildren (childNode, <span class="stringliteral">"PARAMETER"</span>));
00133                         <span class="keywordflow">if</span> (childParamNode)
00134                         {
00135                                 <span class="keywordflow">do</span>
00136                                 {
00137                                         <span class="comment">// Add a static child</span>
00138                                         child.<a class="code" href="a03108.html#NLLIGO_1_1CPrimitiveClass_1_1CChildo2">Parameters</a>.push_back (<a class="code" href="a03109.html">CPrimitiveClass::CInitParameters</a> ());
00139                                         
00140                                         <span class="comment">// Child ref</span>
00141                                         <a class="code" href="a03109.html">CPrimitiveClass::CInitParameters</a> &amp;childParam = child.<a class="code" href="a03108.html#NLLIGO_1_1CPrimitiveClass_1_1CChildo2">Parameters</a>.back ();
00142 
00143                                         <span class="comment">// Read the class name</span>
00144                                         <span class="keywordflow">if</span> (config.getPropertyString (childParam.<a class="code" href="a03109.html#NLLIGO_1_1CPrimitiveClass_1_1CParametero8">Name</a>, filename, childParamNode, <span class="stringliteral">"NAME"</span>))
00145                                         {
00146                                                 <span class="comment">// Read the parameters</span>
00147                                                 xmlNodePtr childParamValueNode = CIXml::getFirstChildNode (childParamNode, <span class="stringliteral">"DEFAULT_VALUE"</span>);
00148                                                 childParam.<a class="code" href="a03109.html#NLLIGO_1_1CPrimitiveClass_1_1CParametero2">DefaultValue</a>.resize (CIXml::countChildren (childParamNode, <span class="stringliteral">"DEFAULT_VALUE"</span>));
00149                                                 <a class="code" href="a04558.html#a15">uint</a> defaultId = 0;
00150                                                 <span class="keywordflow">if</span> (childParamValueNode)
00151                                                 {
00152                                                         <span class="keywordflow">do</span>
00153                                                         {
00154                                                                 <span class="comment">// Gen id flag</span>
00155                                                                 childParam.<a class="code" href="a03109.html#NLLIGO_1_1CPrimitiveClass_1_1CParametero2">DefaultValue</a>[defaultId].GenID = <span class="keyword">false</span>;
00156 
00157                                                                 <span class="comment">// Read the gen id flag</span>
00158                                                                 string <a class="code" href="a04223.html#a658">value</a>;
00159                                                                 <span class="keywordflow">if</span> (CIXml::getPropertyString (value, childParamValueNode, <span class="stringliteral">"GEN_ID"</span>) &amp;&amp; (<a class="code" href="a04223.html#a658">value</a> != <span class="stringliteral">"false"</span>))
00160                                                                 {
00161                                                                         childParam.<a class="code" href="a03109.html#NLLIGO_1_1CPrimitiveClass_1_1CParametero2">DefaultValue</a>[defaultId].GenID = <span class="keyword">true</span>;
00162                                                                 }
00163                                                                 <span class="keywordflow">else</span>
00164                                                                 {
00165                                                                         <span class="keywordflow">if</span> (config.getPropertyString (value, filename, childParamValueNode, <span class="stringliteral">"VALUE"</span>))
00166                                                                         {
00167                                                                                 childParam.<a class="code" href="a03109.html#NLLIGO_1_1CPrimitiveClass_1_1CParametero2">DefaultValue</a>[defaultId].Name = <a class="code" href="a04223.html#a658">value</a>;
00168                                                                         }
00169                                                                         <span class="keywordflow">else</span>
00170                                                                                 <span class="keywordflow">goto</span> failed;
00171                                                                 }
00172                                                                 defaultId++;
00173                                                         }
00174                                                         <span class="keywordflow">while</span> ((childParamValueNode = CIXml::getNextChildNode (childParamValueNode, <span class="stringliteral">"DEFAULT_VALUE"</span>)));
00175                                                 }
00176                                         }
00177                                         <span class="keywordflow">else</span>
00178                                                 <span class="keywordflow">goto</span> failed;
00179                                 }
00180                                 <span class="keywordflow">while</span> ((childParamNode = CIXml::getNextChildNode (childParamNode, <span class="stringliteral">"PARAMETER"</span>)));
00181                         }
00182 
00183                         <span class="comment">// Ok</span>
00184                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00185                 }
00186         }
00187 failed:
00188         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00189 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="primitive_class.cpp::ReadColor" ></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 ReadColor </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03337.html">CRGBA</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>color</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>xmlNodePtr&nbsp;</td>
          <td class="mdname" nowrap> <em>node</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>

<p>
Definition at line <a class="el" href="a06201.html#l00091">91</a> of file <a class="el" href="a06201.html">primitive_class.cpp</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05904.html#l00033">DEFAULT_PRIMITIVE_COLOR</a>, <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a06195.html#l00103">NLLIGO::ReadFloat()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06201.html#l00193">NLLIGO::CPrimitiveClass::read()</a>, and <a class="el" href="a06203.html#l00039">NLLIGO::CPrimitiveConfigurations::read()</a>.
<p>
<div class="fragment"><pre>00092 {
00093         <span class="comment">// Read the color</span>
00094         <span class="keywordtype">float</span> <a class="code" href="a04223.html#a628">r</a> = <a class="code" href="a04481.html#a0">DEFAULT_PRIMITIVE_COLOR</a>.R;
00095         <span class="keywordtype">float</span> g = <a class="code" href="a04481.html#a0">DEFAULT_PRIMITIVE_COLOR</a>.G;
00096         <span class="keywordtype">float</span> b = <a class="code" href="a04481.html#a0">DEFAULT_PRIMITIVE_COLOR</a>.B;
00097         <span class="keywordtype">float</span> a = <a class="code" href="a04481.html#a0">DEFAULT_PRIMITIVE_COLOR</a>.A;
00098 
00099         <span class="comment">// Read the value</span>
00100         <span class="keywordflow">if</span> (!<a class="code" href="a04778.html#a0">ReadFloat</a> (<span class="stringliteral">"R"</span>, r, node))
00101                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00102         <span class="keywordflow">if</span> (!<a class="code" href="a04778.html#a0">ReadFloat</a> (<span class="stringliteral">"G"</span>, g, node))
00103                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00104         <span class="keywordflow">if</span> (!<a class="code" href="a04778.html#a0">ReadFloat</a> (<span class="stringliteral">"B"</span>, b, node))
00105                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00106         <span class="keywordflow">if</span> (!<a class="code" href="a04778.html#a0">ReadFloat</a> (<span class="stringliteral">"A"</span>, a, node))
00107                 a = 255;
00108 
00109         <span class="comment">// Clamp</span>
00110         <a class="code" href="a05378.html#a374">clamp</a> (r, 0.f, 255.f);
00111         <a class="code" href="a05378.html#a374">clamp</a> (g, 0.f, 255.f);
00112         <a class="code" href="a05378.html#a374">clamp</a> (b, 0.f, 255.f);
00113         <a class="code" href="a05378.html#a374">clamp</a> (a, 0.f, 255.f);
00114 
00115         <span class="comment">// Set</span>
00116         color.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>((<a class="code" href="a04558.html#a7">uint8</a>)r, (<a class="code" href="a04558.html#a7">uint8</a>)g, (<a class="code" href="a04558.html#a7">uint8</a>)b, (<a class="code" href="a04558.html#a7">uint8</a>)a);
00117         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00118 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a0" doxytag="primitive_class.cpp::ReadFloat" ></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 ReadFloat </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>propName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>xmlNodePtr&nbsp;</td>
          <td class="mdname" nowrap> <em>xmlNode</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>

<p>
Definition at line <a class="el" href="a06201.html#l00044">44</a> of file <a class="el" href="a06201.html">primitive_class.cpp</a>.
<p>
References <a class="el" href="a05646.html#l01132">value</a>.
<p>
<div class="fragment"><pre>00045 {
00046         string <a class="code" href="a04223.html#a658">value</a>;
00047         <span class="keywordflow">if</span> (CIXml::getPropertyString (value, xmlNode, propName))
00048         {
00049                 result = (<span class="keywordtype">float</span>)atof (<a class="code" href="a04223.html#a658">value</a>.c_str ());
00050                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00051         }
00052         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00053 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="primitive_class.cpp::ReadInt" ></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 ReadInt </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>propName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>xmlNodePtr&nbsp;</td>
          <td class="mdname" nowrap> <em>xmlNode</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>

<p>
Definition at line <a class="el" href="a06201.html#l00057">57</a> of file <a class="el" href="a06201.html">primitive_class.cpp</a>.
<p>
References <a class="el" href="a05646.html#l01132">value</a>.
<p>
Referenced by <a class="el" href="a06201.html#l00193">NLLIGO::CPrimitiveClass::read()</a>.
<p>
<div class="fragment"><pre>00058 {
00059         string <a class="code" href="a04223.html#a658">value</a>;
00060         <span class="keywordflow">if</span> (CIXml::getPropertyString (value, xmlNode, propName))
00061         {
00062                 result = atoi (<a class="code" href="a04223.html#a658">value</a>.c_str ());
00063                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00064         }
00065         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00066 }
</pre></div>    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:43:12 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>