DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
tinyxml.h
Go to the documentation of this file.
1 #ifndef XML_TINYXML_H
2 #define XML_TINYXML_H
3 
4 /*
5  www.sourceforge.net/projects/tinyxml
6  Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
7 
8  This software is provided 'as-is', without any express or implied
9  warranty. In no event will the authors be held liable for any
10  damages arising from the use of this software.
11 
12  Permission is granted to anyone to use this software for any
13  purpose, including commercial applications, and to alter it and
14  redistribute it freely, subject to the following restrictions:
15 
16  1. The origin of this software must not be misrepresented; you must
17  not claim that you wrote the original software. If you use this
18  software in a product, an acknowledgment in the product documentation
19  would be appreciated but is not required.
20 
21  2. Altered source versions must be plainly marked as such, and
22  must not be misrepresented as being the original software.
23 
24  3. This notice may not be removed or altered from any source
25  distribution.
26 
27 
28  F.Gaede, DESY : added #define TIXML_USE_STL for use with marlin
29 */
30 
31 #ifndef TIXML_USE_STL
32 #define TIXML_USE_STL
33 #endif
34 
35 #ifndef TINYXML_INCLUDED
36 #define TINYXML_INCLUDED
37 
38 #ifdef _MSC_VER
39 #pragma warning( push )
40 #pragma warning( disable : 4530 )
41 #pragma warning( disable : 4786 )
42 #endif
43 
44 #include <ctype.h>
45 #include <stdio.h>
46 #include <stdlib.h>
47 #include <string.h>
48 #include <assert.h>
49 
50 // Help out windows:
51 #if defined( _DEBUG ) && !defined( DEBUG )
52 #define DEBUG
53 #endif
54 
55 #ifdef TIXML_USE_STL
56 #include <string>
57 #include <iostream>
58 #include <sstream>
59 #define TIXML_STRING std::string
60 #else
61 #include "tinystr.h"
62 #define TIXML_STRING TiXmlString
63 #endif
64 
65 // Deprecated library function hell. Compilers want to use the
66 // new safe versions. This probably doesn't fully address the problem,
67 // but it gets closer. There are too many compilers for me to fully
68 // test. If you get compilation troubles, undefine TIXML_SAFE
69 #define TIXML_SAFE
70 
71 #ifdef TIXML_SAFE
72 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
73 // Microsoft visual studio, version 2005 and higher.
74 #define TIXML_SNPRINTF _snprintf_s
75 #define TIXML_SNSCANF _snscanf_s
76 #elif defined(_MSC_VER) && (_MSC_VER >= 1200 )
77 // Microsoft visual studio, version 6 and higher.
78 //#pragma message( "Using _sn* functions." )
79 #define TIXML_SNPRINTF _snprintf
80 #define TIXML_SNSCANF _snscanf
81 #elif defined(__GNUC__) && (__GNUC__ >= 3 )
82 // GCC version 3 and higher.s
83 //#warning( "Using sn* functions." )
84 #define TIXML_SNPRINTF snprintf
85 #define TIXML_SNSCANF snscanf
86 #endif
87 #endif
88 
89 class TiXmlDocument;
90 class TiXmlElement;
91 class TiXmlComment;
92 class TiXmlUnknown;
93 class TiXmlAttribute;
94 class TiXmlText;
95 class TiXmlDeclaration;
96 class TiXmlParsingData;
97 
98 const int TIXML_MAJOR_VERSION = 2;
99 const int TIXML_MINOR_VERSION = 5;
100 const int TIXML_PATCH_VERSION = 2;
101 
102 /* Internal structure for tracking location of items
103  in the XML file.
104 */
105 struct TiXmlCursor {
107  Clear();
108  }
109  void Clear() {
110  row = col = -1;
111  }
112 
113  int row; // 0 based.
114  int col; // 0 based.
115 };
116 
136 public:
137  virtual ~TiXmlVisitor() {
138  }
139 
141  virtual bool VisitEnter(const TiXmlDocument& /* doc */) {
142  return true;
143  }
145  virtual bool VisitExit(const TiXmlDocument& /* doc */) {
146  return true;
147  }
148 
150  virtual bool VisitEnter(const TiXmlElement& /* element */, const TiXmlAttribute* /* firstAttribute */) {
151  return true;
152  }
154  virtual bool VisitExit(const TiXmlElement& /* element */) {
155  return true;
156  }
157 
159  virtual bool Visit(const TiXmlDeclaration& /* declaration */) {
160  return true;
161  }
163  virtual bool Visit(const TiXmlText& /* text */) {
164  return true;
165  }
167  virtual bool Visit(const TiXmlComment& /* comment */) {
168  return true;
169  }
171  virtual bool Visit(const TiXmlUnknown& /* unknown */) {
172  return true;
173  }
174 };
175 
176 // Only used by Attribute::Query functions
177 enum {
179 };
180 
181 // Used by the parsing routines.
184 };
185 
187 
210 class TiXmlBase {
211  friend class TiXmlNode;
212  friend class TiXmlElement;
213  friend class TiXmlDocument;
214 
215 public:
217  : userData(0) {
218  }
219  virtual ~TiXmlBase() {
220  }
221 
231  virtual void Print(FILE* cfile, int depth) const = 0;
232 
239  static void SetCondenseWhiteSpace(bool condense) {
240  condenseWhiteSpace = condense;
241  }
242 
244  static bool IsWhiteSpaceCondensed() {
245  return condenseWhiteSpace;
246  }
247 
266  int Row() const {
267  return location.row + 1;
268  }
269  int Column() const {
270  return location.col + 1;
271  }
272 
273  void SetUserData(void* user) {
274  userData = user;
275  }
276  void* GetUserData() {
277  return userData;
278  }
279  const void* GetUserData() const {
280  return userData;
281  }
282 
283  // Table that returs, for a given lead byte, the total number of bytes
284  // in the UTF-8 sequence.
285  static const int utf8ByteTable[256];
286 
287  virtual const char* Parse(const char* p, TiXmlParsingData* data, TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */) = 0;
288 
289  enum {
307 
309  };
310 
311 protected:
312 
313  static const char* SkipWhiteSpace(const char*, TiXmlEncoding encoding);
314  inline static bool IsWhiteSpace(char c) {
315  return (isspace((unsigned char) c) || c == '\n' || c == '\r');
316  }
317  inline static bool IsWhiteSpace(int c) {
318  if (c < 256)
319  return IsWhiteSpace((char) c);
320  return false; // Again, only truly correct for English/Latin...but usually works.
321  }
322 
323 #ifdef TIXML_USE_STL
324  static bool StreamWhiteSpace(std::istream * in, TIXML_STRING * tag);
325  static bool StreamTo(std::istream * in, int character, TIXML_STRING * tag);
326 #endif
327 
328  /* Reads an XML name into the string provided. Returns
329  a pointer just past the last character of the name,
330  or 0 if the function has an error.
331  */
332  static const char* ReadName(const char* p, TIXML_STRING* name, TiXmlEncoding encoding);
333 
334  /* Reads text. Returns a pointer past the given end tag.
335  Wickedly complex options, but it keeps the (sensitive) code in one place.
336  */
337  static const char* ReadText(const char* in, // where to start
338  TIXML_STRING* text, // the string read
339  bool ignoreWhiteSpace, // whether to keep the white space
340  const char* endTag, // what ends this text
341  bool ignoreCase, // whether to ignore case in the end tag
342  TiXmlEncoding encoding); // the current encoding
343 
344  // If an entity has been found, transform it into a character.
345  static const char* GetEntity(const char* in, char* value, int* length, TiXmlEncoding encoding);
346 
347  // Get a character, while interpreting entities.
348  // The length can be from 0 to 4 bytes.
349  inline static const char* GetChar(const char* p, char* _value, int* length, TiXmlEncoding encoding) {
350  assert( p);
351  if (encoding == TIXML_ENCODING_UTF8) {
352  *length = utf8ByteTable[*((const unsigned char*) p)];
353  assert( *length >= 0 && *length < 5);
354  }
355  else {
356  *length = 1;
357  }
358 
359  if (*length == 1) {
360  if (*p == '&')
361  return GetEntity(p, _value, length, encoding);
362  *_value = *p;
363  return p + 1;
364  }
365  else if (*length) {
366  //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe),
367  // and the null terminator isn't needed
368  for (int i = 0; p[i] && i < *length; ++i) {
369  _value[i] = p[i];
370  }
371  return p + (*length);
372  }
373  else {
374  // Not valid text.
375  return 0;
376  }
377  }
378 
379  // Puts a string to a stream, expanding entities as it goes.
380  // Note this should not contian the '<', '>', etc, or they will be transformed into entities!
381  static void PutString(const TIXML_STRING& str, TIXML_STRING* out);
382 
383  // Return true if the next characters in the stream are any of the endTag sequences.
384  // Ignore case only works for english, and should only be relied on when comparing
385  // to English words: StringEqual( p, "version", true ) is fine.
386  static bool StringEqual(const char* p, const char* endTag, bool ignoreCase, TiXmlEncoding encoding);
387 
389 
391 
393  void* userData;
394 
395  // None of these methods are reliable for any language except English.
396  // Good for approximation, not great for accuracy.
397  static int IsAlpha(unsigned char anyByte, TiXmlEncoding encoding);
398  static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding);
399  inline static int ToLower(int v, TiXmlEncoding encoding) {
400  if (encoding == TIXML_ENCODING_UTF8) {
401  if (v < 128)
402  return tolower(v);
403  return v;
404  }
405  else {
406  return tolower(v);
407  }
408  }
409  static void ConvertUTF32ToUTF8(unsigned long input, char* output, int* length);
410 
411 private:
412  TiXmlBase(const TiXmlBase&); // not implemented.
413  void operator=(const TiXmlBase& base); // not allowed.
414 
415  struct Entity {
416  const char* str;
417  unsigned int strLength;
418  char chr;
419  };
420  enum {
422 
423  };
425  static bool condenseWhiteSpace;
426 };
427 
434 class TiXmlNode: public TiXmlBase {
435  friend class TiXmlDocument;
436  friend class TiXmlElement;
437 
438 public:
439 #ifdef TIXML_USE_STL
440 
444  friend std::istream& operator >>(std::istream& in, TiXmlNode& base);
445 
462  friend std::ostream& operator<<(std::ostream& out, const TiXmlNode& base);
463 
465  friend std::string& operator<<(std::string& out, const TiXmlNode& base);
466 
467 #endif
468 
472  enum NodeType {
474  };
475 
476  virtual ~TiXmlNode();
477 
490  const char *Value() const {
491  return value.c_str();
492  }
493 
494 #ifdef TIXML_USE_STL
495 
499  const std::string& ValueStr() const {
500  return value;
501  }
502 #endif
503 
513  void SetValue(const char * _value) {
514  value = _value;
515  }
516 
517 #ifdef TIXML_USE_STL
518  void SetValue(const std::string& _value) {
520  value = _value;
521  }
522 #endif
523 
525  void Clear();
526 
529  return parent;
530  }
531  const TiXmlNode* Parent() const {
532  return parent;
533  }
534 
535  const TiXmlNode* FirstChild() const {
536  return firstChild;
537  }
539  return firstChild;
540  }
541  const TiXmlNode* FirstChild(const char * value) const;
542  TiXmlNode* FirstChild(const char * _value) {
544  // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)
545  // call the method, cast the return back to non-const.
546  return const_cast<TiXmlNode*>((const_cast<const TiXmlNode*>(this))->FirstChild(_value));
547  }
548  const TiXmlNode* LastChild() const {
549  return lastChild;
550  }
552  return lastChild;
553  }
554 
555  const TiXmlNode* LastChild(const char * value) const;
556  TiXmlNode* LastChild(const char * _value) {
557  return const_cast<TiXmlNode*>((const_cast<const TiXmlNode*>(this))->LastChild(_value));
558  }
559 
560 #ifdef TIXML_USE_STL
561  const TiXmlNode* FirstChild(const std::string& _value) const {
562  return FirstChild(_value.c_str());
563  }
564  TiXmlNode* FirstChild(const std::string& _value) {
565  return FirstChild(_value.c_str());
566  }
567  const TiXmlNode* LastChild(const std::string& _value) const {
568  return LastChild(_value.c_str());
569  }
570  TiXmlNode* LastChild(const std::string& _value) {
571  return LastChild(_value.c_str());
572  }
573 #endif
574 
591  const TiXmlNode* IterateChildren(const TiXmlNode* previous) const;
592  TiXmlNode* IterateChildren(const TiXmlNode* previous) {
593  return const_cast<TiXmlNode*>((const_cast<const TiXmlNode*>(this))->IterateChildren(previous));
594  }
595 
597  const TiXmlNode* IterateChildren(const char * value, const TiXmlNode* previous) const;
598  TiXmlNode* IterateChildren(const char * _value, const TiXmlNode* previous) {
599  return const_cast<TiXmlNode*>((const_cast<const TiXmlNode*>(this))->IterateChildren(_value, previous));
600  }
601 
602 #ifdef TIXML_USE_STL
603  const TiXmlNode* IterateChildren(const std::string& _value, const TiXmlNode* previous) const {
604  return IterateChildren(_value.c_str(), previous);
605  }
606  TiXmlNode* IterateChildren(const std::string& _value, const TiXmlNode* previous) {
607  return IterateChildren(_value.c_str(), previous);
608  }
609 #endif
610 
614  TiXmlNode* InsertEndChild(const TiXmlNode& addThis);
615 
625  TiXmlNode* LinkEndChild(TiXmlNode* addThis);
626 
630  TiXmlNode* InsertBeforeChild(TiXmlNode* beforeThis, const TiXmlNode& addThis);
631 
635  TiXmlNode* InsertAfterChild(TiXmlNode* afterThis, const TiXmlNode& addThis);
636 
640  TiXmlNode* ReplaceChild(TiXmlNode* replaceThis, const TiXmlNode& withThis);
641 
643  bool RemoveChild(TiXmlNode* removeThis);
644 
646  const TiXmlNode* PreviousSibling() const {
647  return prev;
648  }
650  return prev;
651  }
652 
654  const TiXmlNode* PreviousSibling(const char *) const;
655  TiXmlNode* PreviousSibling(const char *_prev) {
656  return const_cast<TiXmlNode*>((const_cast<const TiXmlNode*>(this))->PreviousSibling(_prev));
657  }
658 
659 #ifdef TIXML_USE_STL
660  const TiXmlNode* PreviousSibling(const std::string& _value) const {
661  return PreviousSibling(_value.c_str());
662  }
663  TiXmlNode* PreviousSibling(const std::string& _value) {
664  return PreviousSibling(_value.c_str());
665  }
666  const TiXmlNode* NextSibling(const std::string& _value) const {
667  return NextSibling(_value.c_str());
668  }
669  TiXmlNode* NextSibling(const std::string& _value) {
670  return NextSibling(_value.c_str());
671  }
672 #endif
673 
675  const TiXmlNode* NextSibling() const {
676  return next;
677  }
679  return next;
680  }
681 
683  const TiXmlNode* NextSibling(const char *) const;
684  TiXmlNode* NextSibling(const char* _next) {
685  return const_cast<TiXmlNode*>((const_cast<const TiXmlNode*>(this))->NextSibling(_next));
686  }
687 
692  const TiXmlElement* NextSiblingElement() const;
694  return const_cast<TiXmlElement*>((const_cast<const TiXmlNode*>(this))->NextSiblingElement());
695  }
696 
701  const TiXmlElement* NextSiblingElement(const char *) const;
702  TiXmlElement* NextSiblingElement(const char *_next) {
703  return const_cast<TiXmlElement*>((const_cast<const TiXmlNode*>(this))->NextSiblingElement(_next));
704  }
705 
710  const TiXmlElement* PreviousSiblingElement() const;
712  return const_cast<TiXmlElement*>((const_cast<const TiXmlNode*>(this))->PreviousSiblingElement());
713  }
714 
719  const TiXmlElement* PreviousSiblingElement(const char *) const;
720  TiXmlElement* PreviousSiblingElement(const char *_next) {
721  return const_cast<TiXmlElement*>((const_cast<const TiXmlNode*>(this))->PreviousSiblingElement(_next));
722  }
723 
724 #ifdef TIXML_USE_STL
725  const TiXmlElement* NextSiblingElement(const std::string& _value) const {
726  return NextSiblingElement(_value.c_str());
727  }
728  TiXmlElement* NextSiblingElement(const std::string& _value) {
729  return NextSiblingElement(_value.c_str());
730  }
731 #endif
732 
734  const TiXmlElement* FirstChildElement() const;
736  return const_cast<TiXmlElement*>((const_cast<const TiXmlNode*>(this))->FirstChildElement());
737  }
738 
740  const TiXmlElement* FirstChildElement(const char * _value) const;
741  TiXmlElement* FirstChildElement(const char * _value) {
742  return const_cast<TiXmlElement*>((const_cast<const TiXmlNode*>(this))->FirstChildElement(_value));
743  }
744 
745 #ifdef TIXML_USE_STL
746  const TiXmlElement* FirstChildElement(const std::string& _value) const {
747  return FirstChildElement(_value.c_str());
748  }
749  TiXmlElement* FirstChildElement(const std::string& _value) {
750  return FirstChildElement(_value.c_str());
751  }
752 #endif
753 
758  int Type() const {
759  return type;
760  }
761 
765  const TiXmlDocument* GetDocument() const;
767  return const_cast<TiXmlDocument*>((const_cast<const TiXmlNode*>(this))->GetDocument());
768  }
769 
771  bool NoChildren() const {
772  return !firstChild;
773  }
774 
775  virtual const TiXmlDocument* ToDocument() const {
776  return 0;
777  }
778  virtual const TiXmlElement* ToElement() const {
779  return 0;
780  }
781  virtual const TiXmlComment* ToComment() const {
782  return 0;
783  }
784  virtual const TiXmlUnknown* ToUnknown() const {
785  return 0;
786  }
787  virtual const TiXmlText* ToText() const {
788  return 0;
789  }
790  virtual const TiXmlDeclaration* ToDeclaration() const {
791  return 0;
792  }
793 
795  return 0;
796  }
797  virtual TiXmlElement* ToElement() {
798  return 0;
799  }
800  virtual TiXmlComment* ToComment() {
801  return 0;
802  }
803  virtual TiXmlUnknown* ToUnknown() {
804  return 0;
805  }
806  virtual TiXmlText* ToText() {
807  return 0;
808  }
810  return 0;
811  }
812 
816  virtual TiXmlNode* Clone() const = 0;
817 
840  virtual bool Accept(TiXmlVisitor* visitor) const = 0;
841 
842 protected:
843  TiXmlNode(NodeType _type);
844 
845  // Copy to the allocated object. Shared functionality between Clone, Copy constructor,
846  // and the assignment operator.
847  void CopyTo(TiXmlNode* target) const;
848 
849 #ifdef TIXML_USE_STL
850  // The real work of the input operator.
851  virtual void StreamIn(std::istream* in, TIXML_STRING* tag) = 0;
852 #endif
853 
854  // Figure out what is at *p, and parse it. Returns null if it is not an xml node.
855  TiXmlNode* Identify(const char* start, TiXmlEncoding encoding);
856 
859 
862 
864 
867 
868 private:
869  TiXmlNode(const TiXmlNode&); // not implemented.
870  void operator=(const TiXmlNode& base); // not allowed.
871 };
872 
880 class TiXmlAttribute: public TiXmlBase {
881  friend class TiXmlAttributeSet;
882 
883 public:
886  : TiXmlBase() {
887  document = 0;
888  prev = next = 0;
889  }
890 
891 #ifdef TIXML_USE_STL
892  TiXmlAttribute(const std::string& _name, const std::string& _value) {
894  name = _name;
895  value = _value;
896  document = 0;
897  prev = next = 0;
898  }
899 #endif
900 
902  TiXmlAttribute(const char * _name, const char * _value) {
903  name = _name;
904  value = _value;
905  document = 0;
906  prev = next = 0;
907  }
908 
909  const char* Name() const {
910  return name.c_str();
911  }
912  const char* Value() const {
913  return value.c_str();
914  }
915 #ifdef TIXML_USE_STL
916  const std::string& ValueStr() const {
917  return value;
918  }
919 #endif
920  int IntValue() const;
921  double DoubleValue() const;
922 
923  // Get the tinyxml string representation
924  const TIXML_STRING& NameTStr() const {
925  return name;
926  }
927 
937  int QueryIntValue(int* _value) const;
939  int QueryDoubleValue(double* _value) const;
940 
941  void SetName(const char* _name) {
942  name = _name;
943  }
944  void SetValue(const char* _value) {
945  value = _value;
946  }
947 
948  void SetIntValue(int _value);
949  void SetDoubleValue(double _value);
950 
951 #ifdef TIXML_USE_STL
952  void SetName(const std::string& _name) {
954  name = _name;
955  }
957  void SetValue(const std::string& _value) {
958  value = _value;
959  }
960 #endif
961 
963  const TiXmlAttribute* Next() const;
965  return const_cast<TiXmlAttribute*>((const_cast<const TiXmlAttribute*>(this))->Next());
966  }
967 
969  const TiXmlAttribute* Previous() const;
971  return const_cast<TiXmlAttribute*>((const_cast<const TiXmlAttribute*>(this))->Previous());
972  }
973 
974  bool operator==(const TiXmlAttribute& rhs) const {
975  return rhs.name == name;
976  }
977  bool operator<(const TiXmlAttribute& rhs) const {
978  return name < rhs.name;
979  }
980  bool operator>(const TiXmlAttribute& rhs) const {
981  return name > rhs.name;
982  }
983 
984  /* Attribute parsing starts: first letter of the name
985  returns: the next char after the value end quote
986  */
987  virtual const char* Parse(const char* p, TiXmlParsingData* data, TiXmlEncoding encoding) override;
988 
989  // Prints this Attribute to a FILE stream.
990  virtual void Print(FILE* cfile, int depth) const override {
991  Print(cfile, depth, 0);
992  }
993  void Print(FILE* cfile, int depth, TIXML_STRING* str) const;
994 
995  // [internal use]
996  // Set the document pointer so the attribute can report errors.
998  document = doc;
999  }
1000 
1001 private:
1002  TiXmlAttribute(const TiXmlAttribute&); // not implemented.
1003  void operator=(const TiXmlAttribute& base); // not allowed.
1004 
1005  TiXmlDocument* document; // A pointer back to a document, for error reporting.
1009 };
1010 
1011 /* A class used to manage a group of attributes.
1012  It is only used internally, both by the ELEMENT and the DECLARATION.
1013 
1014  The set can be changed transparent to the Element and Declaration
1015  classes that use it, but NOT transparent to the Attribute
1016  which has to implement a next() and previous() method. Which makes
1017  it a bit problematic and prevents the use of STL.
1018 
1019  This version is implemented with circular lists because:
1020  - I like circular lists
1021  - it demonstrates some independence from the (typical) doubly linked list.
1022 */
1024 public:
1027 
1028  void Add(TiXmlAttribute* attribute);
1029  void Remove(TiXmlAttribute* attribute);
1030 
1031  const TiXmlAttribute* First() const {
1032  return (sentinel.next == &sentinel) ? 0 : sentinel.next;
1033  }
1035  return (sentinel.next == &sentinel) ? 0 : sentinel.next;
1036  }
1037  const TiXmlAttribute* Last() const {
1038  return (sentinel.prev == &sentinel) ? 0 : sentinel.prev;
1039  }
1041  return (sentinel.prev == &sentinel) ? 0 : sentinel.prev;
1042  }
1043 
1044  const TiXmlAttribute* Find(const char* _name) const;
1045  TiXmlAttribute* Find(const char* _name) {
1046  return const_cast<TiXmlAttribute*>((const_cast<const TiXmlAttributeSet*>(this))->Find(_name));
1047  }
1048 #ifdef TIXML_USE_STL
1049  const TiXmlAttribute* Find(const std::string& _name) const;
1050  TiXmlAttribute* Find(const std::string& _name) {
1051  return const_cast<TiXmlAttribute*>((const_cast<const TiXmlAttributeSet*>(this))->Find(_name));
1052  }
1053 
1054 #endif
1055 
1056 private:
1057  //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),
1058  //*ME: this class must be also use a hidden/disabled copy-constructor !!!
1059  TiXmlAttributeSet(const TiXmlAttributeSet&); // not allowed
1060  void operator=(const TiXmlAttributeSet&); // not allowed (as TiXmlAttribute)
1061 
1063 };
1064 
1069 class TiXmlElement: public TiXmlNode {
1070 public:
1072  TiXmlElement(const char * in_value);
1073 
1074 #ifdef TIXML_USE_STL
1075  TiXmlElement(const std::string& _value);
1077 #endif
1078 
1079  TiXmlElement(const TiXmlElement&);
1080 
1081  void operator=(const TiXmlElement& base);
1082 
1083  virtual ~TiXmlElement();
1084 
1088  const TiXmlAttribute* AttributeNode(const char* name) const {
1089  return attributeSet.Find(name);
1090  }
1091 
1095  const char* Attribute(const char* name) const;
1096 
1099  void ClearAttributes();
1100 
1107  const char* Attribute(const char* name, int* i) const;
1108 
1115  const char* Attribute(const char* name, double* d) const;
1116 
1124  int QueryIntAttribute(const char* name, int* _value) const;
1126  int QueryDoubleAttribute(const char* name, double* _value) const;
1128  int QueryFloatAttribute(const char* name, float* _value) const {
1129  double d;
1130  int result = QueryDoubleAttribute(name, &d);
1131  if (result == TIXML_SUCCESS) {
1132  *_value = (float) d;
1133  }
1134  return result;
1135  }
1136 #ifdef TIXML_USE_STL
1137 
1143  template <typename T> int QueryValueAttribute(const std::string& name, T* outValue) const {
1144  const TiXmlAttribute* node = attributeSet.Find(name);
1145  if (!node)
1146  return TIXML_NO_ATTRIBUTE;
1147 
1148  std::stringstream sstream(node->ValueStr());
1149  sstream >> *outValue;
1150  if (!sstream.fail())
1151  return TIXML_SUCCESS;
1152  return TIXML_WRONG_TYPE;
1153  }
1154 #endif
1155 
1159  void SetAttribute(const char* name, const char * _value);
1160 
1161 #ifdef TIXML_USE_STL
1162  const std::string* Attribute(const std::string& name) const;
1163  const std::string* Attribute(const std::string& name, int* i) const;
1164  const std::string* Attribute(const std::string& name, double* d) const;
1165  int QueryIntAttribute(const std::string& name, int* _value) const;
1166  int QueryDoubleAttribute(const std::string& name, double* _value) const;
1167 
1169  void SetAttribute(const std::string& name, const std::string& _value);
1171  void SetAttribute(const std::string& name, int _value);
1172 #endif
1173 
1177  void SetAttribute(const char * name, int value);
1178 
1182  void SetDoubleAttribute(const char * name, double value);
1183 
1186  void RemoveAttribute(const char * name);
1187 #ifdef TIXML_USE_STL
1188  void RemoveAttribute(const std::string& name) {
1189  RemoveAttribute(name.c_str());
1190  }
1191 #endif
1192 
1194  return attributeSet.First();
1195  }
1197  return attributeSet.First();
1198  }
1200  return attributeSet.Last();
1201  }
1203  return attributeSet.Last();
1204  }
1205 
1238  const char* GetText() const;
1239 
1241  virtual TiXmlNode* Clone() const override;
1242  // Print the Element to a FILE stream.
1243  virtual void Print(FILE* cfile, int depth) const override;
1244 
1245  /* Attribtue parsing starts: next char past '<'
1246  returns: next char past '>'
1247  */
1248  virtual const char* Parse(const char* p, TiXmlParsingData* data, TiXmlEncoding encoding) override;
1249 
1250  virtual const TiXmlElement* ToElement() const override {
1251  return this;
1252  }
1253  virtual TiXmlElement* ToElement() override {
1254  return this;
1255  }
1256 
1259  virtual bool Accept(TiXmlVisitor* visitor) const override;
1260 
1261 protected:
1262 
1263  void CopyTo(TiXmlElement* target) const;
1264  void ClearThis(); // like clear, but initializes 'this' object as well
1265 
1266  // Used to be public [internal use]
1267 #ifdef TIXML_USE_STL
1268  virtual void StreamIn(std::istream * in, TIXML_STRING * tag) override;
1269 #endif
1270  /* [internal use]
1271  Reads the "value" of the element -- another element, or text.
1272  This should terminate with the current end tag.
1273  */
1274  const char* ReadValue(const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding);
1275 
1276 private:
1277 
1279 };
1280 
1283 class TiXmlComment: public TiXmlNode {
1284 public:
1288  }
1290  TiXmlComment(const char* _value)
1292  SetValue(_value);
1293  }
1294  TiXmlComment(const TiXmlComment&);
1295  void operator=(const TiXmlComment& base);
1296 
1297  virtual ~TiXmlComment() {
1298  }
1299 
1301  virtual TiXmlNode* Clone() const override;
1302  // Write this Comment to a FILE stream.
1303  virtual void Print(FILE* cfile, int depth) const override;
1304 
1305  /* Attribtue parsing starts: at the ! of the !--
1306  returns: next char past '>'
1307  */
1308  virtual const char* Parse(const char* p, TiXmlParsingData* data, TiXmlEncoding encoding) override;
1309 
1310  virtual const TiXmlComment* ToComment() const override {
1311  return this;
1312  }
1313  virtual TiXmlComment* ToComment() override {
1314  return this;
1315  }
1316 
1319  virtual bool Accept(TiXmlVisitor* visitor) const override;
1320 
1321 protected:
1322  void CopyTo(TiXmlComment* target) const;
1323 
1324  // used to be public
1325 #ifdef TIXML_USE_STL
1326  virtual void StreamIn(std::istream * in, TIXML_STRING * tag) override;
1327 #endif
1328  // virtual void StreamOut( TIXML_OSTREAM * out ) const;
1329 
1330 private:
1331 
1332 };
1333 
1339 class TiXmlText: public TiXmlNode {
1340  friend class TiXmlElement;
1341 public:
1346  TiXmlText(const char * initValue)
1347  : TiXmlNode(TiXmlNode::TEXT) {
1348  SetValue(initValue);
1349  cdata = false;
1350  }
1351  virtual ~TiXmlText() {
1352  }
1353 
1354 #ifdef TIXML_USE_STL
1355  TiXmlText(const std::string& initValue)
1357  : TiXmlNode(TiXmlNode::TEXT) {
1358  SetValue(initValue);
1359  cdata = false;
1360  }
1361 #endif
1362 
1364  : TiXmlNode(TiXmlNode::TEXT) {
1365  copy.CopyTo(this);
1366  }
1367  void operator=(const TiXmlText& base) {
1368  base.CopyTo(this);
1369  }
1370 
1371  // Write this text object to a FILE stream.
1372  virtual void Print(FILE* cfile, int depth) const override;
1373 
1375  bool CDATA() const {
1376  return cdata;
1377  }
1379  void SetCDATA(bool _cdata) {
1380  cdata = _cdata;
1381  }
1382 
1383  virtual const char* Parse(const char* p, TiXmlParsingData* data, TiXmlEncoding encoding) override;
1384 
1385  virtual const TiXmlText* ToText() const override {
1386  return this;
1387  }
1388  virtual TiXmlText* ToText() override {
1389  return this;
1390  }
1391 
1394  virtual bool Accept(TiXmlVisitor* content) const override;
1395 
1396 protected:
1398  virtual TiXmlNode* Clone() const override;
1399  void CopyTo(TiXmlText* target) const;
1400 
1401  bool Blank() const; // returns true if all white space and new lines
1402  // [internal use]
1403 #ifdef TIXML_USE_STL
1404  virtual void StreamIn(std::istream * in, TIXML_STRING * tag) override;
1405 #endif
1406 
1407 private:
1408  bool cdata; // true if this should be input and output as a CDATA style text element
1409 };
1410 
1425 public:
1429  }
1430 
1431 #ifdef TIXML_USE_STL
1432  TiXmlDeclaration(const std::string& _version, const std::string& _encoding, const std::string& _standalone);
1434 #endif
1435 
1437  TiXmlDeclaration(const char* _version, const char* _encoding, const char* _standalone);
1438 
1440  void operator=(const TiXmlDeclaration& copy);
1441 
1442  virtual ~TiXmlDeclaration() {
1443  }
1444 
1446  const char *Version() const {
1447  return version.c_str();
1448  }
1450  const char *Encoding() const {
1451  return encoding.c_str();
1452  }
1454  const char *Standalone() const {
1455  return standalone.c_str();
1456  }
1457 
1459  virtual TiXmlNode* Clone() const override;
1460  // Print this declaration to a FILE stream.
1461  virtual void Print(FILE* cfile, int depth, TIXML_STRING* str) const;
1462  virtual void Print(FILE* cfile, int depth) const override {
1463  Print(cfile, depth, 0);
1464  }
1465 
1466  virtual const char* Parse(const char* p, TiXmlParsingData* data, TiXmlEncoding encoding) override;
1467 
1468  virtual const TiXmlDeclaration* ToDeclaration() const override {
1469  return this;
1470  }
1471  virtual TiXmlDeclaration* ToDeclaration() override {
1472  return this;
1473  }
1474 
1477  virtual bool Accept(TiXmlVisitor* visitor) const override;
1478 
1479 protected:
1480  void CopyTo(TiXmlDeclaration* target) const;
1481  // used to be public
1482 #ifdef TIXML_USE_STL
1483  virtual void StreamIn(std::istream * in, TIXML_STRING * tag) override;
1484 #endif
1485 
1486 private:
1487 
1489 };
1490 
1498 class TiXmlUnknown: public TiXmlNode {
1499 public:
1502  }
1503  virtual ~TiXmlUnknown() {
1504  }
1505 
1508  copy.CopyTo(this);
1509  }
1510  void operator=(const TiXmlUnknown& copy) {
1511  copy.CopyTo(this);
1512  }
1513 
1515  virtual TiXmlNode* Clone() const override;
1516  // Print this Unknown to a FILE stream.
1517  virtual void Print(FILE* cfile, int depth) const override;
1518 
1519  virtual const char* Parse(const char* p, TiXmlParsingData* data, TiXmlEncoding encoding) override;
1520 
1521  virtual const TiXmlUnknown* ToUnknown() const override {
1522  return this;
1523  }
1524  virtual TiXmlUnknown* ToUnknown() override{
1525  return this;
1526  }
1527 
1530  virtual bool Accept(TiXmlVisitor* content) const override;
1531 
1532 protected:
1533  void CopyTo(TiXmlUnknown* target) const;
1534 
1535 #ifdef TIXML_USE_STL
1536  virtual void StreamIn(std::istream * in, TIXML_STRING * tag) override;
1537 #endif
1538 
1539 private:
1540 
1541 };
1542 
1547 class TiXmlDocument: public TiXmlNode {
1548 public:
1550  TiXmlDocument();
1552  TiXmlDocument(const char * documentName);
1553 
1554 #ifdef TIXML_USE_STL
1555  TiXmlDocument(const std::string& documentName);
1557 #endif
1558 
1560  void operator=(const TiXmlDocument& copy);
1561 
1562  virtual ~TiXmlDocument() {
1563  }
1564 
1571  bool SaveFile() const;
1573  bool LoadFile(const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1575  bool SaveFile(const char * filename) const;
1581  bool LoadFile(FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1583  bool SaveFile(FILE*) const;
1584 
1585 #ifdef TIXML_USE_STL
1586  bool LoadFile(const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING)
1587  {
1588  // StringToBuffer f( filename );
1589  // return ( f.buffer && LoadFile( f.buffer, encoding ));
1590  return LoadFile(filename.c_str(), encoding);
1591  }
1592  bool SaveFile(const std::string& filename) const
1593  {
1594  // StringToBuffer f( filename );
1595  // return ( f.buffer && SaveFile( f.buffer ));
1596  return SaveFile(filename.c_str());
1597  }
1598 #endif
1599 
1604  virtual const char* Parse(const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING) override;
1605 
1610  const TiXmlElement* RootElement() const {
1611  return FirstChildElement();
1612  }
1614  return FirstChildElement();
1615  }
1616 
1622  bool Error() const {
1623  return error;
1624  }
1625 
1627  const char * ErrorDesc() const {
1628  return errorDesc.c_str();
1629  }
1630 
1634  int ErrorId() const {
1635  return errorId;
1636  }
1637 
1645  int ErrorRow() const {
1646  return errorLocation.row + 1;
1647  }
1648  int ErrorCol() const {
1649  return errorLocation.col + 1;
1650  }
1651 
1676  void SetTabSize(int _tabsize) {
1677  tabsize = _tabsize;
1678  }
1679 
1680  int TabSize() const {
1681  return tabsize;
1682  }
1683 
1687  void ClearError() {
1688  error = false;
1689  errorId = 0;
1690  errorDesc = "";
1692  //errorLocation.last = 0;
1693  }
1694 
1696  void Print() const {
1697  Print(stdout, 0);
1698  }
1699 
1700  /* Write the document to a string using formatted printing ("pretty print"). This
1701  will allocate a character array (new char[]) and return it as a pointer. The
1702  calling code pust call delete[] on the return char* to avoid a memory leak.
1703  */
1704  //char* PrintToMemory() const;
1706  virtual void Print(FILE* cfile, int depth = 0) const override;
1707  // [internal use]
1708  void SetError(int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding);
1709 
1710  virtual const TiXmlDocument* ToDocument() const override {
1711  return this;
1712  }
1713  virtual TiXmlDocument* ToDocument() override {
1714  return this;
1715  }
1716 
1719  virtual bool Accept(TiXmlVisitor* content) const override;
1720 
1721 protected:
1722  // [internal use]
1723  virtual TiXmlNode* Clone() const override;
1724 #ifdef TIXML_USE_STL
1725  virtual void StreamIn(std::istream * in, TIXML_STRING * tag) override;
1726 #endif
1727 
1728 private:
1729  void CopyTo(TiXmlDocument* target) const;
1730 
1731  bool error;
1733  int tabsize;
1735  bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write.
1736 };
1737 
1819 public:
1822  this->node = _node;
1823  }
1826  this->node = ref.node;
1827  }
1829  this->node = ref.node;
1830  return *this;
1831  }
1832 
1834  TiXmlHandle_t FirstChild() const;
1836  TiXmlHandle_t FirstChild(const char * value) const;
1840  TiXmlHandle_t FirstChildElement(const char * value) const;
1841 
1845  TiXmlHandle_t Child(const char* value, int index) const;
1849  TiXmlHandle_t Child(int index) const;
1854  TiXmlHandle_t ChildElement(const char* value, int index) const;
1859  TiXmlHandle_t ChildElement(int index) const;
1860 
1861 #ifdef TIXML_USE_STL
1862  TiXmlHandle_t FirstChild(const std::string& _value) const {
1863  return FirstChild(_value.c_str());
1864  }
1865  TiXmlHandle_t FirstChildElement(const std::string& _value) const {
1866  return FirstChildElement(_value.c_str());
1867  }
1868 
1869  TiXmlHandle_t Child(const std::string& _value, int index) const {
1870  return Child(_value.c_str(), index);
1871  }
1872  TiXmlHandle_t ChildElement(const std::string& _value, int index) const {
1873  return ChildElement(_value.c_str(), index);
1874  }
1875 #endif
1876 
1879  TiXmlNode* ToNode() const {
1880  return node;
1881  }
1885  return ((node && node->ToElement()) ? node->ToElement() : 0);
1886  }
1889  TiXmlText* ToText() const {
1890  return ((node && node->ToText()) ? node->ToText() : 0);
1891  }
1895  return ((node && node->ToUnknown()) ? node->ToUnknown() : 0);
1896  }
1897 
1901  TiXmlNode* Node() const {
1902  return ToNode();
1903  }
1908  return ToElement();
1909  }
1913  TiXmlText* Text() const {
1914  return ToText();
1915  }
1920  return ToUnknown();
1921  }
1922 
1923 private:
1925 };
1926 
1947 public:
1949  : depth(0), simpleTextPrint(false), buffer(), indent(" "), lineBreak("\n") {
1950  }
1951 
1952  virtual bool VisitEnter(const TiXmlDocument& doc) override;
1953  virtual bool VisitExit(const TiXmlDocument& doc) override;
1954 
1955  virtual bool VisitEnter(const TiXmlElement& element, const TiXmlAttribute* firstAttribute) override;
1956  virtual bool VisitExit(const TiXmlElement& element) override;
1957 
1958  virtual bool Visit(const TiXmlDeclaration& declaration) override;
1959  virtual bool Visit(const TiXmlText& text) override;
1960  virtual bool Visit(const TiXmlComment& comment) override;
1961  virtual bool Visit(const TiXmlUnknown& unknown) override;
1962 
1966  void SetIndent(const char* _indent) {
1967  indent = _indent ? _indent : "";
1968  }
1970  const char* Indent() {
1971  return indent.c_str();
1972  }
1977  void SetLineBreak(const char* _lineBreak) {
1978  lineBreak = _lineBreak ? _lineBreak : "";
1979  }
1981  const char* LineBreak() {
1982  return lineBreak.c_str();
1983  }
1984 
1989  indent = "";
1990  lineBreak = "";
1991  }
1993  const char* CStr() {
1994  return buffer.c_str();
1995  }
1997  size_t Size() {
1998  return buffer.size();
1999  }
2000 
2001 #ifdef TIXML_USE_STL
2002  const std::string& Str() {
2004  return buffer;
2005  }
2006 #endif
2007 
2008 private:
2009  void DoIndent() {
2010  for (int i = 0; i < depth; ++i)
2011  buffer += indent;
2012  }
2013  void DoLineBreak() {
2014  buffer += lineBreak;
2015  }
2016 
2017  int depth;
2019 };
2020 
2021 #ifdef _MSC_VER
2022 #pragma warning( pop )
2023 #endif
2024 
2025 #endif
2026 
2027 
2028 #endif
TiXmlDocument::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag) override
TiXmlElement::attributeSet
TiXmlAttributeSet attributeSet
Definition: tinyxml.h:1278
TiXmlNode::ToDocument
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:794
TiXmlHandle_t::Text
TiXmlText * Text() const
Definition: tinyxml.h:1913
TiXmlElement
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1069
TiXmlDocument::ToDocument
virtual TiXmlDocument * ToDocument() override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1713
TiXmlBase::ConvertUTF32ToUTF8
static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length)
Definition: tinyxmlparser_inl.h:111
TiXmlNode::LastChild
const TiXmlNode * LastChild() const
Definition: tinyxml.h:548
TiXmlBase::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)=0
TiXmlDocument::Print
void Print() const
Definition: tinyxml.h:1696
TiXmlText::ToText
virtual const TiXmlText * ToText() const override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1385
TiXmlUnknown::Accept
virtual bool Accept(TiXmlVisitor *content) const override
Definition: tinyxml_inl.h:1509
TiXmlAttribute::SetValue
void SetValue(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:957
TiXmlHandle_t::Child
TiXmlHandle_t Child(const std::string &_value, int index) const
Definition: tinyxml.h:1869
TiXmlVisitor::VisitExit
virtual bool VisitExit(const TiXmlElement &)
Visit an element.
Definition: tinyxml.h:154
TiXmlNode::FirstChildElement
TiXmlElement * FirstChildElement(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:749
TiXmlDocument
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1547
TiXmlElement::Attribute
const char * Attribute(const char *name) const
Definition: tinyxml_inl.h:584
TiXmlPrinter::SetIndent
void SetIndent(const char *_indent)
Definition: tinyxml.h:1966
TiXmlAttribute::IntValue
int IntValue() const
Return the value of this attribute, converted to an integer.
Definition: tinyxml_inl.h:1301
TiXmlAttribute::Previous
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
Definition: tinyxml_inl.h:1219
TiXmlVisitor
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:135
TiXmlText::Clone
virtual TiXmlNode * Clone() const override
[internal use] Creates a new Element and returns it.
Definition: tinyxml_inl.h:1394
TIXML_WRONG_TYPE
@ TIXML_WRONG_TYPE
Definition: tinyxml.h:178
TiXmlNode::IterateChildren
TiXmlNode * IterateChildren(const char *_value, const TiXmlNode *previous)
Definition: tinyxml.h:598
TiXmlDocument::TabSize
int TabSize() const
Definition: tinyxml.h:1680
TiXmlDeclaration::~TiXmlDeclaration
virtual ~TiXmlDeclaration()
Definition: tinyxml.h:1442
TiXmlAttributeSet::First
TiXmlAttribute * First()
Definition: tinyxml.h:1034
TiXmlBase::IsWhiteSpace
static bool IsWhiteSpace(char c)
Definition: tinyxml.h:314
TiXmlDocument::~TiXmlDocument
virtual ~TiXmlDocument()
Definition: tinyxml.h:1562
TiXmlText::Print
virtual void Print(FILE *cfile, int depth) const override
Definition: tinyxml_inl.h:1360
TiXmlDocument::ErrorCol
int ErrorCol() const
The column where the error occured. See ErrorRow()
Definition: tinyxml.h:1648
TiXmlDocument::errorDesc
TIXML_STRING errorDesc
Definition: tinyxml.h:1732
TiXmlBase::TiXmlNode
friend class TiXmlNode
Definition: tinyxml.h:211
TiXmlBase::Column
int Column() const
See Row()
Definition: tinyxml.h:269
TiXmlElement::ToElement
virtual const TiXmlElement * ToElement() const override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1250
TiXmlAttribute::prev
TiXmlAttribute * prev
Definition: tinyxml.h:1007
TiXmlBase::Entity::str
const char * str
Definition: tinyxml.h:416
TiXmlNode::DECLARATION
@ DECLARATION
Definition: tinyxml.h:473
TiXmlPrinter::Str
const std::string & Str()
Return the result.
Definition: tinyxml.h:2003
TiXmlNode::TEXT
@ TEXT
Definition: tinyxml.h:473
TiXmlHandle_t::Child
TiXmlHandle_t Child(const char *value, int index) const
Definition: tinyxml_inl.h:1726
TiXmlNode::PreviousSibling
const TiXmlNode * PreviousSibling(const std::string &_value) const
STL std::string form.
Definition: tinyxml.h:660
TiXmlElement::Accept
virtual bool Accept(TiXmlVisitor *visitor) const override
Definition: tinyxml_inl.h:875
v
View * v
Definition: MultiView.cpp:28
TiXmlText::CopyTo
void CopyTo(TiXmlText *target) const
Definition: tinyxml_inl.h:1381
TiXmlElement::Attribute
const std::string * Attribute(const std::string &name) const
TiXmlDeclaration::ToDeclaration
virtual const TiXmlDeclaration * ToDeclaration() const override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1468
TiXmlNode::type
NodeType type
Definition: tinyxml.h:858
TiXmlElement::SetDoubleAttribute
void SetDoubleAttribute(const char *name, double value)
Definition: tinyxml_inl.h:734
TIXML_ENCODING_UTF8
@ TIXML_ENCODING_UTF8
Definition: tinyxml.h:183
TiXmlBase::TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME
@ TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME
Definition: tinyxml.h:295
TiXmlNode::value
TIXML_STRING value
Definition: tinyxml.h:863
TiXmlElement::LastAttribute
TiXmlAttribute * LastAttribute()
Definition: tinyxml.h:1202
TiXmlNode::NextSibling
TiXmlNode * NextSibling(const char *_next)
Definition: tinyxml.h:684
TiXmlNode::PreviousSiblingElement
TiXmlElement * PreviousSiblingElement()
Definition: tinyxml.h:711
TiXmlHandle_t::ToElement
TiXmlElement * ToElement() const
Definition: tinyxml.h:1884
TiXmlComment::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag) override
TiXmlText::SetCDATA
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
Definition: tinyxml.h:1379
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlDeclaration &)
Visit a declaration.
Definition: tinyxml.h:159
TiXmlElement::RemoveAttribute
void RemoveAttribute(const std::string &name)
STL std::string form.
Definition: tinyxml.h:1188
TiXmlHandle_t::TiXmlHandle_t
TiXmlHandle_t(const TiXmlHandle_t &ref)
Copy constructor.
Definition: tinyxml.h:1825
TiXmlNode::ReplaceChild
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
Definition: tinyxml_inl.h:280
TiXmlAttributeSet::TiXmlAttributeSet
TiXmlAttributeSet()
Definition: tinyxml_inl.h:1527
TiXmlComment::CopyTo
void CopyTo(TiXmlComment *target) const
Definition: tinyxml_inl.h:1336
TiXmlNode::ToComment
virtual const TiXmlComment * ToComment() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:781
TiXmlNode::FirstChild
TiXmlNode * FirstChild()
Definition: tinyxml.h:538
TiXmlNode::ELEMENT
@ ELEMENT
Definition: tinyxml.h:473
TiXmlNode::Type
int Type() const
Definition: tinyxml.h:758
TiXmlDeclaration::version
TIXML_STRING version
Definition: tinyxml.h:1488
TiXmlText::TiXmlText
TiXmlText(const char *initValue)
Definition: tinyxml.h:1346
TiXmlHandle_t::TiXmlHandle_t
TiXmlHandle_t(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
Definition: tinyxml.h:1821
TiXmlAttribute::ValueStr
const std::string & ValueStr() const
Return the value of this attribute.
Definition: tinyxml.h:916
TiXmlCursor::Clear
void Clear()
Definition: tinyxml.h:109
TiXmlUnknown::CopyTo
void CopyTo(TiXmlUnknown *target) const
Definition: tinyxml_inl.h:1503
TiXmlPrinter::Size
size_t Size()
Return the length of the result string.
Definition: tinyxml.h:1997
TiXmlPrinter::simpleTextPrint
bool simpleTextPrint
Definition: tinyxml.h:2018
TiXmlDeclaration::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) override
Definition: tinyxmlparser_inl.h:1569
TiXmlBase::GetEntity
static const char * GetEntity(const char *in, char *value, int *length, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:467
TiXmlUnknown::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag) override
TiXmlBase::GetUserData
void * GetUserData()
Get a pointer to arbitrary user data.
Definition: tinyxml.h:276
TiXmlElement::QueryFloatAttribute
int QueryFloatAttribute(const char *name, float *_value) const
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
Definition: tinyxml.h:1128
TiXmlDeclaration::encoding
TIXML_STRING encoding
Definition: tinyxml.h:1488
TIXML_ENCODING_UNKNOWN
@ TIXML_ENCODING_UNKNOWN
Definition: tinyxml.h:183
TiXmlElement::ClearThis
void ClearThis()
Definition: tinyxml_inl.h:562
TiXmlBase::Entity
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:415
TiXmlVisitor::~TiXmlVisitor
virtual ~TiXmlVisitor()
Definition: tinyxml.h:137
TiXmlNode::NextSibling
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:675
TiXmlNode::FirstChild
const TiXmlNode * FirstChild() const
The first child of this node. Will be null if there are no children.
Definition: tinyxml.h:535
TIXML_NO_ATTRIBUTE
@ TIXML_NO_ATTRIBUTE
Definition: tinyxml.h:178
TiXmlDocument::errorId
int errorId
Definition: tinyxml.h:1732
TiXmlAttributeSet::TiXmlAttributeSet
TiXmlAttributeSet(const TiXmlAttributeSet &)
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlText &)
Visit a text node.
Definition: tinyxml.h:163
TiXmlHandle_t::ToText
TiXmlText * ToText() const
Definition: tinyxml.h:1889
TiXmlNode::IterateChildren
const TiXmlNode * IterateChildren(const std::string &_value, const TiXmlNode *previous) const
STL std::string form.
Definition: tinyxml.h:603
TiXmlNode::ToElement
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:778
TiXmlAttribute::name
TIXML_STRING name
Definition: tinyxml.h:1006
TiXmlNode::FirstChild
const TiXmlNode * FirstChild(const std::string &_value) const
STL std::string form.
Definition: tinyxml.h:561
TiXmlNode::~TiXmlNode
virtual ~TiXmlNode()
Definition: tinyxml_inl.h:140
TiXmlElement::QueryValueAttribute
int QueryValueAttribute(const std::string &name, T *outValue) const
Definition: tinyxml.h:1143
TiXmlBase::MAX_ENTITY_LENGTH
@ MAX_ENTITY_LENGTH
Definition: tinyxml.h:421
TiXmlUnknown::TiXmlUnknown
TiXmlUnknown()
Definition: tinyxml.h:1500
TiXmlDocument::SetError
void SetError(int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:827
TiXmlNode::PreviousSibling
TiXmlNode * PreviousSibling(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:663
TiXmlNode::LastChild
TiXmlNode * LastChild(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:570
TiXmlCursor::TiXmlCursor
TiXmlCursor()
Definition: tinyxml.h:106
TiXmlNode::NoChildren
bool NoChildren() const
Returns true if this node has no children.
Definition: tinyxml.h:771
TiXmlNode::ToText
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:806
TiXmlBase::StreamTo
static bool StreamTo(std::istream *in, int character, TIXML_STRING *tag)
TiXmlDocument::Error
bool Error() const
Definition: tinyxml.h:1622
TiXmlDeclaration::CopyTo
void CopyTo(TiXmlDeclaration *target) const
Definition: tinyxml_inl.h:1467
TiXmlAttributeSet::operator=
void operator=(const TiXmlAttributeSet &)
TiXmlHandle_t::node
TiXmlNode * node
Definition: tinyxml.h:1924
TiXmlUnknown::operator=
void operator=(const TiXmlUnknown &copy)
Definition: tinyxml.h:1510
TiXmlNode::FirstChildElement
TiXmlElement * FirstChildElement(const char *_value)
Definition: tinyxml.h:741
TiXmlNode::LinkEndChild
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
Definition: tinyxml_inl.h:174
TiXmlAttributeSet::Find
TiXmlAttribute * Find(const char *_name)
Definition: tinyxml.h:1045
TiXmlText::Blank
bool Blank() const
Definition: tinyxmlparser_inl.h:1628
TiXmlElement::operator=
void operator=(const TiXmlElement &base)
Definition: tinyxml_inl.h:549
TiXmlDeclaration::Encoding
const char * Encoding() const
Encoding. Will return an empty string if none was found.
Definition: tinyxml.h:1450
TiXmlNode::CopyTo
void CopyTo(TiXmlNode *target) const
Definition: tinyxml_inl.h:152
TiXmlBase::Entity::strLength
unsigned int strLength
Definition: tinyxml.h:417
TiXmlDeclaration::Version
const char * Version() const
Version. Will return an empty string if none was found.
Definition: tinyxml.h:1446
TIXML_PATCH_VERSION
const int TIXML_PATCH_VERSION
Definition: tinyxml.h:100
TiXmlNode::TiXmlElement
friend class TiXmlElement
Definition: tinyxml.h:436
TiXmlNode::PreviousSiblingElement
TiXmlElement * PreviousSiblingElement(const char *_next)
Definition: tinyxml.h:720
TiXmlNode::PreviousSibling
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:646
TiXmlElement::ReadValue
const char * ReadValue(const char *in, TiXmlParsingData *prevData, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:1202
TiXmlNode::ToDocument
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:775
TiXmlBase::TiXmlBase
TiXmlBase()
Definition: tinyxml.h:216
TiXmlDocument::ErrorRow
int ErrorRow() const
Definition: tinyxml.h:1645
TiXmlDeclaration::Print
virtual void Print(FILE *cfile, int depth) const override
Definition: tinyxml.h:1462
TiXmlNode::GetDocument
const TiXmlDocument * GetDocument() const
Definition: tinyxml_inl.h:510
TiXmlBase::TIXML_ERROR_PARSING_COMMENT
@ TIXML_ERROR_PARSING_COMMENT
Definition: tinyxml.h:301
TiXmlDocument::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) override
Definition: tinyxmlparser_inl.h:733
TiXmlBase::NUM_ENTITY
@ NUM_ENTITY
Definition: tinyxml.h:421
TiXmlAttribute::Value
const char * Value() const
Return the value of this attribute.
Definition: tinyxml.h:912
TiXmlNode::FirstChildElement
const TiXmlElement * FirstChildElement(const std::string &_value) const
STL std::string form.
Definition: tinyxml.h:746
TiXmlComment::TiXmlComment
TiXmlComment(const char *_value)
Construct a comment from text.
Definition: tinyxml.h:1290
TiXmlBase::TiXmlBase
TiXmlBase(const TiXmlBase &)
TiXmlDeclaration::TiXmlDeclaration
TiXmlDeclaration()
Construct an empty declaration.
Definition: tinyxml.h:1427
TiXmlHandle_t::FirstChildElement
TiXmlHandle_t FirstChildElement() const
Return a handle to the first child element.
Definition: tinyxml_inl.h:1683
TiXmlDeclaration::Clone
virtual TiXmlNode * Clone() const override
Creates a copy of this Declaration and returns it.
Definition: tinyxml_inl.h:1483
TiXmlDocument::ClearError
void ClearError()
Definition: tinyxml.h:1687
TiXmlPrinter::Indent
const char * Indent()
Query the indention string.
Definition: tinyxml.h:1970
TiXmlPrinter::VisitEnter
virtual bool VisitEnter(const TiXmlDocument &doc) override
Visit a document.
Definition: tinyxml_inl.h:1783
TiXmlText::Accept
virtual bool Accept(TiXmlVisitor *content) const override
Definition: tinyxml_inl.h:1388
TiXmlBase::TIXML_ERROR_DOCUMENT_TOP_ONLY
@ TIXML_ERROR_DOCUMENT_TOP_ONLY
Definition: tinyxml.h:306
TiXmlElement::QueryIntAttribute
int QueryIntAttribute(const std::string &name, int *_value) const
TiXmlHandle_t::FirstChild
TiXmlHandle_t FirstChild(const std::string &_value) const
Definition: tinyxml.h:1862
TiXmlDeclaration::Accept
virtual bool Accept(TiXmlVisitor *visitor) const override
Definition: tinyxml_inl.h:1477
TiXmlNode::DOCUMENT
@ DOCUMENT
Definition: tinyxml.h:473
TiXmlAttributeSet::Last
const TiXmlAttribute * Last() const
Definition: tinyxml.h:1037
TiXmlBase::operator=
void operator=(const TiXmlBase &base)
TiXmlNode::prev
TiXmlNode * prev
Definition: tinyxml.h:865
TiXmlComment
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1283
TiXmlHandle_t::operator=
TiXmlHandle_t operator=(const TiXmlHandle_t &ref)
Definition: tinyxml.h:1828
TiXmlNode::Clear
void Clear()
Delete all the children of this node. Does not affect 'this'.
Definition: tinyxml_inl.h:159
TiXmlNode::operator=
void operator=(const TiXmlNode &base)
TiXmlNode::LastChild
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
Definition: tinyxml.h:551
TiXmlDocument::Clone
virtual TiXmlNode * Clone() const override
Definition: tinyxml_inl.h:1163
TiXmlBase::TIXML_ERROR_READING_ATTRIBUTES
@ TIXML_ERROR_READING_ATTRIBUTES
Definition: tinyxml.h:297
TiXmlElement::LastAttribute
const TiXmlAttribute * LastAttribute() const
Access the last attribute in this element.
Definition: tinyxml.h:1199
TiXmlDocument::LoadFile
bool LoadFile(const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Definition: tinyxml.h:1586
TiXmlNode::IterateChildren
TiXmlNode * IterateChildren(const std::string &_value, const TiXmlNode *previous)
STL std::string form.
Definition: tinyxml.h:606
TiXmlAttribute::SetValue
void SetValue(const char *_value)
Set the value.
Definition: tinyxml.h:944
TiXmlAttribute::TiXmlAttribute
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.
Definition: tinyxml.h:902
TiXmlElement::FirstAttribute
const TiXmlAttribute * FirstAttribute() const
Access the first attribute in this element.
Definition: tinyxml.h:1193
TiXmlAttribute::Print
virtual void Print(FILE *cfile, int depth) const override
Definition: tinyxml.h:990
TiXmlAttribute::next
TiXmlAttribute * next
Definition: tinyxml.h:1008
TiXmlHandle_t::ToNode
TiXmlNode * ToNode() const
Definition: tinyxml.h:1879
TiXmlBase::PutString
static void PutString(const TIXML_STRING &str, TIXML_STRING *out)
Definition: tinyxml_inl.h:45
TiXmlNode::NodeType
NodeType
Definition: tinyxml.h:472
TiXmlBase::Row
int Row() const
Definition: tinyxml.h:266
TiXmlPrinter::VisitExit
virtual bool VisitExit(const TiXmlDocument &doc) override
Visit a document.
Definition: tinyxml_inl.h:1788
TiXmlDocument::Accept
virtual bool Accept(TiXmlVisitor *content) const override
Definition: tinyxml_inl.h:1185
tinystr.h
TiXmlComment::ToComment
virtual const TiXmlComment * ToComment() const override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1310
TiXmlAttribute::operator<
bool operator<(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:977
TiXmlBase::StringEqual
static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:563
TiXmlAttribute::NameTStr
const TIXML_STRING & NameTStr() const
Definition: tinyxml.h:924
TiXmlPrinter::TiXmlPrinter
TiXmlPrinter()
Definition: tinyxml.h:1948
TiXmlBase::TIXML_ERROR_PARSING_EMPTY
@ TIXML_ERROR_PARSING_EMPTY
Definition: tinyxml.h:298
TiXmlPrinter::CStr
const char * CStr()
Return the result.
Definition: tinyxml.h:1993
TIXML_ENCODING_LEGACY
@ TIXML_ENCODING_LEGACY
Definition: tinyxml.h:183
TiXmlAttributeSet::Last
TiXmlAttribute * Last()
Definition: tinyxml.h:1040
TiXmlDocument::SaveFile
bool SaveFile() const
Save a file using the current document value. Returns true if successful.
Definition: tinyxml_inl.h:962
TiXmlNode::Clone
virtual TiXmlNode * Clone() const =0
TiXmlAttributeSet::Find
const TiXmlAttribute * Find(const std::string &_name) const
TiXmlNode::firstChild
TiXmlNode * firstChild
Definition: tinyxml.h:860
TiXmlElement::QueryDoubleAttribute
int QueryDoubleAttribute(const std::string &name, double *_value) const
TiXmlAttribute::TiXmlAttribute
TiXmlAttribute(const TiXmlAttribute &)
TiXmlAttribute
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:880
TiXmlElement::Attribute
const std::string * Attribute(const std::string &name, double *d) const
TiXmlNode::NextSiblingElement
const TiXmlElement * NextSiblingElement() const
Definition: tinyxml_inl.h:451
TiXmlElement::RemoveAttribute
void RemoveAttribute(const char *name)
Definition: tinyxml_inl.h:406
TiXmlElement::QueryDoubleAttribute
int QueryDoubleAttribute(const char *name, double *_value) const
QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
Definition: tinyxml_inl.h:692
TiXmlDeclaration::operator=
void operator=(const TiXmlDeclaration &copy)
Definition: tinyxml_inl.h:1438
TiXmlDeclaration::Standalone
const char * Standalone() const
Is this a standalone document?
Definition: tinyxml.h:1454
TIXML_SUCCESS
@ TIXML_SUCCESS
Definition: tinyxml.h:178
TiXmlAttribute::document
TiXmlDocument * document
Definition: tinyxml.h:1005
TiXmlHandle_t::Element
TiXmlElement * Element() const
Definition: tinyxml.h:1907
TiXmlBase::GetUserData
const void * GetUserData() const
Get a pointer to arbitrary user data.
Definition: tinyxml.h:279
TiXmlHandle_t::FirstChildElement
TiXmlHandle_t FirstChildElement(const std::string &_value) const
Definition: tinyxml.h:1865
TiXmlComment::Clone
virtual TiXmlNode * Clone() const override
Returns a copy of this Comment.
Definition: tinyxml_inl.h:1348
TiXmlAttribute::SetDocument
void SetDocument(TiXmlDocument *doc)
Definition: tinyxml.h:997
TiXmlAttribute::QueryDoubleValue
int QueryDoubleValue(double *_value) const
QueryDoubleValue examines the value string. See QueryIntValue().
Definition: tinyxml_inl.h:1272
TiXmlPrinter::DoLineBreak
void DoLineBreak()
Definition: tinyxml.h:2013
TiXmlNode::ValueStr
const std::string & ValueStr() const
Definition: tinyxml.h:499
TiXmlAttribute::SetName
void SetName(const char *_name)
Set the name of this attribute.
Definition: tinyxml.h:941
TiXmlUnknown
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1498
TiXmlAttribute::operator==
bool operator==(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:974
TiXmlElement::Attribute
const std::string * Attribute(const std::string &name, int *i) const
TiXmlBase::IsWhiteSpaceCondensed
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
Definition: tinyxml.h:244
TiXmlComment::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) override
Definition: tinyxmlparser_inl.h:1360
TiXmlPrinter::LineBreak
const char * LineBreak()
Query the current line breaking string.
Definition: tinyxml.h:1981
TiXmlBase::TIXML_ERROR_READING_END_TAG
@ TIXML_ERROR_READING_END_TAG
Definition: tinyxml.h:299
TiXmlAttribute::QueryIntValue
int QueryIntValue(int *_value) const
Definition: tinyxml_inl.h:1265
TiXmlElement::CopyTo
void CopyTo(TiXmlElement *target) const
Definition: tinyxml_inl.h:853
TiXmlNode::NextSibling
TiXmlNode * NextSibling(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:669
TiXmlElement::SetAttribute
void SetAttribute(const char *name, const char *_value)
Definition: tinyxml_inl.h:746
TiXmlPrinter::indent
TIXML_STRING indent
Definition: tinyxml.h:2018
TiXmlUnknown::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) override
Definition: tinyxmlparser_inl.h:1299
TiXmlHandle_t::ChildElement
TiXmlHandle_t ChildElement(const std::string &_value, int index) const
Definition: tinyxml.h:1872
TiXmlNode::ToDeclaration
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:809
TiXmlElement::Clone
virtual TiXmlNode * Clone() const override
Creates a new Element and returns it - the returned element is a copy.
Definition: tinyxml_inl.h:889
TiXmlNode::FirstChild
TiXmlNode * FirstChild(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:564
TiXmlBase::TIXML_NO_ERROR
@ TIXML_NO_ERROR
Definition: tinyxml.h:290
TiXmlNode::PreviousSiblingElement
const TiXmlElement * PreviousSiblingElement() const
Definition: tinyxml_inl.h:481
TiXmlElement::Print
virtual void Print(FILE *cfile, int depth) const override
Definition: tinyxml_inl.h:800
TiXmlDeclaration
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1424
TiXmlVisitor::VisitEnter
virtual bool VisitEnter(const TiXmlDocument &)
Visit a document.
Definition: tinyxml.h:141
TiXmlElement::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) override
Definition: tinyxmlparser_inl.h:1078
TiXmlNode::NextSiblingElement
TiXmlElement * NextSiblingElement(const char *_next)
Definition: tinyxml.h:702
TiXmlBase::StreamWhiteSpace
static bool StreamWhiteSpace(std::istream *in, TIXML_STRING *tag)
TiXmlAttribute::Previous
TiXmlAttribute * Previous()
Definition: tinyxml.h:970
TiXmlNode::NextSiblingElement
TiXmlElement * NextSiblingElement()
Definition: tinyxml.h:693
TiXmlElement::~TiXmlElement
virtual ~TiXmlElement()
Definition: tinyxml_inl.h:556
TiXmlHandle_t::ChildElement
TiXmlHandle_t ChildElement(const char *value, int index) const
Definition: tinyxml_inl.h:1764
TiXmlAttribute::Next
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
Definition: tinyxml_inl.h:1199
TiXmlAttribute::DoubleValue
double DoubleValue() const
Return the value of this attribute, converted to a double.
Definition: tinyxml_inl.h:1306
TiXmlBase::TIXML_ERROR_STRING_COUNT
@ TIXML_ERROR_STRING_COUNT
Definition: tinyxml.h:308
TiXmlParsingData
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxmlparser_inl.h:201
TiXmlNode::PreviousSibling
TiXmlNode * PreviousSibling(const char *_prev)
Definition: tinyxml.h:655
TiXmlElement::SetAttribute
void SetAttribute(const std::string &name, int _value)
TiXmlNode
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:434
TiXmlElement::SetAttribute
void SetAttribute(const std::string &name, const std::string &_value)
STL std::string form.
TiXmlNode::InsertBeforeChild
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
Definition: tinyxml_inl.h:216
TIXML_DEFAULT_ENCODING
const TiXmlEncoding TIXML_DEFAULT_ENCODING
Definition: tinyxml.h:186
TiXmlAttribute::SetIntValue
void SetIntValue(int _value)
Set the value from an integer.
Definition: tinyxml_inl.h:1279
TiXmlNode::Parent
const TiXmlNode * Parent() const
Definition: tinyxml.h:531
TiXmlPrinter::lineBreak
TIXML_STRING lineBreak
Definition: tinyxml.h:2018
TiXmlBase::location
TiXmlCursor location
Definition: tinyxml.h:390
TiXmlBase::entity
static Entity entity[NUM_ENTITY]
Definition: tinyxml.h:424
TiXmlNode::ToUnknown
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:803
TiXmlAttributeSet::Find
const TiXmlAttribute * Find(const char *_name) const
Definition: tinyxml_inl.h:1600
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlUnknown &)
Visit an unknow node.
Definition: tinyxml.h:171
TiXmlNode::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)=0
TiXmlNode::InsertEndChild
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
Definition: tinyxml_inl.h:201
TiXmlBase::TIXML_ERROR_OPENING_FILE
@ TIXML_ERROR_OPENING_FILE
Definition: tinyxml.h:292
TiXmlText::CDATA
bool CDATA() const
Queries whether this represents text using a CDATA section.
Definition: tinyxml.h:1375
TiXmlBase::SetCondenseWhiteSpace
static void SetCondenseWhiteSpace(bool condense)
Definition: tinyxml.h:239
TiXmlUnknown::~TiXmlUnknown
virtual ~TiXmlUnknown()
Definition: tinyxml.h:1503
TiXmlComment::TiXmlComment
TiXmlComment()
Constructs an empty comment.
Definition: tinyxml.h:1286
TIXML_MAJOR_VERSION
const int TIXML_MAJOR_VERSION
Definition: tinyxml.h:98
TiXmlUnknown::Clone
virtual TiXmlNode * Clone() const override
Creates a copy of this Unknown and returns it.
Definition: tinyxml_inl.h:1515
TiXmlDocument::CopyTo
void CopyTo(TiXmlDocument *target) const
Definition: tinyxml_inl.h:1148
TiXmlBase::Print
virtual void Print(FILE *cfile, int depth) const =0
TiXmlDocument::ErrorDesc
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
Definition: tinyxml.h:1627
TiXmlVisitor::VisitExit
virtual bool VisitExit(const TiXmlDocument &)
Visit a document.
Definition: tinyxml.h:145
TiXmlBase::TIXML_ERROR_EMBEDDED_NULL
@ TIXML_ERROR_EMBEDDED_NULL
Definition: tinyxml.h:304
TiXmlComment::Print
virtual void Print(FILE *cfile, int depth) const override
Definition: tinyxml_inl.h:1325
TiXmlBase::TIXML_ERROR_PARSING_CDATA
@ TIXML_ERROR_PARSING_CDATA
Definition: tinyxml.h:305
TiXmlNode::IterateChildren
TiXmlNode * IterateChildren(const TiXmlNode *previous)
Definition: tinyxml.h:592
TiXmlText::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag) override
TiXmlDocument::error
bool error
Definition: tinyxml.h:1731
TiXmlNode::GetDocument
TiXmlDocument * GetDocument()
Definition: tinyxml.h:766
TiXmlBase::SkipWhiteSpace
static const char * SkipWhiteSpace(const char *, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:343
TiXmlAttribute::operator=
void operator=(const TiXmlAttribute &base)
TiXmlDocument::RootElement
const TiXmlElement * RootElement() const
Definition: tinyxml.h:1610
TiXmlComment::operator=
void operator=(const TiXmlComment &base)
Definition: tinyxml_inl.h:1318
TiXmlNode::operator<<
friend std::string & operator<<(std::string &out, const TiXmlNode &base)
Appends the XML node or attribute to a std::string.
TiXmlNode::UNKNOWN
@ UNKNOWN
Definition: tinyxml.h:473
TiXmlDocument::RootElement
TiXmlElement * RootElement()
Definition: tinyxml.h:1613
TiXmlBase::condenseWhiteSpace
static bool condenseWhiteSpace
Definition: tinyxml.h:425
TiXmlAttribute::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) override
Definition: tinyxmlparser_inl.h:1386
TiXmlCursor::col
int col
Definition: tinyxml.h:114
TiXmlPrinter::DoIndent
void DoIndent()
Definition: tinyxml.h:2009
TiXmlPrinter::buffer
TIXML_STRING buffer
Definition: tinyxml.h:2018
TiXmlNode::FirstChildElement
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
Definition: tinyxml_inl.h:421
TiXmlBase::TIXML_ERROR_PARSING_DECLARATION
@ TIXML_ERROR_PARSING_DECLARATION
Definition: tinyxml.h:302
TiXmlUnknown::Print
virtual void Print(FILE *cfile, int depth) const override
Definition: tinyxml_inl.h:1495
TiXmlEncoding
TiXmlEncoding
Definition: tinyxml.h:182
TiXmlDocument::ToDocument
virtual const TiXmlDocument * ToDocument() const override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1710
TiXmlAttributeSet::First
const TiXmlAttribute * First() const
Definition: tinyxml.h:1031
TiXmlBase::ReadName
static const char * ReadName(const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:430
TiXmlAttributeSet::~TiXmlAttributeSet
~TiXmlAttributeSet()
Definition: tinyxml_inl.h:1534
TiXmlNode::ToComment
virtual TiXmlComment * ToComment()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:800
TiXmlDeclaration::Print
virtual void Print(FILE *cfile, int depth, TIXML_STRING *str) const
Definition: tinyxml_inl.h:1445
TiXmlText::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) override
Definition: tinyxmlparser_inl.h:1495
TiXmlBase::Entity::chr
char chr
Definition: tinyxml.h:418
TiXmlCursor
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:105
TiXmlBase
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:210
TiXmlAttribute::Next
TiXmlAttribute * Next()
Definition: tinyxml.h:964
TiXmlNode::Value
const char * Value() const
Definition: tinyxml.h:490
TiXmlDeclaration::standalone
TIXML_STRING standalone
Definition: tinyxml.h:1488
TiXmlBase::TIXML_ERROR_OUT_OF_MEMORY
@ TIXML_ERROR_OUT_OF_MEMORY
Definition: tinyxml.h:293
TiXmlPrinter::depth
int depth
Definition: tinyxml.h:2017
TiXmlDocument::operator=
void operator=(const TiXmlDocument &copy)
Definition: tinyxml_inl.h:946
TiXmlAttributeSet
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1023
TiXmlDeclaration::ToDeclaration
virtual TiXmlDeclaration * ToDeclaration() override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1471
TiXmlHandle_t::ToUnknown
TiXmlUnknown * ToUnknown() const
Definition: tinyxml.h:1894
TiXmlBase::TIXML_ERROR
@ TIXML_ERROR
Definition: tinyxml.h:291
TiXmlPrinter::SetStreamPrinting
void SetStreamPrinting()
Definition: tinyxml.h:1988
TiXmlAttribute::TiXmlAttribute
TiXmlAttribute()
Construct an empty attribute.
Definition: tinyxml.h:885
TiXmlBase::TIXML_ERROR_DOCUMENT_EMPTY
@ TIXML_ERROR_DOCUMENT_EMPTY
Definition: tinyxml.h:303
TiXmlText::cdata
bool cdata
Definition: tinyxml.h:1408
TiXmlComment::~TiXmlComment
virtual ~TiXmlComment()
Definition: tinyxml.h:1297
TiXmlAttributeSet::Add
void Add(TiXmlAttribute *attribute)
Definition: tinyxml_inl.h:1541
TiXmlNode::operator<<
friend std::ostream & operator<<(std::ostream &out, const TiXmlNode &base)
TiXmlAttribute::SetDoubleValue
void SetDoubleValue(double _value)
Set the value from a double.
Definition: tinyxml_inl.h:1290
TiXmlNode::LastChild
const TiXmlNode * LastChild(const std::string &_value) const
STL std::string form.
Definition: tinyxml.h:567
TiXmlBase::TIXML_ERROR_PARSING_UNKNOWN
@ TIXML_ERROR_PARSING_UNKNOWN
Definition: tinyxml.h:300
TiXmlNode::FirstChildElement
TiXmlElement * FirstChildElement()
Definition: tinyxml.h:735
TiXmlVisitor::VisitEnter
virtual bool VisitEnter(const TiXmlElement &, const TiXmlAttribute *)
Visit an element.
Definition: tinyxml.h:150
TiXmlNode::TYPECOUNT
@ TYPECOUNT
Definition: tinyxml.h:473
TiXmlBase::TIXML_ERROR_PARSING_ELEMENT
@ TIXML_ERROR_PARSING_ELEMENT
Definition: tinyxml.h:294
TiXmlDocument::LoadFile
bool LoadFile(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Definition: tinyxml_inl.h:953
TiXmlNode::RemoveChild
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
Definition: tinyxml_inl.h:308
TiXmlText::operator=
void operator=(const TiXmlText &base)
Definition: tinyxml.h:1367
TiXmlNode::ToElement
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:797
TiXmlHandle_t::Node
TiXmlNode * Node() const
Definition: tinyxml.h:1901
TiXmlBase::ReadText
static const char * ReadText(const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:603
TiXmlNode::NextSiblingElement
const TiXmlElement * NextSiblingElement(const std::string &_value) const
STL std::string form.
Definition: tinyxml.h:725
TiXmlBase::IsAlphaNum
static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:179
TiXmlElement::QueryIntAttribute
int QueryIntAttribute(const char *name, int *_value) const
Definition: tinyxml_inl.h:672
TiXmlCursor::row
int row
Definition: tinyxml.h:113
TiXmlElement::FirstAttribute
TiXmlAttribute * FirstAttribute()
Definition: tinyxml.h:1196
TiXmlDocument::tabsize
int tabsize
Definition: tinyxml.h:1733
TiXmlNode::SetValue
void SetValue(const char *_value)
Definition: tinyxml.h:513
TiXmlPrinter::Visit
virtual bool Visit(const TiXmlDeclaration &declaration) override
Visit a declaration.
Definition: tinyxml_inl.h:1880
TiXmlHandle_t
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1818
TiXmlUnknown::ToUnknown
virtual TiXmlUnknown * ToUnknown() override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1524
TiXmlNode::TiXmlNode
TiXmlNode(const TiXmlNode &)
TiXmlElement::ClearAttributes
void ClearAttributes()
Definition: tinyxml_inl.h:573
TiXmlNode::PreviousSibling
TiXmlNode * PreviousSibling()
Definition: tinyxml.h:649
TiXmlNode::ToUnknown
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:784
TiXmlNode::next
TiXmlNode * next
Definition: tinyxml.h:866
TiXmlAttributeSet::Remove
void Remove(TiXmlAttribute *attribute)
Definition: tinyxml_inl.h:1556
TiXmlBase::userData
void * userData
Field containing a generic user pointer.
Definition: tinyxml.h:393
TiXmlElement::AttributeNode
const TiXmlAttribute * AttributeNode(const char *name) const
Definition: tinyxml.h:1088
TiXmlBase::utf8ByteTable
static const int utf8ByteTable[256]
Definition: tinyxml.h:285
TiXmlAttribute::Name
const char * Name() const
Return the name of this attribute.
Definition: tinyxml.h:909
TiXmlUnknown::ToUnknown
virtual const TiXmlUnknown * ToUnknown() const override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1521
dd4hep::detail::tools::copy
void copy(Alignment from, Alignment to)
Copy alignment object from source object.
Definition: AlignmentTools.cpp:43
TiXmlPrinter::SetLineBreak
void SetLineBreak(const char *_lineBreak)
Definition: tinyxml.h:1977
TiXmlBase::errorString
static const char * errorString[TIXML_ERROR_STRING_COUNT]
Definition: tinyxml.h:388
TiXmlBase::IsAlpha
static int IsAlpha(unsigned char anyByte, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:158
TiXmlDocument::errorLocation
TiXmlCursor errorLocation
Definition: tinyxml.h:1734
TiXmlElement::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag) override
TiXmlDeclaration::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag) override
TiXmlUnknown::TiXmlUnknown
TiXmlUnknown(const TiXmlUnknown &copy)
Definition: tinyxml.h:1506
TiXmlBase::SetUserData
void SetUserData(void *user)
Set a pointer to arbitrary user data.
Definition: tinyxml.h:273
TiXmlText::ToText
virtual TiXmlText * ToText() override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1388
TiXmlNode::Accept
virtual bool Accept(TiXmlVisitor *visitor) const =0
TiXmlNode::ToText
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:787
TiXmlNode::NextSibling
const TiXmlNode * NextSibling(const std::string &_value) const
STL std::string form.
Definition: tinyxml.h:666
TiXmlNode::Identify
TiXmlNode * Identify(const char *start, TiXmlEncoding encoding)
Definition: tinyxmlparser_inl.h:847
TiXmlDocument::useMicrosoftBOM
bool useMicrosoftBOM
Definition: tinyxml.h:1735
TiXmlNode::COMMENT
@ COMMENT
Definition: tinyxml.h:473
TiXmlNode::InsertAfterChild
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
Definition: tinyxml_inl.h:248
TiXmlDocument::ErrorId
int ErrorId() const
Definition: tinyxml.h:1634
TiXmlElement::GetText
const char * GetText() const
Definition: tinyxml_inl.h:900
TiXmlPrinter
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1946
TiXmlText
TinyXML class. See http://www.grinninglizard.com/tinyxml.
Definition: tinyxml.h:1339
TiXmlHandle_t::Unknown
TiXmlUnknown * Unknown() const
Definition: tinyxml.h:1919
TiXmlBase::TIXML_ERROR_READING_ELEMENT_VALUE
@ TIXML_ERROR_READING_ELEMENT_VALUE
Definition: tinyxml.h:296
TiXmlBase::IsWhiteSpace
static bool IsWhiteSpace(int c)
Definition: tinyxml.h:317
TiXmlComment::ToComment
virtual TiXmlComment * ToComment() override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1313
TiXmlBase::ToLower
static int ToLower(int v, TiXmlEncoding encoding)
Definition: tinyxml.h:399
TiXmlDocument::SaveFile
bool SaveFile(const std::string &filename) const
< STL std::string version.
Definition: tinyxml.h:1592
TiXmlNode::NextSiblingElement
TiXmlElement * NextSiblingElement(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:728
TIXML_MINOR_VERSION
const int TIXML_MINOR_VERSION
Definition: tinyxml.h:99
TiXmlAttribute::value
TIXML_STRING value
Definition: tinyxml.h:1006
TIXML_STRING
#define TIXML_STRING
Definition: tinyxml.h:59
TiXmlHandle_t::FirstChild
TiXmlHandle_t FirstChild() const
Return a handle to the first child node.
Definition: tinyxml_inl.h:1659
TiXmlNode::LastChild
TiXmlNode * LastChild(const char *_value)
The last child of this node matching 'value'. Will be null if there are no children.
Definition: tinyxml.h:556
TiXmlAttributeSet::sentinel
TiXmlAttribute sentinel
Definition: tinyxml.h:1062
TiXmlBase::GetChar
static const char * GetChar(const char *p, char *_value, int *length, TiXmlEncoding encoding)
Definition: tinyxml.h:349
TiXmlAttributeSet::Find
TiXmlAttribute * Find(const std::string &_name)
Definition: tinyxml.h:1050
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlComment &)
Visit a comment node.
Definition: tinyxml.h:167
TiXmlText::~TiXmlText
virtual ~TiXmlText()
Definition: tinyxml.h:1351
TiXmlText::TiXmlText
TiXmlText(const TiXmlText &copy)
Definition: tinyxml.h:1363
TiXmlDocument::TiXmlDocument
TiXmlDocument()
Create an empty document, that has no name.
Definition: tinyxml_inl.h:913
TiXmlAttribute::operator>
bool operator>(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:980
TiXmlElement::ToElement
virtual TiXmlElement * ToElement() override
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1253
TiXmlNode::IterateChildren
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
Definition: tinyxml_inl.h:354
TiXmlBase::~TiXmlBase
virtual ~TiXmlBase()
Definition: tinyxml.h:219
TiXmlNode::NextSibling
TiXmlNode * NextSibling()
Definition: tinyxml.h:678
TiXmlNode::lastChild
TiXmlNode * lastChild
Definition: tinyxml.h:861
TiXmlComment::Accept
virtual bool Accept(TiXmlVisitor *visitor) const override
Definition: tinyxml_inl.h:1342
TiXmlNode::Parent
TiXmlNode * Parent()
One step up the DOM.
Definition: tinyxml.h:528
TiXmlDocument::SetTabSize
void SetTabSize(int _tabsize)
Definition: tinyxml.h:1676
TiXmlNode::parent
TiXmlNode * parent
Definition: tinyxml.h:857
TiXmlNode::operator>>
friend std::istream & operator>>(std::istream &in, TiXmlNode &base)
TiXmlNode::ToDeclaration
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:790