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
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TinyXml: tinyxml.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
</ul>
</div>
<h1>tinyxml.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">www.sourceforge.net/projects/tinyxml</span>
<a name="l00003"></a>00003 <span class="comment">Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">This software is provided 'as-is', without any express or implied</span>
<a name="l00006"></a>00006 <span class="comment">warranty. In no event will the authors be held liable for any</span>
<a name="l00007"></a>00007 <span class="comment">damages arising from the use of this software.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">Permission is granted to anyone to use this software for any</span>
<a name="l00010"></a>00010 <span class="comment">purpose, including commercial applications, and to alter it and</span>
<a name="l00011"></a>00011 <span class="comment">redistribute it freely, subject to the following restrictions:</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">1. The origin of this software must not be misrepresented; you must</span>
<a name="l00014"></a>00014 <span class="comment">not claim that you wrote the original software. If you use this</span>
<a name="l00015"></a>00015 <span class="comment">software in a product, an acknowledgment in the product documentation</span>
<a name="l00016"></a>00016 <span class="comment">would be appreciated but is not required.</span>
<a name="l00017"></a>00017 <span class="comment"></span>
<a name="l00018"></a>00018 <span class="comment">2. Altered source versions must be plainly marked as such, and</span>
<a name="l00019"></a>00019 <span class="comment">must not be misrepresented as being the original software.</span>
<a name="l00020"></a>00020 <span class="comment"></span>
<a name="l00021"></a>00021 <span class="comment">3. This notice may not be removed or altered from any source</span>
<a name="l00022"></a>00022 <span class="comment">distribution.</span>
<a name="l00023"></a>00023 <span class="comment">*/</span>
<a name="l00024"></a>00024
<a name="l00025"></a>00025
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef TINYXML_INCLUDED</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define TINYXML_INCLUDED</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( push )</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4530 )</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4786 )</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#include <ctype.h></span>
<a name="l00036"></a>00036 <span class="preprocessor">#include <stdio.h></span>
<a name="l00037"></a>00037 <span class="preprocessor">#include <stdlib.h></span>
<a name="l00038"></a>00038 <span class="preprocessor">#include <string.h></span>
<a name="l00039"></a>00039 <span class="preprocessor">#include <assert.h></span>
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="comment">// Help out windows:</span>
<a name="l00042"></a>00042 <span class="preprocessor">#if defined( _DEBUG ) && !defined( DEBUG )</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor"> #include <string></span>
<a name="l00048"></a>00048 <span class="preprocessor"> #include <iostream></span>
<a name="l00049"></a>00049 <span class="preprocessor"> #include <sstream></span>
<a name="l00050"></a>00050 <span class="preprocessor"> #define TIXML_STRING std::string</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"> #include "tinystr.h"</span>
<a name="l00053"></a>00053 <span class="preprocessor"> #define TIXML_STRING TiXmlString</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="comment">// Deprecated library function hell. Compilers want to use the</span>
<a name="l00057"></a>00057 <span class="comment">// new safe versions. This probably doesn't fully address the problem,</span>
<a name="l00058"></a>00058 <span class="comment">// but it gets closer. There are too many compilers for me to fully</span>
<a name="l00059"></a>00059 <span class="comment">// test. If you get compilation troubles, undefine TIXML_SAFE</span>
<a name="l00060"></a>00060 <span class="preprocessor">#define TIXML_SAFE</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
<a name="l00062"></a>00062 <span class="preprocessor">#ifdef TIXML_SAFE</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_MSC_VER) && (_MSC_VER >= 1400 )</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span> <span class="comment">// Microsoft visual studio, version 2005 and higher.</span>
<a name="l00065"></a>00065 <span class="preprocessor"> #define TIXML_SNPRINTF _snprintf_s</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf_s</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor"> #elif defined(_MSC_VER) && (_MSC_VER >= 1200 )</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span> <span class="comment">// Microsoft visual studio, version 6 and higher.</span>
<a name="l00069"></a>00069 <span class="comment">//#pragma message( "Using _sn* functions." )</span>
<a name="l00070"></a>00070 <span class="preprocessor"> #define TIXML_SNPRINTF _snprintf</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor"> #elif defined(__GNUC__) && (__GNUC__ >= 3 )</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span> <span class="comment">// GCC version 3 and higher.s</span>
<a name="l00074"></a>00074 <span class="comment">//#warning( "Using sn* functions." )</span>
<a name="l00075"></a>00075 <span class="preprocessor"> #define TIXML_SNPRINTF snprintf</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SNPRINTF snprintf</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
<a name="l00082"></a>00082 <span class="preprocessor"></span>
<a name="l00083"></a>00083 <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>;
<a name="l00084"></a>00084 <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>;
<a name="l00085"></a>00085 <span class="keyword">class </span><a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>;
<a name="l00086"></a>00086 <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>;
<a name="l00087"></a>00087 <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>;
<a name="l00088"></a>00088 <span class="keyword">class </span><a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>;
<a name="l00089"></a>00089 <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>;
<a name="l00090"></a>00090 <span class="keyword">class </span>TiXmlParsingData;
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MAJOR_VERSION = 2;
<a name="l00093"></a>00093 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MINOR_VERSION = 6;
<a name="l00094"></a>00094 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_PATCH_VERSION = 1;
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="comment">/* Internal structure for tracking location of items </span>
<a name="l00097"></a>00097 <span class="comment"> in the XML file.</span>
<a name="l00098"></a>00098 <span class="comment">*/</span>
<a name="l00099"></a>00099 <span class="keyword">struct </span>TiXmlCursor
<a name="l00100"></a>00100 {
<a name="l00101"></a>00101 TiXmlCursor() { Clear(); }
<a name="l00102"></a>00102 <span class="keywordtype">void</span> Clear() { row = col = -1; }
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="keywordtype">int</span> row; <span class="comment">// 0 based.</span>
<a name="l00105"></a>00105 <span class="keywordtype">int</span> col; <span class="comment">// 0 based.</span>
<a name="l00106"></a>00106 };
<a name="l00107"></a>00107
<a name="l00108"></a>00108
<a name="l00128"></a><a class="code" href="classTiXmlVisitor.html">00128</a> <span class="keyword">class </span><a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>
<a name="l00129"></a>00129 {
<a name="l00130"></a>00130 <span class="keyword">public</span>:
<a name="l00131"></a>00131 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>() {}
<a name="l00132"></a>00132
<a name="l00134"></a><a class="code" href="classTiXmlVisitor.html#a07baecb52dd7d8716ae2a48ad0956ee0">00134</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a07baecb52dd7d8716ae2a48ad0956ee0" title="Visit a document.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& <span class="comment">/*doc*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00136"></a><a class="code" href="classTiXmlVisitor.html#aa0ade4f27087447e93974e975c3246ad">00136</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#aa0ade4f27087447e93974e975c3246ad" title="Visit a document.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& <span class="comment">/*doc*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00137"></a>00137
<a name="l00139"></a><a class="code" href="classTiXmlVisitor.html#af6c6178ffa517bbdba95d70490875fff">00139</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#af6c6178ffa517bbdba95d70490875fff" title="Visit an element.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& <span class="comment">/*element*/</span>, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="comment">/*firstAttribute*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00141"></a><a class="code" href="classTiXmlVisitor.html#aec2b1f8116226d52f3a1b95dafd3a32c">00141</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#aec2b1f8116226d52f3a1b95dafd3a32c" title="Visit an element.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& <span class="comment">/*element*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00142"></a>00142
<a name="l00144"></a><a class="code" href="classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19">00144</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& <span class="comment">/*declaration*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00146"></a><a class="code" href="classTiXmlVisitor.html#a399b8ebca5cd14664974a32d2ce029e5">00146</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a399b8ebca5cd14664974a32d2ce029e5" title="Visit a text node.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& <span class="comment">/*text*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00148"></a><a class="code" href="classTiXmlVisitor.html#a53a60e7a528627b31af3161972cc7fa2">00148</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a53a60e7a528627b31af3161972cc7fa2" title="Visit a comment node.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& <span class="comment">/*comment*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00150"></a><a class="code" href="classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28">00150</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28" title="Visit an unknow node.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& <span class="comment">/*unknown*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00151"></a>00151 };
<a name="l00152"></a>00152
<a name="l00153"></a>00153 <span class="comment">// Only used by Attribute::Query functions</span>
<a name="l00154"></a>00154 <span class="keyword">enum</span>
<a name="l00155"></a>00155 {
<a name="l00156"></a>00156 TIXML_SUCCESS,
<a name="l00157"></a>00157 TIXML_NO_ATTRIBUTE,
<a name="l00158"></a>00158 TIXML_WRONG_TYPE
<a name="l00159"></a>00159 };
<a name="l00160"></a>00160
<a name="l00161"></a>00161
<a name="l00162"></a>00162 <span class="comment">// Used by the parsing routines.</span>
<a name="l00163"></a>00163 <span class="keyword">enum</span> TiXmlEncoding
<a name="l00164"></a>00164 {
<a name="l00165"></a>00165 TIXML_ENCODING_UNKNOWN,
<a name="l00166"></a>00166 TIXML_ENCODING_UTF8,
<a name="l00167"></a>00167 TIXML_ENCODING_LEGACY
<a name="l00168"></a>00168 };
<a name="l00169"></a>00169
<a name="l00170"></a>00170 <span class="keyword">const</span> TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
<a name="l00171"></a>00171
<a name="l00194"></a><a class="code" href="classTiXmlBase.html">00194</a> <span class="keyword">class </span><a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>
<a name="l00195"></a>00195 {
<a name="l00196"></a>00196 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>;
<a name="l00197"></a>00197 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>;
<a name="l00198"></a>00198 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>;
<a name="l00199"></a>00199
<a name="l00200"></a>00200 <span class="keyword">public</span>:
<a name="l00201"></a>00201 <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>() : <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>(0) {}
<a name="l00202"></a>00202 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>() {}
<a name="l00203"></a>00203
<a name="l00213"></a>00213 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#a0de56b3f2ef14c65091a3b916437b512" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span> = 0;
<a name="l00214"></a>00214
<a name="l00221"></a><a class="code" href="classTiXmlBase.html#a0f799ec645bfb8d8a969e83478f379c1">00221</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#a0f799ec645bfb8d8a969e83478f379c1" title="The world does not agree on whether white space should be kept or not.">SetCondenseWhiteSpace</a>( <span class="keywordtype">bool</span> condense ) { condenseWhiteSpace = condense; }
<a name="l00222"></a>00222
<a name="l00224"></a><a class="code" href="classTiXmlBase.html#ad4b1472531c647a25b1840a87ae42438">00224</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlBase.html#ad4b1472531c647a25b1840a87ae42438" title="Return the current white space setting.">IsWhiteSpaceCondensed</a>() { <span class="keywordflow">return</span> condenseWhiteSpace; }
<a name="l00225"></a>00225
<a name="l00244"></a><a class="code" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853">00244</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853" title="Return the position, in the original source file, of this node or attribute.">Row</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> location.row + 1; }
<a name="l00245"></a><a class="code" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003">00245</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003" title="See Row().">Column</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> location.col + 1; }
<a name="l00246"></a>00246
<a name="l00247"></a><a class="code" href="classTiXmlBase.html#ac6b3e0f790930d4970ec30764e937b5d">00247</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#ac6b3e0f790930d4970ec30764e937b5d" title="Set a pointer to arbitrary user data.">SetUserData</a>( <span class="keywordtype">void</span>* user ) { <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a> = user; }
<a name="l00248"></a><a class="code" href="classTiXmlBase.html#a6559a530ca6763fc301a14d77ed28c17">00248</a> <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#a6559a530ca6763fc301a14d77ed28c17" title="Get a pointer to arbitrary user data.">GetUserData</a>() { <span class="keywordflow">return</span> <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>; }
<a name="l00249"></a><a class="code" href="classTiXmlBase.html#ad0120210e4680ef2088601753ce0ede4">00249</a> <span class="keyword">const</span> <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#ad0120210e4680ef2088601753ce0ede4" title="Get a pointer to arbitrary user data.">GetUserData</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>; }
<a name="l00250"></a>00250
<a name="l00251"></a>00251 <span class="comment">// Table that returs, for a given lead byte, the total number of bytes</span>
<a name="l00252"></a>00252 <span class="comment">// in the UTF-8 sequence.</span>
<a name="l00253"></a>00253 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> utf8ByteTable[256];
<a name="l00254"></a>00254
<a name="l00255"></a>00255 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378" title="Parse the given null terminated block of xml data.">Parse</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* p,
<a name="l00256"></a>00256 TiXmlParsingData* data,
<a name="l00257"></a>00257 TiXmlEncoding encoding <span class="comment">/*= TIXML_ENCODING_UNKNOWN */</span> ) = 0;
<a name="l00258"></a>00258
<a name="l00262"></a>00262 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#a6bd8c315c1acb09e34107b8736505948" title="Expands entities in a string.">EncodeString</a>( <span class="keyword">const</span> TIXML_STRING& str, TIXML_STRING* out );
<a name="l00263"></a>00263
<a name="l00264"></a>00264 <span class="keyword">enum</span>
<a name="l00265"></a>00265 {
<a name="l00266"></a>00266 TIXML_NO_ERROR = 0,
<a name="l00267"></a>00267 TIXML_ERROR,
<a name="l00268"></a>00268 TIXML_ERROR_OPENING_FILE,
<a name="l00269"></a>00269 TIXML_ERROR_PARSING_ELEMENT,
<a name="l00270"></a>00270 TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
<a name="l00271"></a>00271 TIXML_ERROR_READING_ELEMENT_VALUE,
<a name="l00272"></a>00272 TIXML_ERROR_READING_ATTRIBUTES,
<a name="l00273"></a>00273 TIXML_ERROR_PARSING_EMPTY,
<a name="l00274"></a>00274 TIXML_ERROR_READING_END_TAG,
<a name="l00275"></a>00275 TIXML_ERROR_PARSING_UNKNOWN,
<a name="l00276"></a>00276 TIXML_ERROR_PARSING_COMMENT,
<a name="l00277"></a>00277 TIXML_ERROR_PARSING_DECLARATION,
<a name="l00278"></a>00278 TIXML_ERROR_DOCUMENT_EMPTY,
<a name="l00279"></a>00279 TIXML_ERROR_EMBEDDED_NULL,
<a name="l00280"></a>00280 TIXML_ERROR_PARSING_CDATA,
<a name="l00281"></a>00281 TIXML_ERROR_DOCUMENT_TOP_ONLY,
<a name="l00282"></a>00282
<a name="l00283"></a>00283 TIXML_ERROR_STRING_COUNT
<a name="l00284"></a>00284 };
<a name="l00285"></a>00285
<a name="l00286"></a>00286 <span class="keyword">protected</span>:
<a name="l00287"></a>00287
<a name="l00288"></a>00288 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* SkipWhiteSpace( <span class="keyword">const</span> <span class="keywordtype">char</span>*, TiXmlEncoding encoding );
<a name="l00289"></a>00289
<a name="l00290"></a>00290 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> IsWhiteSpace( <span class="keywordtype">char</span> c )
<a name="l00291"></a>00291 {
<a name="l00292"></a>00292 <span class="keywordflow">return</span> ( isspace( (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>) c ) || c == <span class="charliteral">'\n'</span> || c == <span class="charliteral">'\r'</span> );
<a name="l00293"></a>00293 }
<a name="l00294"></a>00294 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> IsWhiteSpace( <span class="keywordtype">int</span> c )
<a name="l00295"></a>00295 {
<a name="l00296"></a>00296 <span class="keywordflow">if</span> ( c < 256 )
<a name="l00297"></a>00297 <span class="keywordflow">return</span> IsWhiteSpace( (<span class="keywordtype">char</span>) c );
<a name="l00298"></a>00298 <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">// Again, only truly correct for English/Latin...but usually works.</span>
<a name="l00299"></a>00299 }
<a name="l00300"></a>00300
<a name="l00301"></a>00301 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00302"></a>00302 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamWhiteSpace( std::istream * in, TIXML_STRING * tag );
<a name="l00303"></a>00303 <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamTo( std::istream * in, <span class="keywordtype">int</span> character, TIXML_STRING * tag );
<a name="l00304"></a>00304 <span class="preprocessor"> #endif</span>
<a name="l00305"></a>00305 <span class="preprocessor"></span>
<a name="l00306"></a>00306 <span class="comment">/* Reads an XML name into the string provided. Returns</span>
<a name="l00307"></a>00307 <span class="comment"> a pointer just past the last character of the name,</span>
<a name="l00308"></a>00308 <span class="comment"> or 0 if the function has an error.</span>
<a name="l00309"></a>00309 <span class="comment"> */</span>
<a name="l00310"></a>00310 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadName( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TIXML_STRING* name, TiXmlEncoding encoding );
<a name="l00311"></a>00311
<a name="l00312"></a>00312 <span class="comment">/* Reads text. Returns a pointer past the given end tag.</span>
<a name="l00313"></a>00313 <span class="comment"> Wickedly complex options, but it keeps the (sensitive) code in one place.</span>
<a name="l00314"></a>00314 <span class="comment"> */</span>
<a name="l00315"></a>00315 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadText( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, <span class="comment">// where to start</span>
<a name="l00316"></a>00316 TIXML_STRING* text, <span class="comment">// the string read</span>
<a name="l00317"></a>00317 <span class="keywordtype">bool</span> ignoreWhiteSpace, <span class="comment">// whether to keep the white space</span>
<a name="l00318"></a>00318 <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag, <span class="comment">// what ends this text</span>
<a name="l00319"></a>00319 <span class="keywordtype">bool</span> ignoreCase, <span class="comment">// whether to ignore case in the end tag</span>
<a name="l00320"></a>00320 TiXmlEncoding encoding ); <span class="comment">// the current encoding</span>
<a name="l00321"></a>00321
<a name="l00322"></a>00322 <span class="comment">// If an entity has been found, transform it into a character.</span>
<a name="l00323"></a>00323 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GetEntity( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span>* length, TiXmlEncoding encoding );
<a name="l00324"></a>00324
<a name="l00325"></a>00325 <span class="comment">// Get a character, while interpreting entities.</span>
<a name="l00326"></a>00326 <span class="comment">// The length can be from 0 to 4 bytes.</span>
<a name="l00327"></a>00327 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GetChar( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, <span class="keywordtype">char</span>* _value, <span class="keywordtype">int</span>* length, TiXmlEncoding encoding )
<a name="l00328"></a>00328 {
<a name="l00329"></a>00329 assert( p );
<a name="l00330"></a>00330 <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
<a name="l00331"></a>00331 {
<a name="l00332"></a>00332 *length = utf8ByteTable[ *((<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)p) ];
<a name="l00333"></a>00333 assert( *length >= 0 && *length < 5 );
<a name="l00334"></a>00334 }
<a name="l00335"></a>00335 <span class="keywordflow">else</span>
<a name="l00336"></a>00336 {
<a name="l00337"></a>00337 *length = 1;
<a name="l00338"></a>00338 }
<a name="l00339"></a>00339
<a name="l00340"></a>00340 <span class="keywordflow">if</span> ( *length == 1 )
<a name="l00341"></a>00341 {
<a name="l00342"></a>00342 <span class="keywordflow">if</span> ( *p == <span class="charliteral">'&'</span> )
<a name="l00343"></a>00343 <span class="keywordflow">return</span> GetEntity( p, _value, length, encoding );
<a name="l00344"></a>00344 *_value = *p;
<a name="l00345"></a>00345 <span class="keywordflow">return</span> p+1;
<a name="l00346"></a>00346 }
<a name="l00347"></a>00347 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( *length )
<a name="l00348"></a>00348 {
<a name="l00349"></a>00349 <span class="comment">//strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe),</span>
<a name="l00350"></a>00350 <span class="comment">// and the null terminator isn't needed</span>
<a name="l00351"></a>00351 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; p[i] && i<*length; ++i ) {
<a name="l00352"></a>00352 _value[i] = p[i];
<a name="l00353"></a>00353 }
<a name="l00354"></a>00354 <span class="keywordflow">return</span> p + (*length);
<a name="l00355"></a>00355 }
<a name="l00356"></a>00356 <span class="keywordflow">else</span>
<a name="l00357"></a>00357 {
<a name="l00358"></a>00358 <span class="comment">// Not valid text.</span>
<a name="l00359"></a>00359 <span class="keywordflow">return</span> 0;
<a name="l00360"></a>00360 }
<a name="l00361"></a>00361 }
<a name="l00362"></a>00362
<a name="l00363"></a>00363 <span class="comment">// Return true if the next characters in the stream are any of the endTag sequences.</span>
<a name="l00364"></a>00364 <span class="comment">// Ignore case only works for english, and should only be relied on when comparing</span>
<a name="l00365"></a>00365 <span class="comment">// to English words: StringEqual( p, "version", true ) is fine.</span>
<a name="l00366"></a>00366 <span class="keyword">static</span> <span class="keywordtype">bool</span> StringEqual( <span class="keyword">const</span> <span class="keywordtype">char</span>* p,
<a name="l00367"></a>00367 <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag,
<a name="l00368"></a>00368 <span class="keywordtype">bool</span> ignoreCase,
<a name="l00369"></a>00369 TiXmlEncoding encoding );
<a name="l00370"></a>00370
<a name="l00371"></a>00371 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* errorString[ TIXML_ERROR_STRING_COUNT ];
<a name="l00372"></a>00372
<a name="l00373"></a>00373 TiXmlCursor location;
<a name="l00374"></a>00374
<a name="l00376"></a><a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c">00376</a> <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>;
<a name="l00377"></a>00377
<a name="l00378"></a>00378 <span class="comment">// None of these methods are reliable for any language except English.</span>
<a name="l00379"></a>00379 <span class="comment">// Good for approximation, not great for accuracy.</span>
<a name="l00380"></a>00380 <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlpha( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
<a name="l00381"></a>00381 <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlphaNum( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
<a name="l00382"></a>00382 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">int</span> ToLower( <span class="keywordtype">int</span> v, TiXmlEncoding encoding )
<a name="l00383"></a>00383 {
<a name="l00384"></a>00384 <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
<a name="l00385"></a>00385 {
<a name="l00386"></a>00386 <span class="keywordflow">if</span> ( v < 128 ) <span class="keywordflow">return</span> tolower( v );
<a name="l00387"></a>00387 <span class="keywordflow">return</span> v;
<a name="l00388"></a>00388 }
<a name="l00389"></a>00389 <span class="keywordflow">else</span>
<a name="l00390"></a>00390 {
<a name="l00391"></a>00391 <span class="keywordflow">return</span> tolower( v );
<a name="l00392"></a>00392 }
<a name="l00393"></a>00393 }
<a name="l00394"></a>00394 <span class="keyword">static</span> <span class="keywordtype">void</span> ConvertUTF32ToUTF8( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> input, <span class="keywordtype">char</span>* output, <span class="keywordtype">int</span>* length );
<a name="l00395"></a>00395
<a name="l00396"></a>00396 <span class="keyword">private</span>:
<a name="l00397"></a>00397 <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>& ); <span class="comment">// not implemented.</span>
<a name="l00398"></a>00398 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>& base ); <span class="comment">// not allowed.</span>
<a name="l00399"></a>00399
<a name="l00400"></a>00400 <span class="keyword">struct </span>Entity
<a name="l00401"></a>00401 {
<a name="l00402"></a>00402 <span class="keyword">const</span> <span class="keywordtype">char</span>* str;
<a name="l00403"></a>00403 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> strLength;
<a name="l00404"></a>00404 <span class="keywordtype">char</span> chr;
<a name="l00405"></a>00405 };
<a name="l00406"></a>00406 <span class="keyword">enum</span>
<a name="l00407"></a>00407 {
<a name="l00408"></a>00408 NUM_ENTITY = 5,
<a name="l00409"></a>00409 MAX_ENTITY_LENGTH = 6
<a name="l00410"></a>00410
<a name="l00411"></a>00411 };
<a name="l00412"></a>00412 <span class="keyword">static</span> Entity entity[ NUM_ENTITY ];
<a name="l00413"></a>00413 <span class="keyword">static</span> <span class="keywordtype">bool</span> condenseWhiteSpace;
<a name="l00414"></a>00414 };
<a name="l00415"></a>00415
<a name="l00416"></a>00416
<a name="l00423"></a><a class="code" href="classTiXmlNode.html">00423</a> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>
<a name="l00424"></a>00424 {
<a name="l00425"></a>00425 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>;
<a name="l00426"></a>00426 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>;
<a name="l00427"></a>00427
<a name="l00428"></a>00428 <span class="keyword">public</span>:
<a name="l00429"></a>00429 <span class="preprocessor"> #ifdef TIXML_USE_STL </span>
<a name="l00430"></a>00430 <span class="preprocessor"></span>
<a name="l00434"></a>00434 <span class="keyword">friend</span> std::istream& <a class="code" href="classTiXmlNode.html#ab57bd426563c926844f65a78412e18b9" title="An input stream operator, for every class.">operator >> </a>(std::istream& in, <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& base);
<a name="l00435"></a>00435
<a name="l00452"></a>00452 <span class="keyword">friend</span> std::ostream& <a class="code" href="classTiXmlNode.html#a86cd49cfb17a844c0010b3136ac966c7" title="An output stream operator, for every class.">operator<< </a>(std::ostream& out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& base);
<a name="l00453"></a>00453
<a name="l00455"></a>00455 <span class="keyword">friend</span> std::string& <a class="code" href="classTiXmlNode.html#a86cd49cfb17a844c0010b3136ac966c7" title="An output stream operator, for every class.">operator<< </a>(std::string& out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& base );
<a name="l00456"></a>00456
<a name="l00457"></a>00457 <span class="preprocessor"> #endif</span>
<a name="l00458"></a>00458 <span class="preprocessor"></span>
<a name="l00462"></a><a class="code" href="classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2">00462</a> <span class="keyword">enum</span> <a class="code" href="classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2" title="The types of XML nodes supported by TinyXml.">NodeType</a>
<a name="l00463"></a>00463 {
<a name="l00464"></a>00464 TINYXML_DOCUMENT,
<a name="l00465"></a>00465 TINYXML_ELEMENT,
<a name="l00466"></a>00466 TINYXML_COMMENT,
<a name="l00467"></a>00467 TINYXML_UNKNOWN,
<a name="l00468"></a>00468 TINYXML_TEXT,
<a name="l00469"></a>00469 TINYXML_DECLARATION,
<a name="l00470"></a>00470 TINYXML_TYPECOUNT
<a name="l00471"></a>00471 };
<a name="l00472"></a>00472
<a name="l00473"></a>00473 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>();
<a name="l00474"></a>00474
<a name="l00487"></a><a class="code" href="classTiXmlNode.html#a77943eb90d12c2892b1337a9f5918b41">00487</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlNode.html#a77943eb90d12c2892b1337a9f5918b41" title="The meaning of &#39;value&#39; changes for the specific type of TiXmlNode.">Value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value.c_str (); }
<a name="l00488"></a>00488
<a name="l00489"></a>00489 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00490"></a>00490 <span class="preprocessor"></span>
<a name="l00494"></a><a class="code" href="classTiXmlNode.html#a6d9e505619d39bf50bfd9609c9169ea5">00494</a> <span class="keyword">const</span> std::string& <a class="code" href="classTiXmlNode.html#a6d9e505619d39bf50bfd9609c9169ea5" title="Return Value() as a std::string.">ValueStr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
<a name="l00495"></a>00495 <span class="preprocessor"> #endif</span>
<a name="l00496"></a>00496 <span class="preprocessor"></span>
<a name="l00497"></a>00497 <span class="keyword">const</span> TIXML_STRING& ValueTStr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
<a name="l00498"></a>00498
<a name="l00508"></a><a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90">00508</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * _value) { value = _value;}
<a name="l00509"></a>00509
<a name="l00510"></a>00510 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00512"></a><a class="code" href="classTiXmlNode.html#a2598d5f448042c1abbeae4503dd45ff2">00512</a> <span class="preprocessor"> void SetValue( const std::string& _value ) { value = _value; }</span>
<a name="l00513"></a>00513 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
<a name="l00514"></a>00514 <span class="preprocessor"></span>
<a name="l00516"></a>00516 <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#a708e7f953df61d4d2d12f73171550a4b" title="Delete all the children of this node. Does not affect &#39;this&#39;.">Clear</a>();
<a name="l00517"></a>00517
<a name="l00519"></a><a class="code" href="classTiXmlNode.html#ab643043132ffd794f8602685d34a982e">00519</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ab643043132ffd794f8602685d34a982e" title="One step up the DOM.">Parent</a>() { <span class="keywordflow">return</span> parent; }
<a name="l00520"></a>00520 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ab643043132ffd794f8602685d34a982e" title="One step up the DOM.">Parent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> parent; }
<a name="l00521"></a>00521
<a name="l00522"></a><a class="code" href="classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0">00522</a> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0" title="The first child of this node. Will be null if there are no children.">FirstChild</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> firstChild; }
<a name="l00523"></a>00523 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0" title="The first child of this node. Will be null if there are no children.">FirstChild</a>() { <span class="keywordflow">return</span> firstChild; }
<a name="l00524"></a>00524 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0" title="The first child of this node. Will be null if there are no children.">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
<a name="l00525"></a>00525
<a name="l00526"></a><a class="code" href="classTiXmlNode.html#abc8bf32be6419ec453a731868de19554">00526</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#abc8bf32be6419ec453a731868de19554" title="The first child of this node with the matching &#39;value&#39;. Will be null if none...">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
<a name="l00527"></a>00527 <span class="comment">// Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)</span>
<a name="l00528"></a>00528 <span class="comment">// call the method, cast the return back to non-const.</span>
<a name="l00529"></a>00529 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span> ((<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->FirstChild( _value ));
<a name="l00530"></a>00530 }
<a name="l00531"></a>00531 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* LastChild()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> lastChild; }
<a name="l00532"></a><a class="code" href="classTiXmlNode.html#a6432d2b2495f6caf9cb4278df706a031">00532</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a6432d2b2495f6caf9cb4278df706a031" title="The last child of this node. Will be null if there are no children.">LastChild</a>() { <span class="keywordflow">return</span> lastChild; }
<a name="l00533"></a>00533
<a name="l00534"></a>00534 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* LastChild( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
<a name="l00535"></a><a class="code" href="classTiXmlNode.html#abad5bf1059c48127b958711ef89e8e5d">00535</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#abad5bf1059c48127b958711ef89e8e5d" title="The last child of this node matching &#39;value&#39;. Will be null if there are no...">LastChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
<a name="l00536"></a>00536 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span> ((<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->LastChild( _value ));
<a name="l00537"></a>00537 }
<a name="l00538"></a>00538
<a name="l00539"></a>00539 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00540"></a><a class="code" href="classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6">00540</a> <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6" title="STL std::string form.">FirstChild</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6" title="STL std::string form.">FirstChild</a> (_value.c_str ()); }
<a name="l00541"></a><a class="code" href="classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6">00541</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6" title="STL std::string form.">FirstChild</a>( <span class="keyword">const</span> std::string& _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6" title="STL std::string form.">FirstChild</a> (_value.c_str ()); }
<a name="l00542"></a><a class="code" href="classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63">00542</a> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63" title="STL std::string form.">LastChild</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63" title="STL std::string form.">LastChild</a> (_value.c_str ()); }
<a name="l00543"></a><a class="code" href="classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3">00543</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3" title="STL std::string form.">LastChild</a>( <span class="keyword">const</span> std::string& _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3" title="STL std::string form.">LastChild</a> (_value.c_str ()); }
<a name="l00544"></a>00544 <span class="preprocessor"> #endif</span>
<a name="l00545"></a>00545 <span class="preprocessor"></span>
<a name="l00562"></a>00562 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
<a name="l00563"></a>00563 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) {
<a name="l00564"></a>00564 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->IterateChildren( previous ) );
<a name="l00565"></a>00565 }
<a name="l00566"></a>00566
<a name="l00568"></a>00568 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
<a name="l00569"></a>00569 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) {
<a name="l00570"></a>00570 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->IterateChildren( _value, previous ) );
<a name="l00571"></a>00571 }
<a name="l00572"></a>00572
<a name="l00573"></a>00573 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00574"></a><a class="code" href="classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df">00574</a> <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df" title="STL std::string form.">IterateChildren</a>( <span class="keyword">const</span> std::string& _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df" title="STL std::string form.">IterateChildren</a> (_value.c_str (), previous); }
<a name="l00575"></a><a class="code" href="classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c">00575</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c" title="STL std::string form.">IterateChildren</a>( <span class="keyword">const</span> std::string& _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c" title="STL std::string form.">IterateChildren</a> (_value.c_str (), previous); }
<a name="l00576"></a>00576 <span class="preprocessor"> #endif</span>
<a name="l00577"></a>00577 <span class="preprocessor"></span>
<a name="l00581"></a>00581 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ad7d4630e1a2a916edda16be22448a8ba" title="Add a new node related to this.">InsertEndChild</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& addThis );
<a name="l00582"></a>00582
<a name="l00583"></a>00583
<a name="l00593"></a>00593 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a5d29442ae46de6d0168429156197bfc6" title="Add a new node related to this.">LinkEndChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* addThis );
<a name="l00594"></a>00594
<a name="l00598"></a>00598 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a0c146fa2fff0157b681594102f48cbc7" title="Add a new node related to this.">InsertBeforeChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* beforeThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& addThis );
<a name="l00599"></a>00599
<a name="l00603"></a>00603 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ad9b75e54ec19301c8b4d5ff583d0b3d5" title="Add a new node related to this.">InsertAfterChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* afterThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& addThis );
<a name="l00604"></a>00604
<a name="l00608"></a>00608 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a0c49e739a17b9938050c22cd89617fbd" title="Replace a child of this node.">ReplaceChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* replaceThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& withThis );
<a name="l00609"></a>00609
<a name="l00611"></a>00611 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#ae19d8510efc90596552f4feeac9a8fbf" title="Delete a child of this node.">RemoveChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* removeThis );
<a name="l00612"></a>00612
<a name="l00614"></a><a class="code" href="classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10">00614</a> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> prev; }
<a name="l00615"></a>00615 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>() { <span class="keywordflow">return</span> prev; }
<a name="l00616"></a>00616
<a name="l00618"></a>00618 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
<a name="l00619"></a>00619 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *_prev ) {
<a name="l00620"></a>00620 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->PreviousSibling( _prev ) );
<a name="l00621"></a>00621 }
<a name="l00622"></a>00622
<a name="l00623"></a>00623 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00624"></a><a class="code" href="classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab">00624</a> <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab" title="STL std::string form.">PreviousSibling</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab" title="STL std::string form.">PreviousSibling</a> (_value.c_str ()); }
<a name="l00625"></a><a class="code" href="classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912">00625</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912" title="STL std::string form.">PreviousSibling</a>( <span class="keyword">const</span> std::string& _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912" title="STL std::string form.">PreviousSibling</a> (_value.c_str ()); }
<a name="l00626"></a><a class="code" href="classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9">00626</a> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9" title="STL std::string form.">NextSibling</a>( <span class="keyword">const</span> std::string& _value)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9" title="STL std::string form.">NextSibling</a> (_value.c_str ()); }
<a name="l00627"></a><a class="code" href="classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea">00627</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea" title="STL std::string form.">NextSibling</a>( <span class="keyword">const</span> std::string& _value) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea" title="STL std::string form.">NextSibling</a> (_value.c_str ()); }
<a name="l00628"></a>00628 <span class="preprocessor"> #endif</span>
<a name="l00629"></a>00629 <span class="preprocessor"></span>
<a name="l00631"></a><a class="code" href="classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e">00631</a> <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> next; }
<a name="l00632"></a>00632 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>() { <span class="keywordflow">return</span> next; }
<a name="l00633"></a>00633
<a name="l00635"></a>00635 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
<a name="l00636"></a>00636 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _next ) {
<a name="l00637"></a>00637 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->NextSibling( _next ) );
<a name="l00638"></a>00638 }
<a name="l00639"></a>00639
<a name="l00644"></a>00644 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>() <span class="keyword">const</span>;
<a name="l00645"></a>00645 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>() {
<a name="l00646"></a>00646 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->NextSiblingElement() );
<a name="l00647"></a>00647 }
<a name="l00648"></a>00648
<a name="l00653"></a>00653 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
<a name="l00654"></a>00654 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *_next ) {
<a name="l00655"></a>00655 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->NextSiblingElement( _next ) );
<a name="l00656"></a>00656 }
<a name="l00657"></a>00657
<a name="l00658"></a>00658 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00659"></a><a class="code" href="classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463">00659</a> <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463" title="STL std::string form.">NextSiblingElement</a>( <span class="keyword">const</span> std::string& _value)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463" title="STL std::string form.">NextSiblingElement</a> (_value.c_str ()); }
<a name="l00660"></a><a class="code" href="classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081">00660</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081" title="STL std::string form.">NextSiblingElement</a>( <span class="keyword">const</span> std::string& _value) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081" title="STL std::string form.">NextSiblingElement</a> (_value.c_str ()); }
<a name="l00661"></a>00661 <span class="preprocessor"> #endif</span>
<a name="l00662"></a>00662 <span class="preprocessor"></span>
<a name="l00664"></a>00664 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>() <span class="keyword">const</span>;
<a name="l00665"></a>00665 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>() {
<a name="l00666"></a>00666 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->FirstChildElement() );
<a name="l00667"></a>00667 }
<a name="l00668"></a>00668
<a name="l00670"></a>00670 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) <span class="keyword">const</span>;
<a name="l00671"></a>00671 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
<a name="l00672"></a>00672 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->FirstChildElement( _value ) );
<a name="l00673"></a>00673 }
<a name="l00674"></a>00674
<a name="l00675"></a>00675 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00676"></a><a class="code" href="classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7">00676</a> <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7" title="STL std::string form.">FirstChildElement</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7" title="STL std::string form.">FirstChildElement</a> (_value.c_str ()); }
<a name="l00677"></a><a class="code" href="classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45">00677</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45" title="STL std::string form.">FirstChildElement</a>( <span class="keyword">const</span> std::string& _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45" title="STL std::string form.">FirstChildElement</a> (_value.c_str ()); }
<a name="l00678"></a>00678 <span class="preprocessor"> #endif</span>
<a name="l00679"></a>00679 <span class="preprocessor"></span>
<a name="l00684"></a><a class="code" href="classTiXmlNode.html#a57b99d5c97d67a42b9752f5210a1ba5e">00684</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlNode.html#a57b99d5c97d67a42b9752f5210a1ba5e" title="Query the type (as an enumerated value, above) of this node.">Type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> type; }
<a name="l00685"></a>00685
<a name="l00689"></a>00689 <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a80e397fa973cf5323e33b07154b024f3" title="Return a pointer to the Document this node lives in.">GetDocument</a>() <span class="keyword">const</span>;
<a name="l00690"></a>00690 <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a80e397fa973cf5323e33b07154b024f3" title="Return a pointer to the Document this node lives in.">GetDocument</a>() {
<a name="l00691"></a>00691 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->GetDocument() );
<a name="l00692"></a>00692 }
<a name="l00693"></a>00693
<a name="l00695"></a><a class="code" href="classTiXmlNode.html#aeed21ad30630ef6e7faf096127edc9f3">00695</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#aeed21ad30630ef6e7faf096127edc9f3" title="Returns true if this node has no children.">NoChildren</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !firstChild; }
<a name="l00696"></a>00696
<a name="l00697"></a><a class="code" href="classTiXmlNode.html#a8a4cda4b15c29f64cff419309aebed08">00697</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a8a4cda4b15c29f64cff419309aebed08" title="Cast to a more defined type. Will return null if not of the requested type.">ToDocument</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
<a name="l00698"></a><a class="code" href="classTiXmlNode.html#a72abed96dc9667ab9e0a2a275301bb1c">00698</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a72abed96dc9667ab9e0a2a275301bb1c" title="Cast to a more defined type. Will return null if not of the requested type.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
<a name="l00699"></a><a class="code" href="classTiXmlNode.html#aa0a5086f9eaee910bbfdc7f975e26574">00699</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlNode.html#aa0a5086f9eaee910bbfdc7f975e26574" title="Cast to a more defined type. Will return null if not of the requested type.">ToComment</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
<a name="l00700"></a><a class="code" href="classTiXmlNode.html#afd7205cf31d7a376929f8a36930627a2">00700</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlNode.html#afd7205cf31d7a376929f8a36930627a2" title="Cast to a more defined type. Will return null if not of the requested type.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
<a name="l00701"></a><a class="code" href="classTiXmlNode.html#a95a46a52c525992d6b4ee08beb14cd69">00701</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlNode.html#a95a46a52c525992d6b4ee08beb14cd69" title="Cast to a more defined type. Will return null if not of the requested type.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
<a name="l00702"></a><a class="code" href="classTiXmlNode.html#a9f43e6984fc7d4afd6eb32714c6b7b72">00702</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlNode.html#a9f43e6984fc7d4afd6eb32714c6b7b72" title="Cast to a more defined type. Will return null if not of the requested type.">ToDeclaration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
<a name="l00703"></a>00703
<a name="l00704"></a><a class="code" href="classTiXmlNode.html#a6a4c8ac28ee7a745d059db6691e03bae">00704</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a6a4c8ac28ee7a745d059db6691e03bae" title="Cast to a more defined type. Will return null if not of the requested type.">ToDocument</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00705"></a><a class="code" href="classTiXmlNode.html#aa65d000223187d22a4dcebd7479e9ebc">00705</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#aa65d000223187d22a4dcebd7479e9ebc" title="Cast to a more defined type. Will return null if not of the requested type.">ToElement</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00706"></a><a class="code" href="classTiXmlNode.html#a383e06a0787f7063953934867990f849">00706</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlNode.html#a383e06a0787f7063953934867990f849" title="Cast to a more defined type. Will return null if not of the requested type.">ToComment</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00707"></a><a class="code" href="classTiXmlNode.html#a06de5af852668c7e4af0d09c205f0b0d">00707</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlNode.html#a06de5af852668c7e4af0d09c205f0b0d" title="Cast to a more defined type. Will return null if not of the requested type.">ToUnknown</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00708"></a><a class="code" href="classTiXmlNode.html#a3ddfbcac78fbea041fad57e5c6d60a03">00708</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlNode.html#a3ddfbcac78fbea041fad57e5c6d60a03" title="Cast to a more defined type. Will return null if not of the requested type.">ToText</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00709"></a><a class="code" href="classTiXmlNode.html#a4027136ca820ff4a636b607231b6a6df">00709</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlNode.html#a4027136ca820ff4a636b607231b6a6df" title="Cast to a more defined type. Will return null if not of the requested type.">ToDeclaration</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00710"></a>00710
<a name="l00714"></a>00714 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a4508cc3a2d7a98e96a54cc09c37a78a4" title="Create an exact duplicate of this node and return it.">Clone</a>() <span class="keyword">const</span> = 0;
<a name="l00715"></a>00715
<a name="l00738"></a>00738 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#acc0f88b7462c6cb73809d410a4f5bb86" title="Accept a hierchical visit the nodes in the TinyXML DOM.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span> = 0;
<a name="l00739"></a>00739
<a name="l00740"></a>00740 <span class="keyword">protected</span>:
<a name="l00741"></a>00741 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2" title="The types of XML nodes supported by TinyXml.">NodeType</a> _type );
<a name="l00742"></a>00742
<a name="l00743"></a>00743 <span class="comment">// Copy to the allocated object. Shared functionality between Clone, Copy constructor,</span>
<a name="l00744"></a>00744 <span class="comment">// and the assignment operator.</span>
<a name="l00745"></a>00745 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* target ) <span class="keyword">const</span>;
<a name="l00746"></a>00746
<a name="l00747"></a>00747 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00748"></a>00748 <span class="preprocessor"></span> <span class="comment">// The real work of the input operator.</span>
<a name="l00749"></a>00749 <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
<a name="l00750"></a>00750 <span class="preprocessor"> #endif</span>
<a name="l00751"></a>00751 <span class="preprocessor"></span>
<a name="l00752"></a>00752 <span class="comment">// Figure out what is at *p, and parse it. Returns null if it is not an xml node.</span>
<a name="l00753"></a>00753 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* Identify( <span class="keyword">const</span> <span class="keywordtype">char</span>* start, TiXmlEncoding encoding );
<a name="l00754"></a>00754
<a name="l00755"></a>00755 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* parent;
<a name="l00756"></a>00756 <a class="code" href="classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2" title="The types of XML nodes supported by TinyXml.">NodeType</a> type;
<a name="l00757"></a>00757
<a name="l00758"></a>00758 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* firstChild;
<a name="l00759"></a>00759 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* lastChild;
<a name="l00760"></a>00760
<a name="l00761"></a>00761 TIXML_STRING value;
<a name="l00762"></a>00762
<a name="l00763"></a>00763 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* prev;
<a name="l00764"></a>00764 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* next;
<a name="l00765"></a>00765
<a name="l00766"></a>00766 <span class="keyword">private</span>:
<a name="l00767"></a>00767 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& ); <span class="comment">// not implemented.</span>
<a name="l00768"></a>00768 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>& base ); <span class="comment">// not allowed.</span>
<a name="l00769"></a>00769 };
<a name="l00770"></a>00770
<a name="l00771"></a>00771
<a name="l00779"></a><a class="code" href="classTiXmlAttribute.html">00779</a> <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>
<a name="l00780"></a>00780 {
<a name="l00781"></a>00781 <span class="keyword">friend</span> <span class="keyword">class </span>TiXmlAttributeSet;
<a name="l00782"></a>00782
<a name="l00783"></a>00783 <span class="keyword">public</span>:
<a name="l00785"></a><a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1">00785</a> <a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1" title="Construct an empty attribute.">TiXmlAttribute</a>() : <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>()
<a name="l00786"></a>00786 {
<a name="l00787"></a>00787 document = 0;
<a name="l00788"></a>00788 prev = next = 0;
<a name="l00789"></a>00789 }
<a name="l00790"></a>00790
<a name="l00791"></a>00791 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00793"></a><a class="code" href="classTiXmlAttribute.html#a052213522caac3979960e0714063861d">00793</a> <span class="preprocessor"> TiXmlAttribute( const std::string& _name, const std::string& _value )</span>
<a name="l00794"></a>00794 <span class="preprocessor"></span> {
<a name="l00795"></a>00795 name = _name;
<a name="l00796"></a>00796 value = _value;
<a name="l00797"></a>00797 document = 0;
<a name="l00798"></a>00798 prev = next = 0;
<a name="l00799"></a>00799 }
<a name="l00800"></a>00800 <span class="preprocessor"> #endif</span>
<a name="l00801"></a>00801 <span class="preprocessor"></span>
<a name="l00803"></a><a class="code" href="classTiXmlAttribute.html#a759d0b76fb8fcf765ecab243bc14f05e">00803</a> <a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1" title="Construct an empty attribute.">TiXmlAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value )
<a name="l00804"></a>00804 {
<a name="l00805"></a>00805 name = _name;
<a name="l00806"></a>00806 value = _value;
<a name="l00807"></a>00807 document = 0;
<a name="l00808"></a>00808 prev = next = 0;
<a name="l00809"></a>00809 }
<a name="l00810"></a>00810
<a name="l00811"></a><a class="code" href="classTiXmlAttribute.html#a298a57287d305904ba6bd96ae6f78d3d">00811</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlAttribute.html#a298a57287d305904ba6bd96ae6f78d3d" title="Return the name of this attribute.">Name</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name.c_str(); }
<a name="l00812"></a><a class="code" href="classTiXmlAttribute.html#a0f874490eac8ca00ee0070765d0e97e3">00812</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlAttribute.html#a0f874490eac8ca00ee0070765d0e97e3" title="Return the value of this attribute.">Value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value.c_str(); }
<a name="l00813"></a>00813 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00814"></a><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33">00814</a> <span class="preprocessor"></span> <span class="keyword">const</span> std::string& <a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
<a name="l00815"></a>00815 <span class="preprocessor"> #endif</span>
<a name="l00816"></a>00816 <span class="preprocessor"></span> <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#aa1a20ad59dc7e89a0ab265396360d50f" title="Return the value of this attribute, converted to an integer.">IntValue</a>() <span class="keyword">const</span>;
<a name="l00817"></a>00817 <span class="keywordtype">double</span> <a class="code" href="classTiXmlAttribute.html#a2880ddef53fc7522c99535273954d230" title="Return the value of this attribute, converted to a double.">DoubleValue</a>() <span class="keyword">const</span>;
<a name="l00818"></a>00818
<a name="l00819"></a>00819 <span class="comment">// Get the tinyxml string representation</span>
<a name="l00820"></a>00820 <span class="keyword">const</span> TIXML_STRING& NameTStr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name; }
<a name="l00821"></a>00821
<a name="l00831"></a>00831 <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#ad6c93088ee21af41a107931223339344" title="QueryIntValue examines the value string.">QueryIntValue</a>( <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
<a name="l00833"></a>00833 <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#ac87b2a8489906a5d7aa2875f20be3513" title="QueryDoubleValue examines the value string. See QueryIntValue().">QueryDoubleValue</a>( <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
<a name="l00834"></a>00834
<a name="l00835"></a><a class="code" href="classTiXmlAttribute.html#ab7fa3d21ff8d7c5764cf9af15b667a99">00835</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#ab7fa3d21ff8d7c5764cf9af15b667a99" title="Set the name of this attribute.">SetName</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name ) { name = _name; }
<a name="l00836"></a><a class="code" href="classTiXmlAttribute.html#a2dae44178f668b3cb48101be4f2236a0">00836</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a2dae44178f668b3cb48101be4f2236a0" title="Set the value.">SetValue</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) { value = _value; }
<a name="l00837"></a>00837
<a name="l00838"></a>00838 <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a7e065df640116a62ea4f4b7da5449cc8" title="Set the value from an integer.">SetIntValue</a>( <span class="keywordtype">int</span> _value );
<a name="l00839"></a>00839 <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a0316da31373496c4368ad549bf711394" title="Set the value from a double.">SetDoubleValue</a>( <span class="keywordtype">double</span> _value );
<a name="l00840"></a>00840
<a name="l00841"></a>00841 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00843"></a><a class="code" href="classTiXmlAttribute.html#ab296ff0c9a8c701055cd257a8a976e57">00843</a> <span class="preprocessor"> void SetName( const std::string& _name ) { name = _name; } </span>
<a name="l00845"></a><a class="code" href="classTiXmlAttribute.html#ab43f67a0cc3ec1d80e62606500f0925f">00845</a> <span class="preprocessor"> void SetValue( const std::string& _value ) { value = _value; }</span>
<a name="l00846"></a>00846 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
<a name="l00847"></a>00847 <span class="preprocessor"></span>
<a name="l00849"></a>00849 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a1c78e92e223a40843f644ba48ef69f67" title="Get the next sibling attribute in the DOM. Returns null at end.">Next</a>() <span class="keyword">const</span>;
<a name="l00850"></a>00850 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a1c78e92e223a40843f644ba48ef69f67" title="Get the next sibling attribute in the DOM. Returns null at end.">Next</a>() {
<a name="l00851"></a>00851 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->Next() );
<a name="l00852"></a>00852 }
<a name="l00853"></a>00853
<a name="l00855"></a>00855 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a6ebbfe333fe76cd834bd6cbcca3130cf" title="Get the previous sibling attribute in the DOM. Returns null at beginning.">Previous</a>() <span class="keyword">const</span>;
<a name="l00856"></a>00856 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a6ebbfe333fe76cd834bd6cbcca3130cf" title="Get the previous sibling attribute in the DOM. Returns null at beginning.">Previous</a>() {
<a name="l00857"></a>00857 <span class="keywordflow">return</span> <span class="keyword">const_cast<</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">></span>( (<span class="keyword">const_cast<</span> <span class="keyword">const </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">></span>(<span class="keyword">this</span>))->Previous() );
<a name="l00858"></a>00858 }
<a name="l00859"></a>00859
<a name="l00860"></a>00860 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>& rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rhs.name == name; }
<a name="l00861"></a>00861 <span class="keywordtype">bool</span> operator<( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>& rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name < rhs.name; }
<a name="l00862"></a>00862 <span class="keywordtype">bool</span> operator>( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>& rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name > rhs.name; }
<a name="l00863"></a>00863
<a name="l00864"></a>00864 <span class="comment">/* Attribute parsing starts: first letter of the name</span>
<a name="l00865"></a>00865 <span class="comment"> returns: the next char after the value end quote</span>
<a name="l00866"></a>00866 <span class="comment"> */</span>
<a name="l00867"></a>00867 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l00868"></a>00868
<a name="l00869"></a>00869 <span class="comment">// Prints this Attribute to a FILE stream.</span>
<a name="l00870"></a><a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a">00870</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth )<span class="keyword"> const </span>{
<a name="l00871"></a>00871 <a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( cfile, depth, 0 );
<a name="l00872"></a>00872 }
<a name="l00873"></a>00873 <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth, TIXML_STRING* str ) <span class="keyword">const</span>;
<a name="l00874"></a>00874
<a name="l00875"></a>00875 <span class="comment">// [internal use]</span>
<a name="l00876"></a>00876 <span class="comment">// Set the document pointer so the attribute can report errors.</span>
<a name="l00877"></a>00877 <span class="keywordtype">void</span> SetDocument( <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* doc ) { document = doc; }
<a name="l00878"></a>00878
<a name="l00879"></a>00879 <span class="keyword">private</span>:
<a name="l00880"></a>00880 <a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1" title="Construct an empty attribute.">TiXmlAttribute</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>& ); <span class="comment">// not implemented.</span>
<a name="l00881"></a>00881 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>& base ); <span class="comment">// not allowed.</span>
<a name="l00882"></a>00882
<a name="l00883"></a>00883 <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* document; <span class="comment">// A pointer back to a document, for error reporting.</span>
<a name="l00884"></a>00884 TIXML_STRING name;
<a name="l00885"></a>00885 TIXML_STRING value;
<a name="l00886"></a>00886 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* prev;
<a name="l00887"></a>00887 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* next;
<a name="l00888"></a>00888 };
<a name="l00889"></a>00889
<a name="l00890"></a>00890
<a name="l00891"></a>00891 <span class="comment">/* A class used to manage a group of attributes.</span>
<a name="l00892"></a>00892 <span class="comment"> It is only used internally, both by the ELEMENT and the DECLARATION.</span>
<a name="l00893"></a>00893 <span class="comment"> </span>
<a name="l00894"></a>00894 <span class="comment"> The set can be changed transparent to the Element and Declaration</span>
<a name="l00895"></a>00895 <span class="comment"> classes that use it, but NOT transparent to the Attribute</span>
<a name="l00896"></a>00896 <span class="comment"> which has to implement a next() and previous() method. Which makes</span>
<a name="l00897"></a>00897 <span class="comment"> it a bit problematic and prevents the use of STL.</span>
<a name="l00898"></a>00898 <span class="comment"></span>
<a name="l00899"></a>00899 <span class="comment"> This version is implemented with circular lists because:</span>
<a name="l00900"></a>00900 <span class="comment"> - I like circular lists</span>
<a name="l00901"></a>00901 <span class="comment"> - it demonstrates some independence from the (typical) doubly linked list.</span>
<a name="l00902"></a>00902 <span class="comment">*/</span>
<a name="l00903"></a>00903 <span class="keyword">class </span>TiXmlAttributeSet
<a name="l00904"></a>00904 {
<a name="l00905"></a>00905 <span class="keyword">public</span>:
<a name="l00906"></a>00906 TiXmlAttributeSet();
<a name="l00907"></a>00907 ~TiXmlAttributeSet();
<a name="l00908"></a>00908
<a name="l00909"></a>00909 <span class="keywordtype">void</span> Add( <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* attribute );
<a name="l00910"></a>00910 <span class="keywordtype">void</span> Remove( <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* attribute );
<a name="l00911"></a>00911
<a name="l00912"></a>00912 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* First()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
<a name="l00913"></a>00913 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* First() { <span class="keywordflow">return</span> ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
<a name="l00914"></a>00914 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Last()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
<a name="l00915"></a>00915 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Last() { <span class="keywordflow">return</span> ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
<a name="l00916"></a>00916
<a name="l00917"></a>00917 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Find( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name ) <span class="keyword">const</span>;
<a name="l00918"></a>00918 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* FindOrCreate( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name );
<a name="l00919"></a>00919
<a name="l00920"></a>00920 <span class="preprocessor"># ifdef TIXML_USE_STL</span>
<a name="l00921"></a>00921 <span class="preprocessor"></span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Find( <span class="keyword">const</span> std::string& _name ) <span class="keyword">const</span>;
<a name="l00922"></a>00922 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* FindOrCreate( <span class="keyword">const</span> std::string& _name );
<a name="l00923"></a>00923 <span class="preprocessor"># endif</span>
<a name="l00924"></a>00924 <span class="preprocessor"></span>
<a name="l00925"></a>00925
<a name="l00926"></a>00926 <span class="keyword">private</span>:
<a name="l00927"></a>00927 <span class="comment">//*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),</span>
<a name="l00928"></a>00928 <span class="comment">//*ME: this class must be also use a hidden/disabled copy-constructor !!!</span>
<a name="l00929"></a>00929 TiXmlAttributeSet( <span class="keyword">const</span> TiXmlAttributeSet& ); <span class="comment">// not allowed</span>
<a name="l00930"></a>00930 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> TiXmlAttributeSet& ); <span class="comment">// not allowed (as TiXmlAttribute)</span>
<a name="l00931"></a>00931
<a name="l00932"></a>00932 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a> sentinel;
<a name="l00933"></a>00933 };
<a name="l00934"></a>00934
<a name="l00935"></a>00935
<a name="l00940"></a><a class="code" href="classTiXmlElement.html">00940</a> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>
<a name="l00941"></a>00941 {
<a name="l00942"></a>00942 <span class="keyword">public</span>:
<a name="l00944"></a>00944 <a class="code" href="classTiXmlElement.html#a01bc3ab372d35da08efcbbe65ad90c60" title="Construct an element.">TiXmlElement</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * in_value);
<a name="l00945"></a>00945
<a name="l00946"></a>00946 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l00948"></a>00948 <span class="preprocessor"> TiXmlElement( const std::string& _value );</span>
<a name="l00949"></a>00949 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
<a name="l00950"></a>00950 <span class="preprocessor"></span>
<a name="l00951"></a>00951 <a class="code" href="classTiXmlElement.html#a01bc3ab372d35da08efcbbe65ad90c60" title="Construct an element.">TiXmlElement</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& );
<a name="l00952"></a>00952
<a name="l00953"></a>00953 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& base );
<a name="l00954"></a>00954
<a name="l00955"></a>00955 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>();
<a name="l00956"></a>00956
<a name="l00960"></a>00960 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name ) <span class="keyword">const</span>;
<a name="l00961"></a>00961
<a name="l00968"></a>00968 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>;
<a name="l00969"></a>00969
<a name="l00976"></a>00976 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>;
<a name="l00977"></a>00977
<a name="l00985"></a>00985 <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9" title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
<a name="l00987"></a>00987 <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7" title="QueryDoubleAttribute examines the attribute - see QueryIntAttribute().">QueryDoubleAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
<a name="l00989"></a><a class="code" href="classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be">00989</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be" title="QueryFloatAttribute examines the attribute - see QueryIntAttribute().">QueryFloatAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">float</span>* _value )<span class="keyword"> const </span>{
<a name="l00990"></a>00990 <span class="keywordtype">double</span> d;
<a name="l00991"></a>00991 <span class="keywordtype">int</span> result = <a class="code" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7" title="QueryDoubleAttribute examines the attribute - see QueryIntAttribute().">QueryDoubleAttribute</a>( name, &d );
<a name="l00992"></a>00992 <span class="keywordflow">if</span> ( result == TIXML_SUCCESS ) {
<a name="l00993"></a>00993 *_value = (float)d;
<a name="l00994"></a>00994 }
<a name="l00995"></a>00995 <span class="keywordflow">return</span> result;
<a name="l00996"></a>00996 }
<a name="l00997"></a>00997
<a name="l00998"></a>00998 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01000"></a><a class="code" href="classTiXmlElement.html#a14321ac360efe906ed449d9db3fd9961">01000</a> <span class="preprocessor"> int QueryStringAttribute( const char* name, std::string* _value ) const {</span>
<a name="l01001"></a>01001 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">char</span>* cstr = <a class="code" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute</a>( name );
<a name="l01002"></a>01002 <span class="keywordflow">if</span> ( cstr ) {
<a name="l01003"></a>01003 *_value = std::string( cstr );
<a name="l01004"></a>01004 <span class="keywordflow">return</span> TIXML_SUCCESS;
<a name="l01005"></a>01005 }
<a name="l01006"></a>01006 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE;
<a name="l01007"></a>01007 }
<a name="l01008"></a>01008
<a name="l01017"></a><a class="code" href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">01017</a> <span class="keyword">template</span>< <span class="keyword">typename</span> T > <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string& name, T* outValue )<span class="keyword"> const</span>
<a name="l01018"></a>01018 <span class="keyword"> </span>{
<a name="l01019"></a>01019 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* node = attributeSet.Find( name );
<a name="l01020"></a>01020 <span class="keywordflow">if</span> ( !node )
<a name="l01021"></a>01021 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE;
<a name="l01022"></a>01022
<a name="l01023"></a>01023 std::stringstream sstream( node-><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>() );
<a name="l01024"></a>01024 sstream >> *outValue;
<a name="l01025"></a>01025 <span class="keywordflow">if</span> ( !sstream.fail() )
<a name="l01026"></a>01026 <span class="keywordflow">return</span> TIXML_SUCCESS;
<a name="l01027"></a>01027 <span class="keywordflow">return</span> TIXML_WRONG_TYPE;
<a name="l01028"></a>01028 }
<a name="l01029"></a>01029
<a name="l01030"></a>01030 <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string& name, std::string* outValue )<span class="keyword"> const</span>
<a name="l01031"></a>01031 <span class="keyword"> </span>{
<a name="l01032"></a>01032 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* node = attributeSet.Find( name );
<a name="l01033"></a>01033 <span class="keywordflow">if</span> ( !node )
<a name="l01034"></a>01034 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE;
<a name="l01035"></a>01035 *outValue = node-><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>();
<a name="l01036"></a>01036 <span class="keywordflow">return</span> TIXML_SUCCESS;
<a name="l01037"></a>01037 }
<a name="l01038"></a>01038 <span class="preprocessor"> #endif</span>
<a name="l01039"></a>01039 <span class="preprocessor"></span>
<a name="l01043"></a>01043 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value );
<a name="l01044"></a>01044
<a name="l01045"></a>01045 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01046"></a>01046 <span class="preprocessor"></span> <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name ) <span class="keyword">const</span>;
<a name="l01047"></a>01047 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>;
<a name="l01048"></a>01048 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>;
<a name="l01049"></a>01049 <span class="keywordtype">int</span> QueryIntAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
<a name="l01050"></a>01050 <span class="keywordtype">int</span> QueryDoubleAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
<a name="l01051"></a>01051
<a name="l01053"></a>01053 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string& name, <span class="keyword">const</span> std::string& _value );
<a name="l01055"></a>01055 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span> _value );
<a name="l01057"></a>01057 <span class="keywordtype">void</span> SetDoubleAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span> value );
<a name="l01058"></a>01058 <span class="preprocessor"> #endif</span>
<a name="l01059"></a>01059 <span class="preprocessor"></span>
<a name="l01063"></a>01063 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">int</span> value );
<a name="l01064"></a>01064
<a name="l01068"></a>01068 <span class="keywordtype">void</span> SetDoubleAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">double</span> value );
<a name="l01069"></a>01069
<a name="l01072"></a>01072 <span class="keywordtype">void</span> RemoveAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name );
<a name="l01073"></a>01073 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01074"></a><a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a">01074</a> <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a" title="STL std::string form.">RemoveAttribute</a>( <span class="keyword">const</span> std::string& name ) { <a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a" title="STL std::string form.">RemoveAttribute</a> (name.c_str ()); }
<a name="l01075"></a>01075 <span class="preprocessor"> #endif</span>
<a name="l01076"></a>01076 <span class="preprocessor"></span>
<a name="l01077"></a><a class="code" href="classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592">01077</a> <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592" title="Access the first attribute in this element.">FirstAttribute</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> attributeSet.First(); }
<a name="l01078"></a>01078 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* FirstAttribute() { <span class="keywordflow">return</span> attributeSet.First(); }
<a name="l01079"></a><a class="code" href="classTiXmlElement.html#a86191b49f9177be132b85b14655f1381">01079</a> <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a86191b49f9177be132b85b14655f1381" title="Access the last attribute in this element.">LastAttribute</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> attributeSet.Last(); }
<a name="l01080"></a>01080 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* LastAttribute() { <span class="keywordflow">return</span> attributeSet.Last(); }
<a name="l01081"></a>01081
<a name="l01114"></a>01114 <span class="keyword">const</span> <span class="keywordtype">char</span>* GetText() <span class="keyword">const</span>;
<a name="l01115"></a>01115
<a name="l01117"></a>01117 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* Clone() <span class="keyword">const</span>;
<a name="l01118"></a>01118 <span class="comment">// Print the Element to a FILE stream.</span>
<a name="l01119"></a>01119 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01120"></a>01120
<a name="l01121"></a>01121 <span class="comment">/* Attribtue parsing starts: next char past '<'</span>
<a name="l01122"></a>01122 <span class="comment"> returns: next char past '>'</span>
<a name="l01123"></a>01123 <span class="comment"> */</span>
<a name="l01124"></a>01124 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01125"></a>01125
<a name="l01126"></a><a class="code" href="classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c">01126</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c" title="Cast to a more defined type. Will return null not of the requested type.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01127"></a><a class="code" href="classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a">01127</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a" title="Cast to a more defined type. Will return null not of the requested type.">ToElement</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01128"></a>01128
<a name="l01131"></a>01131 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> Accept( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
<a name="l01132"></a>01132
<a name="l01133"></a>01133 <span class="keyword">protected</span>:
<a name="l01134"></a>01134
<a name="l01135"></a>01135 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* target ) <span class="keyword">const</span>;
<a name="l01136"></a>01136 <span class="keywordtype">void</span> ClearThis(); <span class="comment">// like clear, but initializes 'this' object as well</span>
<a name="l01137"></a>01137
<a name="l01138"></a>01138 <span class="comment">// Used to be public [internal use]</span>
<a name="l01139"></a>01139 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01140"></a>01140 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
<a name="l01141"></a>01141 <span class="preprocessor"> #endif</span>
<a name="l01142"></a>01142 <span class="preprocessor"></span> <span class="comment">/* [internal use]</span>
<a name="l01143"></a>01143 <span class="comment"> Reads the "value" of the element -- another element, or text.</span>
<a name="l01144"></a>01144 <span class="comment"> This should terminate with the current end tag.</span>
<a name="l01145"></a>01145 <span class="comment"> */</span>
<a name="l01146"></a>01146 <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadValue( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
<a name="l01147"></a>01147
<a name="l01148"></a>01148 <span class="keyword">private</span>:
<a name="l01149"></a>01149 TiXmlAttributeSet attributeSet;
<a name="l01150"></a>01150 };
<a name="l01151"></a>01151
<a name="l01152"></a>01152
<a name="l01155"></a><a class="code" href="classTiXmlComment.html">01155</a> <span class="keyword">class </span><a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>
<a name="l01156"></a>01156 {
<a name="l01157"></a>01157 <span class="keyword">public</span>:
<a name="l01159"></a><a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7">01159</a> <a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7" title="Constructs an empty comment.">TiXmlComment</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_COMMENT ) {}
<a name="l01161"></a><a class="code" href="classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47">01161</a> <a class="code" href="classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47" title="Construct a comment from text.">TiXmlComment</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_COMMENT ) {
<a name="l01162"></a>01162 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( _value );
<a name="l01163"></a>01163 }
<a name="l01164"></a>01164 <a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7" title="Constructs an empty comment.">TiXmlComment</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& );
<a name="l01165"></a>01165 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& base );
<a name="l01166"></a>01166
<a name="l01167"></a>01167 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>() {}
<a name="l01168"></a>01168
<a name="l01170"></a>01170 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlComment.html#a0d6662bdc52488b9e12b3c7a0453d028" title="Returns a copy of this Comment.">Clone</a>() <span class="keyword">const</span>;
<a name="l01171"></a>01171 <span class="comment">// Write this Comment to a FILE stream.</span>
<a name="l01172"></a>01172 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlComment.html#a6b316527aaa8da0370cd68c22a5a0f5f" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01173"></a>01173
<a name="l01174"></a>01174 <span class="comment">/* Attribtue parsing starts: at the ! of the !--</span>
<a name="l01175"></a>01175 <span class="comment"> returns: next char past '>'</span>
<a name="l01176"></a>01176 <span class="comment"> */</span>
<a name="l01177"></a>01177 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01178"></a>01178
<a name="l01179"></a><a class="code" href="classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0">01179</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0" title="Cast to a more defined type. Will return null not of the requested type.">ToComment</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01180"></a><a class="code" href="classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df">01180</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df" title="Cast to a more defined type. Will return null not of the requested type.">ToComment</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01181"></a>01181
<a name="l01184"></a>01184 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlComment.html#af3ac1b99fbbe9ea4fb6e14146156e43e" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
<a name="l01185"></a>01185
<a name="l01186"></a>01186 <span class="keyword">protected</span>:
<a name="l01187"></a>01187 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* target ) <span class="keyword">const</span>;
<a name="l01188"></a>01188
<a name="l01189"></a>01189 <span class="comment">// used to be public</span>
<a name="l01190"></a>01190 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01191"></a>01191 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
<a name="l01192"></a>01192 <span class="preprocessor"> #endif</span>
<a name="l01193"></a>01193 <span class="preprocessor"></span><span class="comment">// virtual void StreamOut( TIXML_OSTREAM * out ) const;</span>
<a name="l01194"></a>01194
<a name="l01195"></a>01195 <span class="keyword">private</span>:
<a name="l01196"></a>01196
<a name="l01197"></a>01197 };
<a name="l01198"></a>01198
<a name="l01199"></a>01199
<a name="l01205"></a><a class="code" href="classTiXmlText.html">01205</a> <span class="keyword">class </span><a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>
<a name="l01206"></a>01206 {
<a name="l01207"></a>01207 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>;
<a name="l01208"></a>01208 <span class="keyword">public</span>:
<a name="l01213"></a><a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960">01213</a> <a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960" title="Constructor for text element.">TiXmlText</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * initValue ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> (<a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_TEXT)
<a name="l01214"></a>01214 {
<a name="l01215"></a>01215 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue );
<a name="l01216"></a>01216 cdata = <span class="keyword">false</span>;
<a name="l01217"></a>01217 }
<a name="l01218"></a>01218 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>() {}
<a name="l01219"></a>01219
<a name="l01220"></a>01220 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01222"></a><a class="code" href="classTiXmlText.html#a439792f6183a3d3fb6f2bc2b16fa5691">01222</a> <span class="preprocessor"> TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)</span>
<a name="l01223"></a>01223 <span class="preprocessor"></span> {
<a name="l01224"></a>01224 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue );
<a name="l01225"></a>01225 cdata = <span class="keyword">false</span>;
<a name="l01226"></a>01226 }
<a name="l01227"></a>01227 <span class="preprocessor"> #endif</span>
<a name="l01228"></a>01228 <span class="preprocessor"></span>
<a name="l01229"></a>01229 <a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960" title="Constructor for text element.">TiXmlText</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& copy ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_TEXT ) { copy.CopyTo( <span class="keyword">this</span> ); }
<a name="l01230"></a>01230 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& base ) { base.CopyTo( <span class="keyword">this</span> ); }
<a name="l01231"></a>01231
<a name="l01232"></a>01232 <span class="comment">// Write this text object to a FILE stream.</span>
<a name="l01233"></a>01233 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#a0cafbf6f236c7f02d12b2bffc2b7976b" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01234"></a>01234
<a name="l01236"></a><a class="code" href="classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586">01236</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586" title="Queries whether this represents text using a CDATA section.">CDATA</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cdata; }
<a name="l01238"></a><a class="code" href="classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9">01238</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9" title="Turns on or off a CDATA representation of text.">SetCDATA</a>( <span class="keywordtype">bool</span> _cdata ) { cdata = _cdata; }
<a name="l01239"></a>01239
<a name="l01240"></a>01240 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01241"></a>01241
<a name="l01242"></a><a class="code" href="classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648">01242</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648" title="Cast to a more defined type. Will return null not of the requested type.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01243"></a><a class="code" href="classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b">01243</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b" title="Cast to a more defined type. Will return null not of the requested type.">ToText</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01244"></a>01244
<a name="l01247"></a>01247 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#a8483d4415ce9de6c4fa8f63d067d5de6" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
<a name="l01248"></a>01248
<a name="l01249"></a>01249 <span class="keyword">protected</span> :
<a name="l01251"></a>01251 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlText.html#a0c411e93a27537369479d034cc82da3b" title="[internal use] Creates a new Element and returns it.">Clone</a>() <span class="keyword">const</span>;
<a name="l01252"></a>01252 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* target ) <span class="keyword">const</span>;
<a name="l01253"></a>01253
<a name="l01254"></a>01254 <span class="keywordtype">bool</span> Blank() <span class="keyword">const</span>; <span class="comment">// returns true if all white space and new lines</span>
<a name="l01255"></a>01255 <span class="comment">// [internal use]</span>
<a name="l01256"></a>01256 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01257"></a>01257 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
<a name="l01258"></a>01258 <span class="preprocessor"> #endif</span>
<a name="l01259"></a>01259 <span class="preprocessor"></span>
<a name="l01260"></a>01260 <span class="keyword">private</span>:
<a name="l01261"></a>01261 <span class="keywordtype">bool</span> cdata; <span class="comment">// true if this should be input and output as a CDATA style text element</span>
<a name="l01262"></a>01262 };
<a name="l01263"></a>01263
<a name="l01264"></a>01264
<a name="l01278"></a><a class="code" href="classTiXmlDeclaration.html">01278</a> <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>
<a name="l01279"></a>01279 {
<a name="l01280"></a>01280 <span class="keyword">public</span>:
<a name="l01282"></a><a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79">01282</a> <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_DECLARATION ) {}
<a name="l01283"></a>01283
<a name="l01284"></a>01284 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
<a name="l01286"></a>01286 <span class="preprocessor"> TiXmlDeclaration( const std::string& _version,</span>
<a name="l01287"></a>01287 <span class="preprocessor"></span> <span class="keyword">const</span> std::string& _encoding,
<a name="l01288"></a>01288 <span class="keyword">const</span> std::string& _standalone );
<a name="l01289"></a>01289 <span class="preprocessor">#endif</span>
<a name="l01290"></a>01290 <span class="preprocessor"></span>
<a name="l01292"></a>01292 <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _version,
<a name="l01293"></a>01293 <span class="keyword">const</span> <span class="keywordtype">char</span>* _encoding,
<a name="l01294"></a>01294 <span class="keyword">const</span> <span class="keywordtype">char</span>* _standalone );
<a name="l01295"></a>01295
<a name="l01296"></a>01296 <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& copy );
<a name="l01297"></a>01297 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& copy );
<a name="l01298"></a>01298
<a name="l01299"></a>01299 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>() {}
<a name="l01300"></a>01300
<a name="l01302"></a><a class="code" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76">01302</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76" title="Version. Will return an empty string if none was found.">Version</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> version.c_str (); }
<a name="l01304"></a><a class="code" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76">01304</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76" title="Encoding. Will return an empty string if none was found.">Encoding</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> encoding.c_str (); }
<a name="l01306"></a><a class="code" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9">01306</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9" title="Is this a standalone document?">Standalone</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> standalone.c_str (); }
<a name="l01307"></a>01307
<a name="l01309"></a>01309 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlDeclaration.html#a7cf459186040141cda7a180a6585ce2e" title="Creates a copy of this Declaration and returns it.">Clone</a>() <span class="keyword">const</span>;
<a name="l01310"></a>01310 <span class="comment">// Print this declaration to a FILE stream.</span>
<a name="l01311"></a>01311 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth, TIXML_STRING* str ) <span class="keyword">const</span>;
<a name="l01312"></a><a class="code" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4">01312</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth )<span class="keyword"> const </span>{
<a name="l01313"></a>01313 Print( cfile, depth, 0 );
<a name="l01314"></a>01314 }
<a name="l01315"></a>01315
<a name="l01316"></a>01316 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01317"></a>01317
<a name="l01318"></a><a class="code" href="classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967">01318</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967" title="Cast to a more defined type. Will return null not of the requested type.">ToDeclaration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01319"></a><a class="code" href="classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce">01319</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce" title="Cast to a more defined type. Will return null not of the requested type.">ToDeclaration</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01320"></a>01320
<a name="l01323"></a>01323 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDeclaration.html#a22315a535983b86535cdba3458669e3e" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
<a name="l01324"></a>01324
<a name="l01325"></a>01325 <span class="keyword">protected</span>:
<a name="l01326"></a>01326 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* target ) <span class="keyword">const</span>;
<a name="l01327"></a>01327 <span class="comment">// used to be public</span>
<a name="l01328"></a>01328 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01329"></a>01329 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
<a name="l01330"></a>01330 <span class="preprocessor"> #endif</span>
<a name="l01331"></a>01331 <span class="preprocessor"></span>
<a name="l01332"></a>01332 <span class="keyword">private</span>:
<a name="l01333"></a>01333
<a name="l01334"></a>01334 TIXML_STRING version;
<a name="l01335"></a>01335 TIXML_STRING encoding;
<a name="l01336"></a>01336 TIXML_STRING standalone;
<a name="l01337"></a>01337 };
<a name="l01338"></a>01338
<a name="l01339"></a>01339
<a name="l01347"></a><a class="code" href="classTiXmlUnknown.html">01347</a> <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>
<a name="l01348"></a>01348 {
<a name="l01349"></a>01349 <span class="keyword">public</span>:
<a name="l01350"></a>01350 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( TiXmlNode::TINYXML_UNKNOWN ) {}
<a name="l01351"></a>01351 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>() {}
<a name="l01352"></a>01352
<a name="l01353"></a>01353 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& copy ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( <span class="keyword">this</span> ); }
<a name="l01354"></a>01354 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& copy ) { copy.CopyTo( <span class="keyword">this</span> ); }
<a name="l01355"></a>01355
<a name="l01357"></a>01357 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlUnknown.html#a0960bb7428b3f341da46244229604d73" title="Creates a copy of this Unknown and returns it.">Clone</a>() <span class="keyword">const</span>;
<a name="l01358"></a>01358 <span class="comment">// Print this Unknown to a FILE stream.</span>
<a name="l01359"></a>01359 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlUnknown.html#a31ba089a40fb5a1869750fce09b0bacb" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01360"></a>01360
<a name="l01361"></a>01361 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01362"></a>01362
<a name="l01363"></a><a class="code" href="classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d">01363</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d" title="Cast to a more defined type. Will return null not of the requested type.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01364"></a><a class="code" href="classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c">01364</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c" title="Cast to a more defined type. Will return null not of the requested type.">ToUnknown</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01365"></a>01365
<a name="l01368"></a>01368 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlUnknown.html#ad7122e5135581b3c832a1a3217760a93" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
<a name="l01369"></a>01369
<a name="l01370"></a>01370 <span class="keyword">protected</span>:
<a name="l01371"></a>01371 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* target ) <span class="keyword">const</span>;
<a name="l01372"></a>01372
<a name="l01373"></a>01373 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01374"></a>01374 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
<a name="l01375"></a>01375 <span class="preprocessor"> #endif</span>
<a name="l01376"></a>01376 <span class="preprocessor"></span>
<a name="l01377"></a>01377 <span class="keyword">private</span>:
<a name="l01378"></a>01378
<a name="l01379"></a>01379 };
<a name="l01380"></a>01380
<a name="l01381"></a>01381
<a name="l01386"></a><a class="code" href="classTiXmlDocument.html">01386</a> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>
<a name="l01387"></a>01387 {
<a name="l01388"></a>01388 <span class="keyword">public</span>:
<a name="l01390"></a>01390 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>();
<a name="l01392"></a>01392 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * documentName );
<a name="l01393"></a>01393
<a name="l01394"></a>01394 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01396"></a>01396 <span class="preprocessor"> TiXmlDocument( const std::string& documentName );</span>
<a name="l01397"></a>01397 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
<a name="l01398"></a>01398 <span class="preprocessor"></span>
<a name="l01399"></a>01399 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& copy );
<a name="l01400"></a>01400 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& copy );
<a name="l01401"></a>01401
<a name="l01402"></a>01402 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>() {}
<a name="l01403"></a>01403
<a name="l01408"></a>01408 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
<a name="l01410"></a>01410 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>() <span class="keyword">const</span>;
<a name="l01412"></a>01412 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
<a name="l01414"></a>01414 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename ) <span class="keyword">const</span>;
<a name="l01420"></a>01420 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
<a name="l01422"></a>01422 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( FILE* ) <span class="keyword">const</span>;
<a name="l01423"></a>01423
<a name="l01424"></a>01424 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01425"></a><a class="code" href="classTiXmlDocument.html#a18ae6ed34fed7991ebc220862dfac884">01425</a> <span class="preprocessor"></span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( <span class="keyword">const</span> std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )
<a name="l01426"></a>01426 {
<a name="l01427"></a>01427 <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( filename.c_str(), encoding );
<a name="l01428"></a>01428 }
<a name="l01429"></a><a class="code" href="classTiXmlDocument.html#a3d4fae0463f3f03679ba0b7cf6f2df52">01429</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( <span class="keyword">const</span> std::string& filename ) <span class="keyword">const</span>
<a name="l01430"></a>01430 {
<a name="l01431"></a>01431 <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( filename.c_str() );
<a name="l01432"></a>01432 }
<a name="l01433"></a>01433 <span class="preprocessor"> #endif</span>
<a name="l01434"></a>01434 <span class="preprocessor"></span>
<a name="l01439"></a>01439 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378" title="Parse the given null terminated block of xml data.">Parse</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
<a name="l01440"></a>01440
<a name="l01445"></a><a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be">01445</a> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be" title="Get the root element -- the only top level element -- of the document.">RootElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>(); }
<a name="l01446"></a>01446 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be" title="Get the root element -- the only top level element -- of the document.">RootElement</a>() { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>(); }
<a name="l01447"></a>01447
<a name="l01453"></a><a class="code" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29">01453</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29" title="If an error occurs, Error will be set to true.">Error</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> error; }
<a name="l01454"></a>01454
<a name="l01456"></a><a class="code" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e">01456</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorDesc.c_str (); }
<a name="l01457"></a>01457
<a name="l01461"></a><a class="code" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f">01461</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f" title="Generally, you probably want the error string ( ErrorDesc() ).">ErrorId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorId; }
<a name="l01462"></a>01462
<a name="l01470"></a><a class="code" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">01470</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e" title="Returns the location (if known) of the error.">ErrorRow</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorLocation.row+1; }
<a name="l01471"></a><a class="code" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649">01471</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow().">ErrorCol</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorLocation.col+1; }
<a name="l01472"></a>01472
<a name="l01497"></a><a class="code" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">01497</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">SetTabSize</a>( <span class="keywordtype">int</span> _tabsize ) { tabsize = _tabsize; }
<a name="l01498"></a>01498
<a name="l01499"></a>01499 <span class="keywordtype">int</span> TabSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tabsize; }
<a name="l01500"></a>01500
<a name="l01504"></a><a class="code" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35">01504</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35" title="If you have handled the error, it can be reset with this call.">ClearError</a>() { error = <span class="keyword">false</span>;
<a name="l01505"></a>01505 errorId = 0;
<a name="l01506"></a>01506 errorDesc = <span class="stringliteral">""</span>;
<a name="l01507"></a>01507 errorLocation.row = errorLocation.col = 0;
<a name="l01508"></a>01508 <span class="comment">//errorLocation.last = 0; </span>
<a name="l01509"></a>01509 }
<a name="l01510"></a>01510
<a name="l01512"></a><a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510">01512</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>()<span class="keyword"> const </span>{ <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>( stdout, 0 ); }
<a name="l01513"></a>01513
<a name="l01514"></a>01514 <span class="comment">/* Write the document to a string using formatted printing ("pretty print"). This</span>
<a name="l01515"></a>01515 <span class="comment"> will allocate a character array (new char[]) and return it as a pointer. The</span>
<a name="l01516"></a>01516 <span class="comment"> calling code pust call delete[] on the return char* to avoid a memory leak.</span>
<a name="l01517"></a>01517 <span class="comment"> */</span>
<a name="l01518"></a>01518 <span class="comment">//char* PrintToMemory() const; </span>
<a name="l01519"></a>01519
<a name="l01521"></a>01521 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth = 0 ) <span class="keyword">const</span>;
<a name="l01522"></a>01522 <span class="comment">// [internal use]</span>
<a name="l01523"></a>01523 <span class="keywordtype">void</span> SetError( <span class="keywordtype">int</span> err, <span class="keyword">const</span> <span class="keywordtype">char</span>* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
<a name="l01524"></a>01524
<a name="l01525"></a><a class="code" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4">01525</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4" title="Cast to a more defined type. Will return null not of the requested type.">ToDocument</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01526"></a><a class="code" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42">01526</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42" title="Cast to a more defined type. Will return null not of the requested type.">ToDocument</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; }
<a name="l01527"></a>01527
<a name="l01530"></a>01530 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#aa545aae325d9752ad64120bc4ecf939a" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
<a name="l01531"></a>01531
<a name="l01532"></a>01532 <span class="keyword">protected</span> :
<a name="l01533"></a>01533 <span class="comment">// [internal use]</span>
<a name="l01534"></a>01534 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlDocument.html#a4968661cab4a1f44a23329c6f8db1907" title="Create an exact duplicate of this node and return it.">Clone</a>() <span class="keyword">const</span>;
<a name="l01535"></a>01535 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01536"></a>01536 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
<a name="l01537"></a>01537 <span class="preprocessor"> #endif</span>
<a name="l01538"></a>01538 <span class="preprocessor"></span>
<a name="l01539"></a>01539 <span class="keyword">private</span>:
<a name="l01540"></a>01540 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* target ) <span class="keyword">const</span>;
<a name="l01541"></a>01541
<a name="l01542"></a>01542 <span class="keywordtype">bool</span> error;
<a name="l01543"></a>01543 <span class="keywordtype">int</span> errorId;
<a name="l01544"></a>01544 TIXML_STRING errorDesc;
<a name="l01545"></a>01545 <span class="keywordtype">int</span> tabsize;
<a name="l01546"></a>01546 TiXmlCursor errorLocation;
<a name="l01547"></a>01547 <span class="keywordtype">bool</span> useMicrosoftBOM; <span class="comment">// the UTF-8 BOM were found when read. Note this, and try to write.</span>
<a name="l01548"></a>01548 };
<a name="l01549"></a>01549
<a name="l01550"></a>01550
<a name="l01631"></a><a class="code" href="classTiXmlHandle.html">01631</a> <span class="keyword">class </span><a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a>
<a name="l01632"></a>01632 {
<a name="l01633"></a>01633 <span class="keyword">public</span>:
<a name="l01635"></a><a class="code" href="classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8">01635</a> <a class="code" href="classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8" title="Create a handle from any node (at any depth of the tree.) This can be a null pointer...">TiXmlHandle</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* _node ) { this->node = _node; }
<a name="l01637"></a><a class="code" href="classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7">01637</a> <a class="code" href="classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7" title="Copy constructor.">TiXmlHandle</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a>& ref ) { this->node = ref.node; }
<a name="l01638"></a>01638 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a>& ref ) { this->node = ref.node; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
<a name="l01639"></a>01639
<a name="l01641"></a>01641 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>() <span class="keyword">const</span>;
<a name="l01643"></a>01643 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
<a name="l01645"></a>01645 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>() <span class="keyword">const</span>;
<a name="l01647"></a>01647 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
<a name="l01648"></a>01648
<a name="l01652"></a>01652 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01656"></a>01656 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01661"></a>01661 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01666"></a>01666 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01667"></a>01667
<a name="l01668"></a>01668 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01669"></a>01669 <span class="preprocessor"></span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( _value.c_str() ); }
<a name="l01670"></a>01670 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( _value.c_str() ); }
<a name="l01671"></a>01671
<a name="l01672"></a>01672 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keyword">const</span> std::string& _value, <span class="keywordtype">int</span> index )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( _value.c_str(), index ); }
<a name="l01673"></a>01673 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keyword">const</span> std::string& _value, <span class="keywordtype">int</span> index )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( _value.c_str(), index ); }
<a name="l01674"></a>01674 <span class="preprocessor"> #endif</span>
<a name="l01675"></a>01675 <span class="preprocessor"></span>
<a name="l01678"></a><a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3">01678</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3" title="Return the handle as a TiXmlNode.">ToNode</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> node; }
<a name="l01681"></a><a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e">01681</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e" title="Return the handle as a TiXmlElement.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }
<a name="l01684"></a><a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586">01684</a> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586" title="Return the handle as a TiXmlText.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToText() ) ? node->ToText() : 0 ); }
<a name="l01687"></a><a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674">01687</a> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674" title="Return the handle as a TiXmlUnknown.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }
<a name="l01688"></a>01688
<a name="l01692"></a><a class="code" href="classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376">01692</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376">Node</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3" title="Return the handle as a TiXmlNode.">ToNode</a>(); }
<a name="l01696"></a><a class="code" href="classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7">01696</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7">Element</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e" title="Return the handle as a TiXmlElement.">ToElement</a>(); }
<a name="l01700"></a><a class="code" href="classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13">01700</a> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13">Text</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586" title="Return the handle as a TiXmlText.">ToText</a>(); }
<a name="l01704"></a><a class="code" href="classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465">01704</a> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465">Unknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674" title="Return the handle as a TiXmlUnknown.">ToUnknown</a>(); }
<a name="l01705"></a>01705
<a name="l01706"></a>01706 <span class="keyword">private</span>:
<a name="l01707"></a>01707 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* node;
<a name="l01708"></a>01708 };
<a name="l01709"></a>01709
<a name="l01710"></a>01710
<a name="l01730"></a><a class="code" href="classTiXmlPrinter.html">01730</a> <span class="keyword">class </span><a class="code" href="classTiXmlPrinter.html" title="Print to memory functionality.">TiXmlPrinter</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>
<a name="l01731"></a>01731 {
<a name="l01732"></a>01732 <span class="keyword">public</span>:
<a name="l01733"></a>01733 <a class="code" href="classTiXmlPrinter.html" title="Print to memory functionality.">TiXmlPrinter</a>() : depth( 0 ), simpleTextPrint( <span class="keyword">false</span> ),
<a name="l01734"></a>01734 buffer(), indent( <span class="stringliteral">" "</span> ), lineBreak( <span class="stringliteral">"\n"</span> ) {}
<a name="l01735"></a>01735
<a name="l01736"></a>01736 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1" title="Visit a document.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& doc );
<a name="l01737"></a>01737 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2" title="Visit a document.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& doc );
<a name="l01738"></a>01738
<a name="l01739"></a>01739 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1" title="Visit a document.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& element, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* firstAttribute );
<a name="l01740"></a>01740 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2" title="Visit a document.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& element );
<a name="l01741"></a>01741
<a name="l01742"></a>01742 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& declaration );
<a name="l01743"></a>01743 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& text );
<a name="l01744"></a>01744 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& comment );
<a name="l01745"></a>01745 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& unknown );
<a name="l01746"></a>01746
<a name="l01750"></a><a class="code" href="classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e">01750</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e" title="Set the indent characters for printing.">SetIndent</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _indent ) { indent = _indent ? _indent : <span class="stringliteral">""</span> ; }
<a name="l01752"></a><a class="code" href="classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d">01752</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d" title="Query the indention string.">Indent</a>() { <span class="keywordflow">return</span> indent.c_str(); }
<a name="l01757"></a><a class="code" href="classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6">01757</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6" title="Set the line breaking string.">SetLineBreak</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : <span class="stringliteral">""</span>; }
<a name="l01759"></a><a class="code" href="classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d">01759</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d" title="Query the current line breaking string.">LineBreak</a>() { <span class="keywordflow">return</span> lineBreak.c_str(); }
<a name="l01760"></a>01760
<a name="l01764"></a><a class="code" href="classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19">01764</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19" title="Switch over to &quot;stream printing&quot; which is the most dense formatting without...">SetStreamPrinting</a>() { indent = <span class="stringliteral">""</span>;
<a name="l01765"></a>01765 lineBreak = <span class="stringliteral">""</span>;
<a name="l01766"></a>01766 }
<a name="l01768"></a><a class="code" href="classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e">01768</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e" title="Return the result.">CStr</a>() { <span class="keywordflow">return</span> buffer.c_str(); }
<a name="l01770"></a><a class="code" href="classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d">01770</a> <span class="keywordtype">size_t</span> <a class="code" href="classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d" title="Return the length of the result string.">Size</a>() { <span class="keywordflow">return</span> buffer.size(); }
<a name="l01771"></a>01771
<a name="l01772"></a>01772 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
<a name="l01774"></a><a class="code" href="classTiXmlPrinter.html#a3bd4daf44309b41f5813a833caa0d1c9">01774</a> <span class="preprocessor"> const std::string& Str() { return buffer; }</span>
<a name="l01775"></a>01775 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
<a name="l01776"></a>01776 <span class="preprocessor"></span>
<a name="l01777"></a>01777 <span class="keyword">private</span>:
<a name="l01778"></a>01778 <span class="keywordtype">void</span> DoIndent() {
<a name="l01779"></a>01779 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; i<depth; ++i )
<a name="l01780"></a>01780 buffer += indent;
<a name="l01781"></a>01781 }
<a name="l01782"></a>01782 <span class="keywordtype">void</span> DoLineBreak() {
<a name="l01783"></a>01783 buffer += lineBreak;
<a name="l01784"></a>01784 }
<a name="l01785"></a>01785
<a name="l01786"></a>01786 <span class="keywordtype">int</span> depth;
<a name="l01787"></a>01787 <span class="keywordtype">bool</span> simpleTextPrint;
<a name="l01788"></a>01788 TIXML_STRING buffer;
<a name="l01789"></a>01789 TIXML_STRING indent;
<a name="l01790"></a>01790 TIXML_STRING lineBreak;
<a name="l01791"></a>01791 };
<a name="l01792"></a>01792
<a name="l01793"></a>01793
<a name="l01794"></a>01794 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l01795"></a>01795 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span>
<a name="l01796"></a>01796 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l01797"></a>01797 <span class="preprocessor"></span>
<a name="l01798"></a>01798 <span class="preprocessor">#endif</span>
<a name="l01799"></a>01799 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>
|