aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02824.html
blob: 51e9702f758225a89215a95dd30c34af147dbdeb (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
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
<!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::CLogicState 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>NLLOGIC::CLogicState Class Reference</h1><code>#include &lt;<a class="el" href="a05953.html">logic_state.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="a02824.html">CLogicState</a><p>
<dl compact><dt><b>Author:</b></dt><dd>Stephane Coutelas <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="a05953.html#l00056">56</a> of file <a class="el" href="a05953.html">logic_state.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea0">addEvent</a> (<a class="el" href="a02821.html">CLogicEvent</a> event)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea1">addSIdMap</a> (const <a class="el" href="a05376.html#a0">TSIdMap</a> &amp;sIdMap)</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea3">enterState</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea4">exitState</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea5">fillVarMap</a> (std::multimap&lt; <a class="el" href="a02189.html">NLMISC::CEntityId</a>, std::string &gt; &amp;stateMachineVariables)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea6">getMessagesToSend</a> (std::multimap&lt; <a class="el" href="a02189.html">NLMISC::CEntityId</a>, <a class="el" href="a02918.html">NLNET::CMessage</a> &gt; &amp;msgs)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea7">getName</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea8">processLogic</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea9">read</a> (xmlNodePtr node)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea10">setLogicStateMachine</a> (<a class="el" href="a02825.html">CLogicStateMachine</a> *logicStateMachine)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea11">setName</a> (std::string name)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea12">trySendEntryMessages</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea13">trySendEventMessages</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStatea14">write</a> (xmlNodePtr node) const </td></tr>

<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02823.html">CLogicEventMessage</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">entry messages  <a href="#NLLOGIC_1_1CLogicStateo0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02821.html">CLogicEvent</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">logic  <a href="#NLLOGIC_1_1CLogicStateo1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02823.html">CLogicEventMessage</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">exit messages  <a href="#NLLOGIC_1_1CLogicStateo2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02825.html">CLogicStateMachine</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo3">_LogicStateMachine</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">state machine containing this state  <a href="#NLLOGIC_1_1CLogicStateo3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::multimap&lt; <a class="el" href="a02189.html">NLMISC::CEntityId</a>,<br>
 <a class="el" href="a02918.html">NLNET::CMessage</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo4">_MessagesToSend</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">messages to send by the service  <a href="#NLLOGIC_1_1CLogicStateo4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo5">_StateName</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">state name  <a href="#NLLOGIC_1_1CLogicStateo5"></a><br><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea2" doxytag="NLLOGIC::CLogicState::CLogicState" ></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"> NLLOGIC::CLogicState::CLogicState </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
Default constructor
<p>
Definition at line <a class="el" href="a05952.html#l00042">42</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00061">_StateName</a>.
<p>
<div class="fragment"><pre>00043 {
00044         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo5">_StateName</a> = <span class="stringliteral">"no_state"</span>;
00045         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo3">_LogicStateMachine</a> = 0;
00046 
00047 } <span class="comment">// CLogicState //</span>
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea0" doxytag="NLLOGIC::CLogicState::addEvent" ></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::CLogicState::addEvent </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02821.html">CLogicEvent</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>event</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>
Add an event<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>event</em>&nbsp;</td><td>is the event to add</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a05952.html#l00081">81</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05948.html#l00175">NLLOGIC::CLogicEvent::setLogicStateMachine()</a>.
<p>
<div class="fragment"><pre>00082 { 
00083         event.setLogicStateMachine( _LogicStateMachine );
00084         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.push_back( event ); 
00085 
00086 } <span class="comment">// addEvent //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea1" doxytag="NLLOGIC::CLogicState::addSIdMap" ></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::CLogicState::addSIdMap </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a05376.html#a0">TSIdMap</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>sIdMap</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>
Associate message destination name with sid<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>sIdMap</em>&nbsp;</td><td>is the map associating destination name with a destination id</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a05952.html#l00096">96</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00064">_EntryMessages</a>, <a class="el" href="a05953.html#l00067">_ExitMessages</a>, <a class="el" href="a05952.html#l00239">trySendEntryMessages()</a>, <a class="el" href="a05952.html#l00265">trySendEventMessages()</a>, and <a class="el" href="a05953.html#l00047">NLLOGIC::TSIdMap</a>.
<p>
<div class="fragment"><pre>00097 {
00098         vector&lt;CLogicEventMessage&gt;::iterator itMsg;
00099 
00101         <span class="keywordflow">for</span>( itMsg = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.begin(); itMsg != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.end(); ++itMsg )
00102         {
00103                 TSIdMap::const_iterator itId = sIdMap.find( (*itMsg).Destination );
00104                 <span class="comment">// if message destination exists in the map we associate the sid with the message</span>
00105                 <span class="keywordflow">if</span>( itId != sIdMap.end() )
00106                 {
00107                         (*itMsg).DestinationId = (*itId).second;
00108                 }
00109         }
00111         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStatea12">trySendEntryMessages</a>();
00112                 
00113 
00114         <span class="comment">// event messages</span>
00115         vector&lt;CLogicEvent&gt;::iterator itEvt;
00116         <span class="keywordflow">for</span>( itEvt = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.begin(); itEvt != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.end(); ++itEvt )
00117         {
00118                 string dest = (*itEvt).EventAction.EventMessage.Destination;
00119                 TSIdMap::const_iterator itId = sIdMap.find( dest );
00120                 <span class="comment">// if message destination exists in the map we associate the sid with the message</span>
00121                 <span class="keywordflow">if</span>( itId != sIdMap.end() )
00122                 {
00123                         (*itEvt).EventAction.EventMessage.DestinationId = (*itId).second;
00124                 }
00125         }
00127         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStatea13">trySendEventMessages</a>();
00128 
00129 
00131         <span class="keywordflow">for</span>( itMsg = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.begin(); itMsg != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.end(); ++itMsg )
00132         {
00133                 TSIdMap::const_iterator itId = sIdMap.find( (*itMsg).Destination );
00134                 <span class="comment">// if message destination exists in the map we associate the sid with the message</span>
00135                 <span class="keywordflow">if</span>( itId != sIdMap.end() )
00136                 {
00137                         (*itMsg).DestinationId = (*itId).second;
00138                 }
00139         }
00140         
00141 } <span class="comment">// addSIdMap //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea3" doxytag="NLLOGIC::CLogicState::enterState" ></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::CLogicState::enterState </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
send the entry messages
<p>
Definition at line <a class="el" href="a05952.html#l00184">184</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05952.html#l00239">trySendEntryMessages()</a>.
<p>
<div class="fragment"><pre>00185 {
00187         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStatea12">trySendEntryMessages</a>();
00188 
00189 } <span class="comment">// enterState //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea4" doxytag="NLLOGIC::CLogicState::exitState" ></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::CLogicState::exitState </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
send the exit messages
<p>
Definition at line <a class="el" href="a05952.html#l00196">196</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00064">_EntryMessages</a>, <a class="el" href="a05953.html#l00067">_ExitMessages</a>, <a class="el" href="a05953.html#l00076">_MessagesToSend</a>, and <a class="el" href="a05979.html#l00420">NLMISC::CMemStream::serial()</a>.
<p>
<div class="fragment"><pre>00197 {
00198         vector&lt;CLogicEventMessage&gt;::iterator itMsg;
00199         <span class="keywordflow">for</span>( itMsg = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.begin(); itMsg != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.end(); ++itMsg )
00200         {
00201                 <span class="keywordflow">if</span>( (*itMsg).DestinationId != <a class="code" href="a02189.html">CEntityId</a>() )
00202                 {
00203                         <a class="code" href="a02918.html">CMessage</a> msgOut( (*itMsg).MessageId );
00204                         msgOut.<a class="code" href="a02271.html#NLNET_1_1CMessagea41">serial</a>( (*itMsg).Arguments );
00205                         
00206                         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo4">_MessagesToSend</a>.insert( make_pair((*itMsg).DestinationId,msgOut) );
00207                 }
00208         }
00209 
00210         <span class="comment">// reset the entry messages send status</span>
00211         <span class="keywordflow">for</span>( itMsg = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.begin(); itMsg != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.end(); ++itMsg )
00212         {
00213                 (*itMsg).ToSend = <span class="keyword">false</span>;
00214                 (*itMsg).Sent = <span class="keyword">false</span>;
00215         }
00216 
00217         <span class="comment">// reset all events</span>
00218         vector&lt;CLogicEvent&gt;::iterator itEvent;
00219         <span class="keywordflow">for</span>( itEvent = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.begin(); itEvent != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.end(); ++itEvent )
00220         {
00221                 (*itEvent).reset();
00222         }
00223 
00224         <span class="comment">// reset the exit messages send status</span>
00225         <span class="keywordflow">for</span>( itMsg = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.begin(); itMsg != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.end(); ++itMsg )
00226         {
00227                 (*itMsg).ToSend = <span class="keyword">false</span>;
00228                 (*itMsg).Sent = <span class="keyword">false</span>;
00229         }
00230         
00231 } <span class="comment">// exitState //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea5" doxytag="NLLOGIC::CLogicState::fillVarMap" ></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::CLogicState::fillVarMap </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::multimap&lt; <a class="el" href="a02189.html">NLMISC::CEntityId</a>, std::string &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>stateMachineVariables</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>
Fill a map associating all the referenced var in the state with the id of service managing them (debug purpose)
<p>
Definition at line <a class="el" href="a05952.html#l00315">315</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05646.html#l00405">condition</a>, and <a class="el" href="a05954.html#l00233">NLLOGIC::CLogicStateMachine::getCondition()</a>.
<p>
<div class="fragment"><pre>00316 {
00317         <span class="comment">// events</span>
00318         vector&lt;CLogicEvent&gt;::iterator itEvt;
00319         <span class="keywordflow">for</span>( itEvt = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.begin(); itEvt != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.end(); ++itEvt )
00320         {
00321                 <span class="comment">// get the condition used in the event</span>
00322                 CLogicCondition <a class="code" href="a04223.html#a584">condition</a>;
00323                 <span class="keywordflow">if</span>( <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo3">_LogicStateMachine</a>-&gt;getCondition((*itEvt).ConditionName,condition) )
00324                 {
00325                         <span class="comment">// get vars used in the conditions</span>
00326                         set&lt;string&gt; condVars;
00327                         <a class="code" href="a04223.html#a584">condition</a>.fillVarSet( condVars );
00328 
00329                         <span class="comment">// add var with related service</span>
00330                         set&lt;string&gt;::iterator itCV;
00331                         <span class="keywordflow">for</span>( itCV = condVars.begin(); itCV != condVars.end(); ++itCV )
00332                         {
00333                                 stateMachineVariables.insert( make_pair((*itEvt).EventAction.EventMessage.DestinationId,*itCV) );
00334                         }
00335                 }
00336         }
00337 
00338 } <span class="comment">// fillVarMap //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea6" doxytag="NLLOGIC::CLogicState::getMessagesToSend" ></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::CLogicState::getMessagesToSend </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::multimap&lt; <a class="el" href="a02189.html">NLMISC::CEntityId</a>, <a class="el" href="a02918.html">NLNET::CMessage</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>msgs</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>
Get the messages to send<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>msgs</em>&nbsp;</td><td>is the map associating all the message to send with their destination id</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a05952.html#l00296">296</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00076">_MessagesToSend</a>.
<p>
<div class="fragment"><pre>00297 {
00298         multimap&lt;CEntityId,CMessage&gt;::iterator itMsg;
00299         <span class="keywordflow">for</span>( itMsg = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo4">_MessagesToSend</a>.begin(); itMsg != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo4">_MessagesToSend</a>.end(); ++itMsg )
00300         {
00301                 msgs.insert( *itMsg );
00302         }
00303 
00304         <span class="comment">// erase all the messages</span>
00305         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo4">_MessagesToSend</a>.clear();
00306 
00307 } <span class="comment">// getMessagesToSend //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea7" doxytag="NLLOGIC::CLogicState::getName" ></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::CLogicState::getName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

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

<p>
get the state name<p>
<dl compact><dt><b>Returns:</b></dt><dd>the state's name</dd></dl>

<p>
Definition at line <a class="el" href="a05953.html#l00104">104</a> of file <a class="el" href="a05953.html">logic_state.h</a>.
<p>
References <a class="el" href="a05953.html#l00061">_StateName</a>.
<p>
Referenced by <a class="el" href="a05954.html#l00137">NLLOGIC::CLogicStateMachine::addState()</a>.
<p>
<div class="fragment"><pre>00104 { <span class="keywordflow">return</span> <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo5">_StateName</a>; }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea8" doxytag="NLLOGIC::CLogicState::processLogic" ></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::CLogicState::processLogic </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
Test the conditions of this state
<p>
Definition at line <a class="el" href="a05952.html#l00148">148</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05954.html#l00098">NLLOGIC::CLogicStateMachine::setCurrentState()</a>, and <a class="el" href="a05952.html#l00265">trySendEventMessages()</a>.
<p>
<div class="fragment"><pre>00149 {
00150         <span class="comment">// test all conditions managed by this state</span>
00151         vector&lt;CLogicEvent&gt;::iterator itEvent;
00152         <span class="keywordflow">for</span>( itEvent = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.begin(); itEvent != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.end(); ++itEvent )
00153         {
00154                 <span class="keywordflow">if</span>( (*itEvent).testCondition() )
00155                 {
00156                         <span class="comment">//nlinfo("The condition %s is valid",(*itEvent).ConditionName.c_str());</span>
00157                         <span class="keywordflow">if</span>( (*itEvent).EventAction.IsStateChange )
00158                         {
00159                                 <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo3">_LogicStateMachine</a>-&gt;setCurrentState( (*itEvent).EventAction.StateChange );
00160                         }
00161                         <span class="keywordflow">else</span>
00162                         {
00163                                 <span class="comment">// this message will be sent as soon as the dest id will be given</span>
00164                                 (*itEvent).EventAction.enableSendMessage();
00165 
00167                                 <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStatea13">trySendEventMessages</a>();
00168                         }
00169                 }
00170                 <span class="keywordflow">else</span>
00171                 {
00172                         <span class="comment">// reset message send status here to be able to send messages several times in the logic state</span>
00173                         <span class="comment">// --&gt; this has to be done if we want messages to be sent every time the condition becomes verified</span>
00174                 }
00175         }
00176 
00177 } <span class="comment">// processLogic //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea9" doxytag="NLLOGIC::CLogicState::read" ></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::CLogicState::read </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">xmlNodePtr&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>node</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>

<p>
Definition at line <a class="el" href="a05952.html#l00379">379</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00064">_EntryMessages</a>, <a class="el" href="a05953.html#l00067">_ExitMessages</a>, <a class="el" href="a05953.html#l00061">_StateName</a>, <a class="el" href="a05954.html#l00072">NLLOGIC::getXMLProp()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00237">v</a>, and <a class="el" href="a05954.html#l00042">NLLOGIC::xmlCheckNodeName()</a>.
<p>
<div class="fragment"><pre>00380 {
00381         <a class="code" href="a05376.html#a2">xmlCheckNodeName</a> (node, <span class="stringliteral">"STATE"</span>);
00382 
00383         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo5">_StateName</a> = <a class="code" href="a05376.html#a3">getXMLProp</a> (node, <span class="stringliteral">"Name"</span>);
00384 
00385         {
00386                 <span class="comment">// Count the parent</span>
00387                 <a class="code" href="a04558.html#a15">uint</a> nb = CIXml::countChildren (node, <span class="stringliteral">"ENTRY_EVENT_MESSAGE"</span>);
00388                 <a class="code" href="a04558.html#a15">uint</a> i = 0;
00389                 xmlNodePtr parent = CIXml::getFirstChildNode (node, <span class="stringliteral">"ENTRY_EVENT_MESSAGE"</span>);
00390                 <span class="keywordflow">while</span> (i&lt;nb)
00391                 {
00392                         CLogicEventMessage <a class="code" href="a04223.html#a576">v</a>;
00393                         <a class="code" href="a04223.html#a576">v</a>.read(parent);
00394                         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.push_back(v);
00395 
00396                         <span class="comment">// Next parent</span>
00397                         parent = CIXml::getNextChildNode (parent, <span class="stringliteral">"ENTRY_EVENT_MESSAGE"</span>);
00398                         i++;
00399                 }
00400         }
00401         
00402         {
00403                 <span class="comment">// Count the parent</span>
00404                 <a class="code" href="a04558.html#a15">uint</a> nb = CIXml::countChildren (node, <span class="stringliteral">"EXIT_EVENT_MESSAGE"</span>);
00405                 <a class="code" href="a04558.html#a15">uint</a> i = 0;
00406                 xmlNodePtr parent = CIXml::getFirstChildNode (node, <span class="stringliteral">"EXIT_EVENT_MESSAGE"</span>);
00407                 <span class="keywordflow">while</span> (i&lt;nb)
00408                 {
00409                         CLogicEventMessage <a class="code" href="a04223.html#a576">v</a>;
00410                         <a class="code" href="a04223.html#a576">v</a>.read(parent);
00411                         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.push_back(v);
00412 
00413                         <span class="comment">// Next parent</span>
00414                         parent = CIXml::getNextChildNode (parent, <span class="stringliteral">"EXIT_EVENT_MESSAGE"</span>);
00415                         i++;
00416                 }
00417         }
00418 
00419         {
00420                 <span class="comment">// Count the parent</span>
00421                 <a class="code" href="a04558.html#a15">uint</a> nb = CIXml::countChildren (node, <span class="stringliteral">"EVENT"</span>);
00422                 <a class="code" href="a04558.html#a15">uint</a> i = 0;
00423                 xmlNodePtr parent = CIXml::getFirstChildNode (node, <span class="stringliteral">"EVENT"</span>);
00424                 <span class="keywordflow">while</span> (i&lt;nb)
00425                 {
00426                         CLogicEvent <a class="code" href="a04223.html#a576">v</a>;
00427                         <a class="code" href="a04223.html#a576">v</a>.read(parent);
00428                         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.push_back(v);
00429 
00430                         <span class="comment">// Next parent</span>
00431                         parent = CIXml::getNextChildNode (parent, <span class="stringliteral">"EVENT"</span>);
00432                         i++;
00433                 }
00434         }
00435 
00436 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea10" doxytag="NLLOGIC::CLogicState::setLogicStateMachine" ></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::CLogicState::setLogicStateMachine </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02825.html">CLogicStateMachine</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>logicStateMachine</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>
Set the state machine which contains this state<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>logicStateMachine</em>&nbsp;</td><td>is the state machine containing this block</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a05952.html#l00054">54</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00135">nlwarning</a>.
<p>
Referenced by <a class="el" href="a05954.html#l00137">NLLOGIC::CLogicStateMachine::addState()</a>.
<p>
<div class="fragment"><pre>00055 { 
00056         <span class="keywordflow">if</span>( logicStateMachine == 0 )
00057         {
00058                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"(LOGIC)&lt;CLogicCondition::setLogicStateMachine&gt; The state machine is null"</span>);
00059         }
00060         <span class="keywordflow">else</span>
00061         {
00062                 <span class="comment">// init the logic state machine for this state</span>
00063                 <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo3">_LogicStateMachine</a> = logicStateMachine; 
00064 
00065                 <span class="comment">// init the logic state machine in each event</span>
00066                 vector&lt;CLogicEvent&gt;::iterator itEvent;
00067                 <span class="keywordflow">for</span>( itEvent = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.begin(); itEvent != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.end(); ++itEvent )
00068                 {
00069                         (*itEvent).setLogicStateMachine( logicStateMachine );
00070                 }
00071         }
00072 
00073 } <span class="comment">// setLogicStateMachine //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea11" doxytag="NLLOGIC::CLogicState::setName" ></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::CLogicState::setName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::string&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>name</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

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

<p>
set the state name<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>name</em>&nbsp;</td><td>is the new state's name</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a05953.html#l00097">97</a> of file <a class="el" href="a05953.html">logic_state.h</a>.
<p>
References <a class="el" href="a05953.html#l00061">_StateName</a>.
<p>
<div class="fragment"><pre>00097 { <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo5">_StateName</a> = name; }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea12" doxytag="NLLOGIC::CLogicState::trySendEntryMessages" ></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::CLogicState::trySendEntryMessages </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
Try to send the entry messages
<p>
Definition at line <a class="el" href="a05952.html#l00239">239</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00064">_EntryMessages</a>, <a class="el" href="a05953.html#l00076">_MessagesToSend</a>, and <a class="el" href="a05979.html#l00420">NLMISC::CMemStream::serial()</a>.
<p>
Referenced by <a class="el" href="a05952.html#l00096">addSIdMap()</a>, and <a class="el" href="a05952.html#l00184">enterState()</a>.
<p>
<div class="fragment"><pre>00240 {
00242         vector&lt;CLogicEventMessage&gt;::iterator itMsg;
00243         <span class="keywordflow">for</span>( itMsg = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.begin(); itMsg != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.end(); ++itMsg )
00244         {
00245                 <span class="keywordflow">if</span>( !(*itMsg).Sent &amp;&amp; (*itMsg).DestinationId.getType() != 0xfe )
00246                 {
00247                         <a class="code" href="a02918.html">CMessage</a> msgOut( (*itMsg).MessageId );
00248                         msgOut.<a class="code" href="a02271.html#NLNET_1_1CMessagea41">serial</a>( (*itMsg).Arguments );
00249 
00250                         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo4">_MessagesToSend</a>.insert( make_pair((*itMsg).DestinationId,msgOut) );
00251                         
00252                         (*itMsg).ToSend = <span class="keyword">false</span>;
00253                         (*itMsg).Sent = <span class="keyword">true</span>;
00254                 }
00255         }
00256 
00257 } <span class="comment">// trySendEntryMessages //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea13" doxytag="NLLOGIC::CLogicState::trySendEventMessages" ></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::CLogicState::trySendEventMessages </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
Try to send the event messages
<p>
Definition at line <a class="el" href="a05952.html#l00265">265</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00076">_MessagesToSend</a>, and <a class="el" href="a05979.html#l00420">NLMISC::CMemStream::serial()</a>.
<p>
Referenced by <a class="el" href="a05952.html#l00096">addSIdMap()</a>, and <a class="el" href="a05952.html#l00148">processLogic()</a>.
<p>
<div class="fragment"><pre>00266 {
00267         <span class="comment">// test all conditions managed by this state</span>
00268         vector&lt;CLogicEvent&gt;::iterator itEvent;
00269         <span class="keywordflow">for</span>( itEvent = <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.begin(); itEvent != <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.end(); ++itEvent )
00270         {
00271                 <span class="keywordflow">if</span>( (*itEvent).EventAction.EventMessage.ToSend == <span class="keyword">true</span> )
00272                 {
00273                         <span class="keywordflow">if</span>( (*itEvent).EventAction.EventMessage.Sent == <span class="keyword">false</span> )
00274                         {
00275                                 <span class="keywordflow">if</span>( (*itEvent).EventAction.EventMessage.DestinationId.getType() != 0xfe )
00276                                 {
00277                                         <a class="code" href="a02918.html">CMessage</a> msgOut( (*itEvent).EventAction.EventMessage.MessageId );
00278                                         msgOut.<a class="code" href="a02271.html#NLNET_1_1CMessagea41">serial</a>( (*itEvent).EventAction.EventMessage.Arguments );
00279                                         
00280                                         <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo4">_MessagesToSend</a>.insert( make_pair((*itEvent).EventAction.EventMessage.DestinationId,msgOut) );
00281 
00282                                         (*itEvent).EventAction.EventMessage.ToSend = <span class="keyword">false</span>;
00283                                         (*itEvent).EventAction.EventMessage.Sent = <span class="keyword">true</span>;
00284                                 }
00285                         }
00286                 }
00287         }
00288 
00289 } <span class="comment">// trySendEventMessages //</span>
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStatea14" doxytag="NLLOGIC::CLogicState::write" ></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::CLogicState::write </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">xmlNodePtr&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>node</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>
serial
<p>
Definition at line <a class="el" href="a05952.html#l00359">359</a> of file <a class="el" href="a05952.html">logic_state.cpp</a>.
<p>
References <a class="el" href="a05953.html#l00064">_EntryMessages</a>, <a class="el" href="a05953.html#l00067">_ExitMessages</a>, <a class="el" href="a05953.html#l00061">_StateName</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00360 {
00361         xmlNodePtr elmPtr = xmlNewChild ( node, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"STATE"</span>, NULL);
00362         xmlSetProp (elmPtr, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"Name"</span>, (<span class="keyword">const</span> xmlChar*)<a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo5">_StateName</a>.c_str());
00363 
00364         <a class="code" href="a04558.html#a15">uint</a> i;
00365         <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>.size(); i++)
00366         {
00367                 <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo0">_EntryMessages</a>[i].write(elmPtr, <span class="stringliteral">"ENTRY_"</span>);
00368         }
00369         <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>.size(); i++)
00370         {
00371                 <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo2">_ExitMessages</a>[i].write(elmPtr, <span class="stringliteral">"EXIT_"</span>);
00372         }
00373         <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>.size(); i++)
00374         {
00375                 <a class="code" href="a02824.html#NLLOGIC_1_1CLogicStateo1">_Events</a>[i].write(elmPtr);
00376         }
00377 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLLOGIC_1_1CLogicStateo0" doxytag="NLLOGIC::CLogicState::_EntryMessages" ></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::vector&lt;<a class="el" href="a02823.html">CLogicEventMessage</a>&gt; <a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo0">NLLOGIC::CLogicState::_EntryMessages</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
entry messages 
<p>

<p>
Definition at line <a class="el" href="a05953.html#l00064">64</a> of file <a class="el" href="a05953.html">logic_state.h</a>.
<p>
Referenced by <a class="el" href="a05952.html#l00096">addSIdMap()</a>, <a class="el" href="a05952.html#l00196">exitState()</a>, <a class="el" href="a05952.html#l00379">read()</a>, <a class="el" href="a05952.html#l00239">trySendEntryMessages()</a>, and <a class="el" href="a05952.html#l00359">write()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStateo1" doxytag="NLLOGIC::CLogicState::_Events" ></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::vector&lt;<a class="el" href="a02821.html">CLogicEvent</a>&gt; <a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo1">NLLOGIC::CLogicState::_Events</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
logic 
<p>

<p>
Definition at line <a class="el" href="a05953.html#l00070">70</a> of file <a class="el" href="a05953.html">logic_state.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStateo2" doxytag="NLLOGIC::CLogicState::_ExitMessages" ></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::vector&lt;<a class="el" href="a02823.html">CLogicEventMessage</a>&gt; <a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo2">NLLOGIC::CLogicState::_ExitMessages</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
exit messages 
<p>

<p>
Definition at line <a class="el" href="a05953.html#l00067">67</a> of file <a class="el" href="a05953.html">logic_state.h</a>.
<p>
Referenced by <a class="el" href="a05952.html#l00096">addSIdMap()</a>, <a class="el" href="a05952.html#l00196">exitState()</a>, <a class="el" href="a05952.html#l00379">read()</a>, and <a class="el" href="a05952.html#l00359">write()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStateo3" doxytag="NLLOGIC::CLogicState::_LogicStateMachine" ></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="a02825.html">CLogicStateMachine</a>* <a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo3">NLLOGIC::CLogicState::_LogicStateMachine</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
state machine containing this state 
<p>

<p>
Definition at line <a class="el" href="a05953.html#l00073">73</a> of file <a class="el" href="a05953.html">logic_state.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStateo4" doxytag="NLLOGIC::CLogicState::_MessagesToSend" ></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::multimap&lt;<a class="el" href="a02189.html">NLMISC::CEntityId</a>, <a class="el" href="a02918.html">NLNET::CMessage</a>&gt; <a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo4">NLLOGIC::CLogicState::_MessagesToSend</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
messages to send by the service 
<p>

<p>
Definition at line <a class="el" href="a05953.html#l00076">76</a> of file <a class="el" href="a05953.html">logic_state.h</a>.
<p>
Referenced by <a class="el" href="a05952.html#l00196">exitState()</a>, <a class="el" href="a05952.html#l00296">getMessagesToSend()</a>, <a class="el" href="a05952.html#l00239">trySendEntryMessages()</a>, and <a class="el" href="a05952.html#l00265">trySendEventMessages()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLLOGIC_1_1CLogicStateo5" doxytag="NLLOGIC::CLogicState::_StateName" ></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 <a class="el" href="a02824.html#NLLOGIC_1_1CLogicStateo5">NLLOGIC::CLogicState::_StateName</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
state name 
<p>

<p>
Definition at line <a class="el" href="a05953.html#l00061">61</a> of file <a class="el" href="a05953.html">logic_state.h</a>.
<p>
Referenced by <a class="el" href="a05952.html#l00042">CLogicState()</a>, <a class="el" href="a05953.html#l00104">getName()</a>, <a class="el" href="a05952.html#l00379">read()</a>, <a class="el" href="a05953.html#l00097">setName()</a>, and <a class="el" href="a05952.html#l00359">write()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a05953.html">logic_state.h</a><li><a class="el" href="a05952.html">logic_state.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 12:54:18 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>