aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a05376.html
blob: 02037211e9e5dbd580dadc94c49f1eaffcb7befc (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
<!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: NLLOGIC Namespace 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>NLLOGIC Namespace Reference</h1>
<p>

<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02815.html">CLogicComparisonBlock</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02816.html">CLogicCondition</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02817.html">CLogicConditionLogicBlock</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02818.html">CLogicConditionNode</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02819.html">CLogicCounter</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02821.html">CLogicEvent</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02822.html">CLogicEventAction</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02823.html">CLogicEventMessage</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html">CLogicState</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02825.html">CLogicStateMachine</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02820.html">CLogicVariable</a></td></tr>

<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
 <a class="el" href="a02189.html">NLMISC::CEntityId</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05376.html#a0">TSIdMap</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">map destination names to destination sid  <a href="#a0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05376.html#a3">getXMLProp</a> (xmlNodePtr node, const char *propName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05376.html#a1">testNameWithFilter</a> (<a class="el" href="a04558.html#a6">sint8</a> filter, string motif, string varName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05376.html#a2">xmlCheckNodeName</a> (xmlNodePtr &amp;node, const char *nodeName)</td></tr>

</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="a0" doxytag="NLLOGIC::TSIdMap" ></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"> typedef std::map&lt;std::string, <a class="el" href="a02189.html">NLMISC::CEntityId</a>&gt; <a class="el" href="a05376.html#a0">NLLOGIC::TSIdMap</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
map destination names to destination sid 
<p>

<p>
Definition at line <a class="el" href="a05953.html#l00047">47</a> of file <a class="el" href="a05953.html">logic_state.h</a>.
<p>
Referenced by <a class="el" href="a05954.html#l00151">NLLOGIC::CLogicStateMachine::addSIdMap()</a>, and <a class="el" href="a05952.html#l00096">NLLOGIC::CLogicState::addSIdMap()</a>.    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a3" doxytag="NLLOGIC::getXMLProp" ></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"> std::string NLLOGIC::getXMLProp </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">xmlNodePtr&nbsp;</td>
          <td class="mdname" nowrap> <em>node</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>propName</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="a05954.html#l00072">72</a> of file <a class="el" href="a05954.html">logic_state_machine.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00111">nlinfo</a>, and <a class="el" href="a05586.html#l00161">NLMISC::smprintf()</a>.
<p>
Referenced by <a class="el" href="a05956.html#l00387">NLLOGIC::CLogicCounter::read()</a>, <a class="el" href="a05956.html#l00147">NLLOGIC::CLogicVariable::read()</a>, <a class="el" href="a05954.html#l00571">NLLOGIC::CLogicStateMachine::read()</a>, <a class="el" href="a05952.html#l00379">NLLOGIC::CLogicState::read()</a>, <a class="el" href="a05948.html#l00250">NLLOGIC::CLogicEvent::read()</a>, <a class="el" href="a05948.html#l00132">NLLOGIC::CLogicEventAction::read()</a>, <a class="el" href="a05948.html#l00068">NLLOGIC::CLogicEventMessage::read()</a>, <a class="el" href="a05946.html#l00610">NLLOGIC::CLogicCondition::read()</a>, <a class="el" href="a05946.html#l00470">NLLOGIC::CLogicConditionNode::read()</a>, <a class="el" href="a05946.html#l00265">NLLOGIC::CLogicConditionLogicBlock::read()</a>, and <a class="el" href="a05946.html#l00107">NLLOGIC::CLogicComparisonBlock::read()</a>.
<p>
<div class="fragment"><pre>00073 {
00074         <span class="keyword">const</span> <span class="keywordtype">char</span> *name = (<span class="keyword">const</span> <span class="keywordtype">char</span>*)xmlGetProp (node, (xmlChar*)propName);
00075         <span class="keywordflow">if</span> (name)
00076         {
00077                 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"get prop %s = %s"</span>, propName, name);
00078                 string n = name;
00079                 xmlFree ((<span class="keywordtype">void</span>*)name);
00080                 <span class="keywordflow">return</span> n;
00081         }
00082         <span class="keywordflow">else</span>
00083         {
00084                 <span class="comment">// Make an error message</span>
00085                 <span class="keywordtype">char</span> tmp[512];
00086                 <a class="code" href="a05378.html#a259">smprintf</a> (tmp, 512, <span class="stringliteral">"LogicStateMachine XML Syntax error in block %s line %d, aguments Name not found"</span>, 
00087                         node-&gt;name, (<span class="keywordtype">int</span>)node-&gt;content);
00088                 <span class="keywordflow">throw</span> <a class="code" href="a03830.html">EXmlParsingError</a> (tmp);
00089                 <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
00090         }
00091 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="NLLOGIC::testNameWithFilter" ></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 NLLOGIC::testNameWithFilter </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>filter</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>string&nbsp;</td>
          <td class="mdname" nowrap> <em>motif</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>string&nbsp;</td>
          <td class="mdname" nowrap> <em>varName</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="a05954.html#l00497">497</a> of file <a class="el" href="a05954.html">logic_state_machine.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00095">sint8</a>.
<p>
Referenced by <a class="el" href="a05954.html#l00398">NLLOGIC::CLogicStateMachine::setVerbose()</a>.
<p>
<div class="fragment"><pre>00498 {
00499         <span class="keywordflow">if</span>( varName.size() &gt; motif.size() )
00500         {
00501                 <span class="keywordflow">switch</span>( filter )
00502                 {
00503                         <span class="comment">// *xxx*</span>
00504                         <span class="keywordflow">case</span> 0 :
00505                         {
00506                                 <span class="keywordflow">if</span>(varName.find(motif) != -1)
00507                                 {
00508                                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00509                                 }
00510                         }
00511                         <span class="keywordflow">break</span>;
00512 
00513                         <span class="comment">// *xxx</span>
00514                         <span class="keywordflow">case</span> 1 :
00515                         {
00516                                 <a class="code" href="a04558.html#a14">sint</a> beginIndex = varName.size() - motif.size() - 1;
00517                                 string endOfVarName = varName.substr(beginIndex,motif.size());
00518                                 <span class="keywordflow">if</span>( endOfVarName == motif )
00519                                 {
00520                                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00521                                 }
00522                         }
00523                         <span class="keywordflow">break</span>;
00524         
00525                         <span class="comment">// xxx*</span>
00526                         <span class="keywordflow">case</span> 2 :
00527                         {
00528                                 string beginOfVarName = varName.substr(0,motif.size());
00529                                 <span class="keywordflow">if</span>( beginOfVarName == motif )
00530                                 {
00531                                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00532                                 }
00533                         }
00534                         <span class="keywordflow">break</span>;
00535                 }
00536         }
00537 
00538         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00539 
00540 } <span class="comment">// testNameWithFilter //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="NLLOGIC::xmlCheckNodeName" ></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 NLLOGIC::xmlCheckNodeName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">xmlNodePtr &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>node</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>nodeName</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="a05954.html#l00042">42</a> of file <a class="el" href="a05954.html">logic_state_machine.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, and <a class="el" href="a05586.html#l00161">NLMISC::smprintf()</a>.
<p>
Referenced by <a class="el" href="a05956.html#l00387">NLLOGIC::CLogicCounter::read()</a>, <a class="el" href="a05956.html#l00147">NLLOGIC::CLogicVariable::read()</a>, <a class="el" href="a05954.html#l00571">NLLOGIC::CLogicStateMachine::read()</a>, <a class="el" href="a05952.html#l00379">NLLOGIC::CLogicState::read()</a>, <a class="el" href="a05948.html#l00250">NLLOGIC::CLogicEvent::read()</a>, <a class="el" href="a05948.html#l00132">NLLOGIC::CLogicEventAction::read()</a>, <a class="el" href="a05948.html#l00068">NLLOGIC::CLogicEventMessage::read()</a>, <a class="el" href="a05946.html#l00610">NLLOGIC::CLogicCondition::read()</a>, <a class="el" href="a05946.html#l00470">NLLOGIC::CLogicConditionNode::read()</a>, <a class="el" href="a05946.html#l00265">NLLOGIC::CLogicConditionLogicBlock::read()</a>, and <a class="el" href="a05946.html#l00107">NLLOGIC::CLogicComparisonBlock::read()</a>.
<p>
<div class="fragment"><pre>00043 {
00044         <span class="comment">// Check node name</span>
00045         <span class="keywordflow">if</span> ( node == NULL || ((<span class="keyword">const</span> <span class="keywordtype">char</span>*)node-&gt;name == NULL) || (strcmp ((<span class="keyword">const</span> <span class="keywordtype">char</span>*)node-&gt;name, nodeName) != 0) )
00046         {
00047 
00048                 <span class="comment">// try to find a child</span>
00049                 <span class="keywordflow">if</span> (node != NULL)
00050                 {
00051                         node = CIXml::getFirstChildNode (node, nodeName);
00052                         <span class="keywordflow">if</span> ( node != NULL &amp;&amp; ((<span class="keyword">const</span> <span class="keywordtype">char</span>*)node-&gt;name != NULL) &amp;&amp; (strcmp ((<span class="keyword">const</span> <span class="keywordtype">char</span>*)node-&gt;name, nodeName) == 0) )
00053                         {
00054                                 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"check node %s ok in the child"</span>, nodeName);
00055                                 <span class="keywordflow">return</span>;
00056                         }
00057                 }
00058 
00059                 <span class="comment">// Make an error message</span>
00060                 <span class="keywordtype">char</span> tmp[512];
00061                 <a class="code" href="a05378.html#a259">smprintf</a> (tmp, 512, <span class="stringliteral">"LogicStateMachine STATE_MACHINE XML Syntax error in block line %d, node %s should be %s"</span>, 
00062                         (<span class="keywordtype">int</span>)node-&gt;content, node-&gt;name, nodeName);
00063                 
00064                 <a class="code" href="a04199.html#a1">nlinfo</a> (tmp);
00065                 <a class="code" href="a04199.html#a12">nlstop</a>;
00066                 <span class="keywordflow">throw</span> <a class="code" href="a03830.html">EXmlParsingError</a> (tmp);
00067         }
00068 
00069         <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"check node %s ok"</span>, nodeName);
00070 }
</pre></div>    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 12:52:48 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>