aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
TiXmlAttribute Class Reference

An attribute is a name-value pair. More...

#include <tinyxml.h>

Inheritance diagram for TiXmlAttribute:
Collaboration diagram for TiXmlAttribute:

Public Types

enum  {
  TIXML_NO_ERROR = 0 , TIXML_ERROR , TIXML_ERROR_OPENING_FILE , TIXML_ERROR_OUT_OF_MEMORY ,
  TIXML_ERROR_PARSING_ELEMENT , TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME , TIXML_ERROR_READING_ELEMENT_VALUE , TIXML_ERROR_READING_ATTRIBUTES ,
  TIXML_ERROR_PARSING_EMPTY , TIXML_ERROR_READING_END_TAG , TIXML_ERROR_PARSING_UNKNOWN , TIXML_ERROR_PARSING_COMMENT ,
  TIXML_ERROR_PARSING_DECLARATION , TIXML_ERROR_DOCUMENT_EMPTY , TIXML_ERROR_EMBEDDED_nullptr , TIXML_ERROR_PARSING_CDATA ,
  TIXML_ERROR_DOCUMENT_TOP_ONLY , TIXML_ERROR_STRING_COUNT
}

Public Member Functions

 TiXmlAttribute ()
 Construct an empty attribute.
 TiXmlAttribute (const std::string &_name, const std::string &_value)
 std::string constructor.
 TiXmlAttribute (const char *_name, const char *_value)
 Construct an attribute with a name and value.
const char * Name () const
 Return the name of this attribute.
const char * Value () const
 Return the value of this attribute.
const std::string & ValueStr () const
 Return the value of this attribute.
int IntValue () const
 Return the value of this attribute, converted to an integer.
double DoubleValue () const
 Return the value of this attribute, converted to a double.
const TIXML_STRINGNameTStr () const
int QueryIntValue (int *_value) const
 QueryIntValue examines the value string.
int QueryDoubleValue (double *_value) const
 QueryDoubleValue examines the value string. See QueryIntValue().
void SetName (const char *_name)
 Set the name of this attribute.
void SetValue (const char *_value)
 Set the value.
void SetIntValue (int _value)
 Set the value from an integer.
void SetDoubleValue (double _value)
 Set the value from a double.
void SetName (const std::string &_name)
 STL std::string form.
void SetValue (const std::string &_value)
 STL std::string form.
const TiXmlAttributeNext () const
 Get the next sibling attribute in the DOM. Returns null at end.
TiXmlAttributeNext ()
const TiXmlAttributePrevious () const
 Get the previous sibling attribute in the DOM. Returns null at beginning.
TiXmlAttributePrevious ()
bool operator== (const TiXmlAttribute &rhs) const
bool operator< (const TiXmlAttribute &rhs) const
bool operator> (const TiXmlAttribute &rhs) const
virtual const char * Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
virtual void Print (FILE *cfile, int depth) const
 All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.) Either or both cfile and str can be null.
void Print (FILE *cfile, int depth, TIXML_STRING *str) const
void SetDocument (TiXmlDocument *doc)
int Row () const
 Return the position, in the original source file, of this node or attribute.
int Column () const
 See Row().
void SetUserData (void *user)
 Set a pointer to arbitrary user data.
void * GetUserData ()
 Get a pointer to arbitrary user data.
const void * GetUserData () const
 Get a pointer to arbitrary user data.
void DeleteSpawnedWrappers ()
 Delete all container objects we've spawned with 'new'.

Static Public Member Functions

static void SetCondenseWhiteSpace (bool condense)
 The world does not agree on whether white space should be kept or not.
static bool IsWhiteSpaceCondensed ()
 Return the current white space setting.
static void EncodeString (const TIXML_STRING &str, TIXML_STRING *out)
 Expands entities in a string.

Public Attributes

std::vector< ticpp::Base * > m_spawnedWrappers
 Remember all wrappers that we've created with 'new' - ( e.g.

Static Public Attributes

static const int utf8ByteTable [256]

Static Protected Member Functions

static const char * SkipWhiteSpace (const char *, TiXmlEncoding encoding)
static bool IsWhiteSpace (char c)
static bool IsWhiteSpace (int c)
static bool StreamWhiteSpace (std::istream *in, TIXML_STRING *tag)
static bool StreamTo (std::istream *in, int character, TIXML_STRING *tag)
static const char * ReadName (const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
static const char * ReadText (const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
static const char * GetEntity (const char *in, char *value, int *length, TiXmlEncoding encoding)
static const char * GetChar (const char *p, char *_value, int *length, TiXmlEncoding encoding)
static bool StringEqual (const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
static int IsAlpha (unsigned char anyByte, TiXmlEncoding encoding)
static int IsAlphaNum (unsigned char anyByte, TiXmlEncoding encoding)
static int ToLower (int v, TiXmlEncoding encoding)
static void ConvertUTF32ToUTF8 (unsigned long input, char *output, int *length)

Protected Attributes

TiXmlCursor location
void * userData
 Field containing a generic user pointer.

Static Protected Attributes

static const char * errorString [TIXML_ERROR_STRING_COUNT]

Private Types

enum  { NUM_ENTITY = 5 , MAX_ENTITY_LENGTH = 6 }

Private Member Functions

 TiXmlAttribute (const TiXmlAttribute &)
void operator= (const TiXmlAttribute &base)

Private Attributes

TiXmlDocumentdocument
TIXML_STRING name
TIXML_STRING value
TiXmlAttributeprev
TiXmlAttributenext
TiCppRCImpm_tiRC
 Pointer to reference counter.

Static Private Attributes

static Entity entity [NUM_ENTITY]
static bool condenseWhiteSpace = true

Friends

class TiXmlAttributeSet

Detailed Description

An attribute is a name-value pair.

Elements have an arbitrary number of attributes, each with a unique name.

Note
The attributes are not TiXmlNodes, since they are not part of the tinyXML document object model. There are other suggested ways to look at this problem.

Definition at line 915 of file tinyxml.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited
Enumerator
TIXML_NO_ERROR 
TIXML_ERROR 
TIXML_ERROR_OPENING_FILE 
TIXML_ERROR_OUT_OF_MEMORY 
TIXML_ERROR_PARSING_ELEMENT 
TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME 
TIXML_ERROR_READING_ELEMENT_VALUE 
TIXML_ERROR_READING_ATTRIBUTES 
TIXML_ERROR_PARSING_EMPTY 
TIXML_ERROR_READING_END_TAG 
TIXML_ERROR_PARSING_UNKNOWN 
TIXML_ERROR_PARSING_COMMENT 
TIXML_ERROR_PARSING_DECLARATION 
TIXML_ERROR_DOCUMENT_EMPTY 
TIXML_ERROR_EMBEDDED_nullptr 
TIXML_ERROR_PARSING_CDATA 
TIXML_ERROR_DOCUMENT_TOP_ONLY 
TIXML_ERROR_STRING_COUNT 

Definition at line 304 of file tinyxml.h.

304 {
305 TIXML_NO_ERROR = 0,
322
324 };
@ TIXML_ERROR_STRING_COUNT
Definition tinyxml.h:323
@ TIXML_ERROR_READING_END_TAG
Definition tinyxml.h:314
@ TIXML_ERROR_PARSING_UNKNOWN
Definition tinyxml.h:315
@ TIXML_ERROR_PARSING_DECLARATION
Definition tinyxml.h:317
@ TIXML_ERROR_PARSING_ELEMENT
Definition tinyxml.h:309
@ TIXML_ERROR_PARSING_EMPTY
Definition tinyxml.h:313
@ TIXML_ERROR_READING_ATTRIBUTES
Definition tinyxml.h:312
@ TIXML_ERROR_DOCUMENT_TOP_ONLY
Definition tinyxml.h:321
@ TIXML_ERROR_PARSING_COMMENT
Definition tinyxml.h:316
@ TIXML_NO_ERROR
Definition tinyxml.h:305
@ TIXML_ERROR_OUT_OF_MEMORY
Definition tinyxml.h:308
@ TIXML_ERROR_PARSING_CDATA
Definition tinyxml.h:320
@ TIXML_ERROR_DOCUMENT_EMPTY
Definition tinyxml.h:318
@ TIXML_ERROR_OPENING_FILE
Definition tinyxml.h:307
@ TIXML_ERROR
Definition tinyxml.h:306
@ TIXML_ERROR_EMBEDDED_nullptr
Definition tinyxml.h:319
@ TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME
Definition tinyxml.h:310
@ TIXML_ERROR_READING_ELEMENT_VALUE
Definition tinyxml.h:311

◆ anonymous enum

anonymous enum
privateinherited
Enumerator
NUM_ENTITY 
MAX_ENTITY_LENGTH 

Definition at line 439 of file tinyxml.h.

439 {
440 NUM_ENTITY = 5,
442
443 };
@ NUM_ENTITY
Definition tinyxml.h:440
@ MAX_ENTITY_LENGTH
Definition tinyxml.h:441

Constructor & Destructor Documentation

◆ TiXmlAttribute() [1/4]

TiXmlAttribute::TiXmlAttribute ( )
inline

Construct an empty attribute.

Definition at line 920 of file tinyxml.h.

921 : TiXmlBase() {
922 document = 0;
923 prev = next = 0;
924 }
TiXmlAttribute * prev
Definition tinyxml.h:1030
TiXmlDocument * document
Definition tinyxml.h:1027
TiXmlAttribute * next
Definition tinyxml.h:1031
TiXmlBase()
Definition tinyxml.h:221

References TiXmlBase::TiXmlBase(), document, next, and prev.

Referenced by TiXmlAttribute(), Next(), Next(), operator<(), operator=(), operator==(), operator>(), Previous(), and Previous().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TiXmlAttribute() [2/4]

TiXmlAttribute::TiXmlAttribute ( const std::string & _name,
const std::string & _value )
inline

std::string constructor.

Definition at line 928 of file tinyxml.h.

928 {
929 name = _name;
930 value = _value;
931 document = 0;
932 prev = next = 0;
933 }
TIXML_STRING value
Definition tinyxml.h:1029
TIXML_STRING name
Definition tinyxml.h:1028

References document, name, next, prev, and value.

◆ TiXmlAttribute() [3/4]

TiXmlAttribute::TiXmlAttribute ( const char * _name,
const char * _value )
inline

Construct an attribute with a name and value.

Definition at line 937 of file tinyxml.h.

937 {
938 name = _name;
939 value = _value;
940 document = 0;
941 prev = next = 0;
942 }

References document, name, next, prev, and value.

◆ TiXmlAttribute() [4/4]

TiXmlAttribute::TiXmlAttribute ( const TiXmlAttribute & )
private

References TiXmlAttribute().

Here is the call graph for this function:

Member Function Documentation

◆ Column()

int TiXmlBase::Column ( ) const
inlineinherited

See Row().

Definition at line 276 of file tinyxml.h.

References location.

Referenced by ticpp::Base::Column().

Here is the caller graph for this function:

◆ ConvertUTF32ToUTF8()

void TiXmlBase::ConvertUTF32ToUTF8 ( unsigned long input,
char * output,
int * length )
staticprotectedinherited

Definition at line 100 of file tinyxmlparser.cpp.

102 {
103 const unsigned long BYTE_MASK = 0xBF;
104 const unsigned long BYTE_MARK = 0x80;
105 const unsigned long FIRST_BYTE_MARK[7] = {
106 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC};
107
108 if (input < 0x80)
109 *length = 1;
110 else if (input < 0x800)
111 *length = 2;
112 else if (input < 0x10000)
113 *length = 3;
114 else if (input < 0x200000)
115 *length = 4;
116 else {
117 *length = 0;
118 return;
119 } // This code won't covert this correctly anyway.
120
121 output += *length;
122
123 // Scary scary fall throughs.
124 switch (*length) {
125 case 4:
126 --output;
127 *output = (char)((input | BYTE_MARK) & BYTE_MASK);
128 input >>= 6;
129
130 case 3:
131 --output;
132 *output = (char)((input | BYTE_MARK) & BYTE_MASK);
133 input >>= 6;
134
135 case 2:
136 --output;
137 *output = (char)((input | BYTE_MARK) & BYTE_MASK);
138 input >>= 6;
139
140 case 1:
141 --output;
142 *output = (char)(input | FIRST_BYTE_MARK[*length]);
143 }
144}

Referenced by GetEntity().

Here is the caller graph for this function:

◆ DeleteSpawnedWrappers()

void TiCppRC::DeleteSpawnedWrappers ( )
inherited

Delete all container objects we've spawned with 'new'.

Definition at line 929 of file ticpp.cpp.

929 {
930 std::vector< Base* >::reverse_iterator wrapper;
931
932 for (wrapper = m_spawnedWrappers.rbegin(); wrapper != m_spawnedWrappers.rend();
933 ++wrapper) {
934 delete *wrapper;
935 }
936
937 m_spawnedWrappers.clear();
938}
std::vector< ticpp::Base * > m_spawnedWrappers
Remember all wrappers that we've created with 'new' - ( e.g.
Definition ticpprc.h:63

References m_spawnedWrappers.

◆ DoubleValue()

double TiXmlAttribute::DoubleValue ( ) const

Return the value of this attribute, converted to a double.

Definition at line 1146 of file tinyxml.cpp.

1146{ return atof(value.c_str()); }

References value.

◆ EncodeString()

void TiXmlBase::EncodeString ( const TIXML_STRING & str,
TIXML_STRING * out )
staticinherited

Expands entities in a string.

Note this should not contian the tag's '<', '>', etc, or they will be transformed into entities!

Definition at line 50 of file tinyxml.cpp.

50 {
51 int i = 0;
52
53 while (i < (int)str.length()) {
54 unsigned char c = (unsigned char)str[i];
55
56 if (c == '&' && i < ((int)str.length() - 2) && str[i + 1] == '#' &&
57 str[i + 2] == 'x') {
58 // Hexadecimal character reference.
59 // Pass through unchanged.
60 // &#xA9; -- copyright symbol, for example.
61 //
62 // The -1 is a bug fix from Rob Laveaux. It keeps
63 // an overflow from happening if there is no ';'.
64 // There are actually 2 ways to exit this loop -
65 // while fails (error case) and break (semicolon found).
66 // However, there is no mechanism (currently) for
67 // this function to return an error.
68 while (i < (int)str.length() - 1) {
69 outString->append(str.c_str() + i, 1);
70 ++i;
71
72 if (str[i] == ';') break;
73 }
74 } else if (c == '&') {
75 outString->append(entity[0].str, entity[0].strLength);
76 ++i;
77 } else if (c == '<') {
78 outString->append(entity[1].str, entity[1].strLength);
79 ++i;
80 } else if (c == '>') {
81 outString->append(entity[2].str, entity[2].strLength);
82 ++i;
83 } else if (c == '\"') {
84 outString->append(entity[3].str, entity[3].strLength);
85 ++i;
86 } else if (c == '\'') {
87 outString->append(entity[4].str, entity[4].strLength);
88 ++i;
89 } else if (c < 32) {
90 // Easy pass at non-alpha/numeric/symbol
91 // Below 32 is symbolic.
92 char buf[32];
93
94#if defined(TIXML_SNPRINTF)
95 TIXML_SNPRINTF(buf, sizeof(buf), "&#x%02X;", (unsigned)(c & 0xff));
96#else
97 snprintf(buf, 32, "&#x%02X;", (unsigned)(c & 0xff));
98#endif
99
100 //*ME: warning C4267: convert 'size_t' to 'int'
101 //*ME: Int-Cast to make compiler happy ...
102 outString->append(buf, (int)strlen(buf));
103 ++i;
104 } else {
105 // char realc = (char) c;
106 // outString->append( &realc, 1 );
107 *outString += (char)c; // somewhat more efficient function call.
108 ++i;
109 }
110 }
111}
static Entity entity[NUM_ENTITY]
Definition tinyxml.h:44

References entity, and TIXML_STRING.

Referenced by TiXmlAttribute::Print(), TiXmlText::Print(), and TiXmlPrinter::Visit().

Here is the caller graph for this function:

◆ GetChar()

const char * TiXmlBase::GetChar ( const char * p,
char * _value,
int * length,
TiXmlEncoding encoding )
inlinestaticprotectedinherited

Definition at line 368 of file tinyxml.h.

368 {
369 assert(p);
370
371 if (encoding == TIXML_ENCODING_UTF8) {
372 *length = utf8ByteTable[*((const unsigned char*)p)];
373 assert(*length >= 0 && *length < 5);
374 } else {
375 *length = 1;
376 }
377
378 if (*length == 1) {
379 if (*p == '&') return GetEntity(p, _value, length, encoding);
380
381 *_value = *p;
382 return p + 1;
383 } else if (*length) {
384 // strncpy( _value, p, *length ); // lots of compilers don't like this
385 // function (unsafe),
386 // and the null terminator isn't needed
387 for (int i = 0; p[i] && i < *length; ++i) {
388 _value[i] = p[i];
389 }
390
391 return p + (*length);
392 } else {
393 // Not valid text.
394 return 0;
395 }
396 }
static const char * GetEntity(const char *in, char *value, int *length, TiXmlEncoding encoding)
static const int utf8ByteTable[256]
Definition tinyxml.h:64
@ TIXML_ENCODING_UTF8
Definition tinyxml.h:181

References GetEntity(), TIXML_ENCODING_UTF8, and utf8ByteTable.

Referenced by ReadText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEntity()

const char * TiXmlBase::GetEntity ( const char * in,
char * value,
int * length,
TiXmlEncoding encoding )
staticprotectedinherited

Definition at line 442 of file tinyxmlparser.cpp.

445 {
446 // Presume an entity, and pull it out.
447 TIXML_STRING ent;
448 int i;
449 *length = 0;
450
451 if (*(p + 1) && *(p + 1) == '#' && *(p + 2)) {
452 unsigned long ucs = 0;
453 ptrdiff_t delta = 0;
454 unsigned mult = 1;
455
456 if (*(p + 2) == 'x') {
457 // Hexadecimal.
458 if (!*(p + 3)) return 0;
459
460 const char* q = p + 3;
461 q = strchr(q, ';');
462
463 if (!q || !*q) return 0;
464
465 delta = q - p;
466 --q;
467
468 while (*q != 'x') {
469 if (*q >= '0' && *q <= '9')
470 ucs += mult * (*q - '0');
471 else if (*q >= 'a' && *q <= 'f')
472 ucs += mult * (*q - 'a' + 10);
473 else if (*q >= 'A' && *q <= 'F')
474 ucs += mult * (*q - 'A' + 10);
475 else
476 return 0;
477
478 mult *= 16;
479 --q;
480 }
481 } else {
482 // Decimal.
483 if (!*(p + 2)) return 0;
484
485 const char* q = p + 2;
486 q = strchr(q, ';');
487
488 if (!q || !*q) return 0;
489
490 delta = q - p;
491 --q;
492
493 while (*q != '#') {
494 if (*q >= '0' && *q <= '9')
495 ucs += mult * (*q - '0');
496 else
497 return 0;
498
499 mult *= 10;
500 --q;
501 }
502 }
503
504 if (encoding == TIXML_ENCODING_UTF8) {
505 // convert the UCS to UTF-8
506 ConvertUTF32ToUTF8(ucs, value, length);
507 } else {
508 *value = (char)ucs;
509 *length = 1;
510 }
511
512 return p + delta + 1;
513 }
514
515 // Now try to match it.
516 for (i = 0; i < NUM_ENTITY; ++i) {
517 if (strncmp(entity[i].str, p, entity[i].strLength) == 0) {
518 assert(strlen(entity[i].str) == entity[i].strLength);
519 *value = entity[i].chr;
520 *length = 1;
521 return (p + entity[i].strLength);
522 }
523 }
524
525 // So it wasn't an entity, its unrecognized, or something like that.
526 *value = *p; // Don't put back the last one, since we return it!
527 //*length = 1; // Leave unrecognized entities - this doesn't really work.
528 // Just writes strange XML.
529 return p + 1;
530}
static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length)
#define TIXML_STRING
Definition tinyxml.h:60

References ConvertUTF32ToUTF8(), entity, NUM_ENTITY, TIXML_ENCODING_UTF8, and TIXML_STRING.

Referenced by GetChar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUserData() [1/2]

void * TiXmlBase::GetUserData ( )
inlineinherited

Get a pointer to arbitrary user data.

Definition at line 281 of file tinyxml.h.

References userData.

◆ GetUserData() [2/2]

const void * TiXmlBase::GetUserData ( ) const
inlineinherited

Get a pointer to arbitrary user data.

Definition at line 284 of file tinyxml.h.

References userData.

◆ IntValue()

int TiXmlAttribute::IntValue ( ) const

Return the value of this attribute, converted to an integer.

Definition at line 1144 of file tinyxml.cpp.

1144{ return atoi(value.c_str()); }

References value.

◆ IsAlpha()

int TiXmlBase::IsAlpha ( unsigned char anyByte,
TiXmlEncoding encoding )
staticprotectedinherited

Definition at line 146 of file tinyxmlparser.cpp.

147 {
148 // This will only work for low-ascii, everything else is assumed to be a valid
149 // letter. I'm not sure this is the best approach, but it is quite tricky
150 // trying
151 // to figure out alhabetical vs. not across encoding. So take a very
152 // conservative approach.
153
154 // if ( encoding == TIXML_ENCODING_UTF8 )
155 // {
156 if (anyByte < 127)
157 return isalpha(anyByte);
158 else
159 return 1; // What else to do? The unicode set is huge...get the english
160 // ones
161 // right.
162
163 // }
164 // else
165 // {
166 // return isalpha( anyByte );
167 // }
168}

Referenced by TiXmlNode::Identify(), and ReadName().

Here is the caller graph for this function:

◆ IsAlphaNum()

int TiXmlBase::IsAlphaNum ( unsigned char anyByte,
TiXmlEncoding encoding )
staticprotectedinherited

Definition at line 170 of file tinyxmlparser.cpp.

171 {
172 // This will only work for low-ascii, everything else is assumed to be a valid
173 // letter. I'm not sure this is the best approach, but it is quite tricky
174 // trying
175 // to figure out alhabetical vs. not across encoding. So take a very
176 // conservative approach.
177
178 // if ( encoding == TIXML_ENCODING_UTF8 )
179 // {
180 if (anyByte < 127)
181 return isalnum(anyByte);
182 else
183 return 1; // What else to do? The unicode set is huge...get the english
184 // ones
185 // right.
186
187 // }
188 // else
189 // {
190 // return isalnum( anyByte );
191 // }
192}

Referenced by ReadName().

Here is the caller graph for this function:

◆ IsWhiteSpace() [1/2]

bool TiXmlBase::IsWhiteSpace ( char c)
inlinestaticprotectedinherited

Definition at line 328 of file tinyxml.h.

328 {
329 return (std::isspace((unsigned char)c) || c == '\n' || c == '\r');
330 }

Referenced by TiXmlText::Blank(), IsWhiteSpace(), TiXmlAttribute::Parse(), TiXmlDeclaration::Parse(), TiXmlStylesheetReference::Parse(), ReadText(), SkipWhiteSpace(), TiXmlElement::StreamIn(), and StreamWhiteSpace().

Here is the caller graph for this function:

◆ IsWhiteSpace() [2/2]

bool TiXmlBase::IsWhiteSpace ( int c)
inlinestaticprotectedinherited

Definition at line 331 of file tinyxml.h.

331 {
332 if (c < 256) return IsWhiteSpace((char)c);
333
334 return false; // Again, only truly correct for English/Latin...but usually
335 // works.
336 }
static bool IsWhiteSpace(char c)
Definition tinyxml.h:328

References IsWhiteSpace().

Here is the call graph for this function:

◆ IsWhiteSpaceCondensed()

bool TiXmlBase::IsWhiteSpaceCondensed ( )
inlinestaticinherited

Return the current white space setting.

Definition at line 247 of file tinyxml.h.

247{ return condenseWhiteSpace; }
static bool condenseWhiteSpace
Definition tinyxml.h:445

References condenseWhiteSpace.

Referenced by TiXmlElement::ReadValue().

Here is the caller graph for this function:

◆ Name()

const char * TiXmlAttribute::Name ( ) const
inline

Return the name of this attribute.

Definition at line 944 of file tinyxml.h.

References name.

Referenced by TiXmlAttributeSet::Add(), TiXmlElement::CopyTo(), and TiXmlElement::Parse().

Here is the caller graph for this function:

◆ NameTStr()

const TIXML_STRING & TiXmlAttribute::NameTStr ( ) const
inline

Definition at line 961 of file tinyxml.h.

961{ return name; }

References name, and TIXML_STRING.

Referenced by TiXmlElement::Parse().

Here is the caller graph for this function:

◆ Next() [1/2]

TiXmlAttribute * TiXmlAttribute::Next ( )
inline

Definition at line 993 of file tinyxml.h.

993 {
994 return const_cast< TiXmlAttribute* >(
995 (const_cast< const TiXmlAttribute* >(this))->Next());
996 }
TiXmlAttribute()
Construct an empty attribute.
Definition tinyxml.h:920

References TiXmlAttribute().

Here is the call graph for this function:

◆ Next() [2/2]

const TiXmlAttribute * TiXmlAttribute::Next ( ) const

Get the next sibling attribute in the DOM. Returns null at end.

Definition at line 1043 of file tinyxml.cpp.

1043 {
1044 // We are using knowledge of the sentinel. The sentinel
1045 // have a value or name.
1046 if (next->value.empty() && next->name.empty()) return 0;
1047
1048 return next;
1049}

References TiXmlAttribute(), and next.

Referenced by TiXmlElement::CopyTo(), TiXmlElement::Print(), and TiXmlPrinter::VisitEnter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<()

bool TiXmlAttribute::operator< ( const TiXmlAttribute & rhs) const
inline

Definition at line 1006 of file tinyxml.h.

1006{ return name < rhs.name; }

References TiXmlAttribute(), and name.

Here is the call graph for this function:

◆ operator=()

void TiXmlAttribute::operator= ( const TiXmlAttribute & base)
private

References TiXmlAttribute().

Here is the call graph for this function:

◆ operator==()

bool TiXmlAttribute::operator== ( const TiXmlAttribute & rhs) const
inline

Definition at line 1005 of file tinyxml.h.

1005{ return rhs.name == name; }

References TiXmlAttribute(), and name.

Here is the call graph for this function:

◆ operator>()

bool TiXmlAttribute::operator> ( const TiXmlAttribute & rhs) const
inline

Definition at line 1007 of file tinyxml.h.

1007{ return name > rhs.name; }

References TiXmlAttribute(), and name.

Here is the call graph for this function:

◆ Parse()

const char * TiXmlAttribute::Parse ( const char * p,
TiXmlParsingData * data,
TiXmlEncoding encoding )
virtual

Implements TiXmlBase.

Definition at line 1361 of file tinyxmlparser.cpp.

1363 {
1364 p = SkipWhiteSpace(p, encoding);
1365
1366 if (!p || !*p) return 0;
1367
1368 // int tabsize = 4;
1369 // if ( document )
1370 // tabsize = document->TabSize();
1371
1372 if (data) {
1373 data->Stamp(p, encoding);
1374 location = data->Cursor();
1375 }
1376
1377 // Read the name, the '=' and the value.
1378 const char* pErr = p;
1379 p = ReadName(p, &name, encoding);
1380
1381 if (!p || !*p) {
1382 if (document)
1383 document->SetError(TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding);
1384
1385 return 0;
1386 }
1387
1388 p = SkipWhiteSpace(p, encoding);
1389
1390 if (!p || !*p || *p != '=') {
1391 if (document)
1392 document->SetError(TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding);
1393
1394 return 0;
1395 }
1396
1397 ++p; // skip '='
1398 p = SkipWhiteSpace(p, encoding);
1399
1400 if (!p || !*p) {
1401 if (document)
1402 document->SetError(TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding);
1403
1404 return 0;
1405 }
1406
1407 const char* end;
1408 const char SINGLE_QUOTE = '\'';
1409 const char DOUBLE_QUOTE = '\"';
1410
1411 if (*p == SINGLE_QUOTE) {
1412 ++p;
1413 end = "\'"; // single quote in string
1414 p = ReadText(p, &value, false, end, false, encoding);
1415 } else if (*p == DOUBLE_QUOTE) {
1416 ++p;
1417 end = "\""; // double quote in string
1418 p = ReadText(p, &value, false, end, false, encoding);
1419 } else {
1420 // All attribute values should be in single or double quotes.
1421 // But this is such a common error that the parser will try
1422 // its best, even without them.
1423 value = "";
1424
1425 while (p && *p // existence
1426 &&
1427 !IsWhiteSpace(*p) && *p != '\n' && *p != '\r' // whitespace
1428 &&
1429 *p != '/' && *p != '>') { // tag end
1430 if (*p == SINGLE_QUOTE || *p == DOUBLE_QUOTE) {
1431 // [ 1451649 ] Attribute values with trailing quotes not handled
1432 // correctly
1433 // We did not have an opening quote but seem to have a
1434 // closing one. Give up and throw an error.
1435 if (document)
1436 document->SetError(TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding);
1437
1438 return 0;
1439 }
1440
1441 value += *p;
1442 ++p;
1443 }
1444 }
1445
1446 return p;
1447}
TiXmlCursor location
Definition tinyxml.h:410
static const char * ReadName(const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
static const char * ReadText(const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
static const char * SkipWhiteSpace(const char *, TiXmlEncoding encoding)
const TiXmlCursor & Cursor()
void Stamp(const char *now, TiXmlEncoding encoding)

References TiXmlParsingData::Cursor(), document, TiXmlBase::IsWhiteSpace(), TiXmlBase::location, name, TiXmlBase::ReadName(), TiXmlBase::ReadText(), TiXmlBase::SkipWhiteSpace(), TiXmlParsingData::Stamp(), TiXmlBase::TIXML_ERROR_READING_ATTRIBUTES, and value.

Referenced by TiXmlDeclaration::Parse(), TiXmlElement::Parse(), and TiXmlStylesheetReference::Parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Previous() [1/2]

TiXmlAttribute * TiXmlAttribute::Previous ( )
inline

Definition at line 1000 of file tinyxml.h.

1000 {
1001 return const_cast< TiXmlAttribute* >(
1002 (const_cast< const TiXmlAttribute* >(this))->Previous());
1003 }

References TiXmlAttribute().

Here is the call graph for this function:

◆ Previous() [2/2]

const TiXmlAttribute * TiXmlAttribute::Previous ( ) const

Get the previous sibling attribute in the DOM. Returns null at beginning.

Definition at line 1062 of file tinyxml.cpp.

1062 {
1063 // We are using knowledge of the sentinel. The sentinel
1064 // have a value or name.
1065 if (prev->value.empty() && prev->name.empty()) return 0;
1066
1067 return prev;
1068}

References TiXmlAttribute(), and prev.

Here is the call graph for this function:

◆ Print() [1/2]

virtual void TiXmlAttribute::Print ( FILE * cfile,
int depth ) const
inlinevirtual

All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.) Either or both cfile and str can be null.

This is a formatted print, and will insert tabs and newlines.

(For an unformatted stream, use the << operator.)

Implements TiXmlBase.

Definition at line 1016 of file tinyxml.h.

1016{ Print(cfile, depth, 0); }
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
Definition tinyxml.h:1016

References Print().

Referenced by Print(), and TiXmlElement::Print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Print() [2/2]

void TiXmlAttribute::Print ( FILE * cfile,
int depth,
TIXML_STRING * str ) const

Definition at line 1081 of file tinyxml.cpp.

1081 {
1082 TIXML_STRING n, v;
1083
1084 EncodeString(name, &n);
1085 EncodeString(value, &v);
1086
1087 if (value.find('\"') == TIXML_STRING::npos) {
1088 if (cfile) {
1089 fprintf(cfile, "%s=\"%s\"", n.c_str(), v.c_str());
1090 }
1091
1092 if (str) {
1093 (*str) += n;
1094 (*str) += "=\"";
1095 (*str) += v;
1096 (*str) += "\"";
1097 }
1098 } else {
1099 if (cfile) {
1100 fprintf(cfile, "%s='%s'", n.c_str(), v.c_str());
1101 }
1102
1103 if (str) {
1104 (*str) += n;
1105 (*str) += "='";
1106 (*str) += v;
1107 (*str) += "'";
1108 }
1109 }
1110}
static void EncodeString(const TIXML_STRING &str, TIXML_STRING *out)
Expands entities in a string.
Definition tinyxml.cpp:50

References TiXmlBase::EncodeString(), name, TIXML_STRING, and value.

Here is the call graph for this function:

◆ QueryDoubleValue()

int TiXmlAttribute::QueryDoubleValue ( double * _value) const

QueryDoubleValue examines the value string. See QueryIntValue().

Definition at line 1118 of file tinyxml.cpp.

1118 {
1119 if (TIXML_SSCANF(value.c_str(), "%lf", dval) == 1) return TIXML_SUCCESS;
1120
1121 return TIXML_WRONG_TYPE;
1122}
@ TIXML_WRONG_TYPE
Definition tinyxml.h:176
@ TIXML_SUCCESS
Definition tinyxml.h:176
#define TIXML_SSCANF
Definition tinyxml.h:91

References TIXML_SSCANF, TIXML_SUCCESS, TIXML_WRONG_TYPE, and value.

Referenced by TiXmlElement::QueryDoubleAttribute(), and TiXmlElement::QueryDoubleAttribute().

Here is the caller graph for this function:

◆ QueryIntValue()

int TiXmlAttribute::QueryIntValue ( int * _value) const

QueryIntValue examines the value string.

It is an alternative to the IntValue() method with richer error checking. If the value is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE.

A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other TinyXml calls.

Definition at line 1112 of file tinyxml.cpp.

1112 {
1113 if (TIXML_SSCANF(value.c_str(), "%d", ival) == 1) return TIXML_SUCCESS;
1114
1115 return TIXML_WRONG_TYPE;
1116}

References TIXML_SSCANF, TIXML_SUCCESS, TIXML_WRONG_TYPE, and value.

Referenced by TiXmlElement::QueryIntAttribute(), and TiXmlElement::QueryIntAttribute().

Here is the caller graph for this function:

◆ ReadName()

const char * TiXmlBase::ReadName ( const char * p,
TIXML_STRING * name,
TiXmlEncoding encoding )
staticprotectedinherited

Definition at line 409 of file tinyxmlparser.cpp.

409 {
410 // Oddly, not supported on some comilers,
411 // name->clear();
412 // So use this:
413 *name = "";
414 assert(p);
415
416 // Names start with letters or underscores.
417 // Of course, in unicode, tinyxml has no idea what a letter *is*. The
418 // algorithm is generous.
419 //
420 // After that, they can be letters, underscores, numbers,
421 // hyphens, or colons. (Colons are valid ony for namespaces,
422 // but tinyxml can't tell namespaces from names.)
423 if (p && *p && (IsAlpha((unsigned char)*p, encoding) || *p == '_')) {
424 const char* start = p;
425
426 while (p && *p && (IsAlphaNum((unsigned char)*p, encoding) || *p == '_' ||
427 *p == '-' || *p == '.' || *p == ':')) {
428 //(*name) += *p; // expensive
429 ++p;
430 }
431
432 if (p - start > 0) {
433 name->assign(start, p - start);
434 }
435
436 return p;
437 }
438
439 return 0;
440}
static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding)
static int IsAlpha(unsigned char anyByte, TiXmlEncoding encoding)

References IsAlpha(), IsAlphaNum(), and TIXML_STRING.

Referenced by TiXmlAttribute::Parse(), and TiXmlElement::Parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadText()

const char * TiXmlBase::ReadText ( const char * in,
TIXML_STRING * text,
bool ignoreWhiteSpace,
const char * endTag,
bool ignoreCase,
TiXmlEncoding encoding )
staticprotectedinherited

Definition at line 566 of file tinyxmlparser.cpp.

571 {
572 *text = "";
573
574 if (!trimWhiteSpace // certain tags always keep whitespace
575 ||
576 !condenseWhiteSpace) { // if true, whitespace is always kept
577 // Keep all the white space.
578 while (p && *p && !StringEqual(p, endTag, caseInsensitive, encoding)) {
579 int len;
580 char cArr[4] = {0, 0, 0, 0};
581 p = GetChar(p, cArr, &len, encoding);
582 text->append(cArr, len);
583 }
584 } else {
585 bool whitespace = false;
586
587 // Remove leading white space:
588 p = SkipWhiteSpace(p, encoding);
589
590 while (p && *p && !StringEqual(p, endTag, caseInsensitive, encoding)) {
591 if (*p == '\r' || *p == '\n') {
592 whitespace = true;
593 ++p;
594 } else if (IsWhiteSpace(*p)) {
595 whitespace = true;
596 ++p;
597 } else {
598 // If we've found whitespace, add it before the
599 // new character. Any whitespace just becomes a space.
600 if (whitespace) {
601 (*text) += ' ';
602 whitespace = false;
603 }
604
605 int len;
606 char cArr[4] = {0, 0, 0, 0};
607 p = GetChar(p, cArr, &len, encoding);
608
609 if (len == 1)
610 (*text) += cArr[0]; // more efficient
611 else
612 text->append(cArr, len);
613 }
614 }
615 }
616
617 if (p) p += strlen(endTag);
618
619 return p;
620}
static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
static const char * GetChar(const char *p, char *_value, int *length, TiXmlEncoding encoding)
Definition tinyxml.h:368

References condenseWhiteSpace, GetChar(), IsWhiteSpace(), SkipWhiteSpace(), StringEqual(), and TIXML_STRING.

Referenced by TiXmlAttribute::Parse(), and TiXmlText::Parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Row()

int TiXmlBase::Row ( ) const
inlineinherited

Return the position, in the original source file, of this node or attribute.

The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value.

Generally, the row and column value will be set when the TiXmlDocument::Load(), TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator>>.

The values reflect the initial load. Once the DOM is modified programmatically (by adding or changing nodes and attributes) the new values will NOT update to reflect changes in the document.

There is a minor performance cost to computing the row and column. Computation can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value.

See also
TiXmlDocument::SetTabSize()

Definition at line 275 of file tinyxml.h.

275{ return location.row + 1; }

References location.

Referenced by ticpp::Base::Row().

Here is the caller graph for this function:

◆ SetCondenseWhiteSpace()

void TiXmlBase::SetCondenseWhiteSpace ( bool condense)
inlinestaticinherited

The world does not agree on whether white space should be kept or not.

In order to make everyone happy, these global, static functions are provided to set whether or not TinyXml will condense all white space into a single space or not. The default is to condense. Note changing this value is not thread safe.

Definition at line 242 of file tinyxml.h.

242 {
243 condenseWhiteSpace = condense;
244 }

References condenseWhiteSpace.

◆ SetDocument()

void TiXmlAttribute::SetDocument ( TiXmlDocument * doc)
inline

Definition at line 1021 of file tinyxml.h.

1021{ document = doc; }

References document, and TiXmlBase::TiXmlDocument.

Referenced by TiXmlElement::Parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDoubleValue()

void TiXmlAttribute::SetDoubleValue ( double _value)

Set the value from a double.

Definition at line 1134 of file tinyxml.cpp.

1134 {
1135 char buf[256];
1136#if defined(TIXML_SNPRINTF)
1137 TIXML_SNPRINTF(buf, sizeof(buf), "%g", _value);
1138#else
1139 snprintf(buf, 256, "%lf", _value);
1140#endif
1141 SetValue(buf);
1142}
void SetValue(const char *_value)
Set the value.
Definition tinyxml.h:979

References SetValue().

Here is the call graph for this function:

◆ SetIntValue()

void TiXmlAttribute::SetIntValue ( int _value)

Set the value from an integer.

Definition at line 1124 of file tinyxml.cpp.

1124 {
1125 char buf[64];
1126#if defined(TIXML_SNPRINTF)
1127 TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);
1128#else
1129 snprintf(buf, 64, "%d", _value);
1130#endif
1131 SetValue(buf);
1132}

References SetValue().

Here is the call graph for this function:

◆ SetName() [1/2]

void TiXmlAttribute::SetName ( const char * _name)
inline

Set the name of this attribute.

Definition at line 976 of file tinyxml.h.

References name.

◆ SetName() [2/2]

void TiXmlAttribute::SetName ( const std::string & _name)
inline

STL std::string form.

Definition at line 986 of file tinyxml.h.

986{ name = _name; }

References name.

◆ SetUserData()

void TiXmlBase::SetUserData ( void * user)
inlineinherited

Set a pointer to arbitrary user data.

Definition at line 278 of file tinyxml.h.

References userData.

◆ SetValue() [1/2]

void TiXmlAttribute::SetValue ( const char * _value)
inline

Set the value.

Definition at line 979 of file tinyxml.h.

References value.

Referenced by TiXmlElement::Parse(), TiXmlElement::SetAttribute(), TiXmlElement::SetAttribute(), SetDoubleValue(), and SetIntValue().

Here is the caller graph for this function:

◆ SetValue() [2/2]

void TiXmlAttribute::SetValue ( const std::string & _value)
inline

STL std::string form.

Definition at line 988 of file tinyxml.h.

988{ value = _value; }

References value.

◆ SkipWhiteSpace()

const char * TiXmlBase::SkipWhiteSpace ( const char * p,
TiXmlEncoding encoding )
staticprotectedinherited

Definition at line 333 of file tinyxmlparser.cpp.

333 {
334 if (!p || !*p) {
335 return 0;
336 }
337
338 if (encoding == TIXML_ENCODING_UTF8) {
339 while (*p) {
340 const unsigned char* pU = (const unsigned char*)p;
341
342 // Skip the stupid Microsoft UTF-8 Byte order marks
343 if (*(pU + 0) == TIXML_UTF_LEAD_0 && *(pU + 1) == TIXML_UTF_LEAD_1 &&
344 *(pU + 2) == TIXML_UTF_LEAD_2) {
345 p += 3;
346 continue;
347 } else if (*(pU + 0) == TIXML_UTF_LEAD_0 && *(pU + 1) == 0xbfU &&
348 *(pU + 2) == 0xbeU) {
349 p += 3;
350 continue;
351 } else if (*(pU + 0) == TIXML_UTF_LEAD_0 && *(pU + 1) == 0xbfU &&
352 *(pU + 2) == 0xbfU) {
353 p += 3;
354 continue;
355 }
356
357 if (IsWhiteSpace(*p) || *p == '\n' ||
358 *p == '\r') // Still using old rules for white space.
359 ++p;
360 else
361 break;
362 }
363 } else {
364 while ((*p && IsWhiteSpace(*p)) || *p == '\n' || *p == '\r')
365 ++p;
366 }
367
368 return p;
369}
const unsigned char TIXML_UTF_LEAD_0
const unsigned char TIXML_UTF_LEAD_1
const unsigned char TIXML_UTF_LEAD_2

References IsWhiteSpace(), TIXML_ENCODING_UTF8, TIXML_UTF_LEAD_0, TIXML_UTF_LEAD_1, and TIXML_UTF_LEAD_2.

Referenced by TiXmlNode::Identify(), TiXmlAttribute::Parse(), TiXmlComment::Parse(), TiXmlDeclaration::Parse(), TiXmlDocument::Parse(), TiXmlElement::Parse(), TiXmlStylesheetReference::Parse(), TiXmlUnknown::Parse(), ReadText(), and TiXmlElement::ReadValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamTo()

bool TiXmlBase::StreamTo ( std::istream * in,
int character,
TIXML_STRING * tag )
staticprotectedinherited

Definition at line 386 of file tinyxmlparser.cpp.

386 {
387 // assert( character > 0 && character < 128 ); // else it won't work in utf-8
388 while (in->good()) {
389 int c = in->peek();
390
391 if (c == character) return true;
392
393 if (c <= 0) // Silent failure: can't get document at this scope
394 return false;
395
396 in->get();
397 *tag += (char)c;
398 }
399
400 return false;
401}

References TIXML_STRING.

Referenced by TiXmlDocument::StreamIn().

Here is the caller graph for this function:

◆ StreamWhiteSpace()

bool TiXmlBase::StreamWhiteSpace ( std::istream * in,
TIXML_STRING * tag )
staticprotectedinherited

Definition at line 372 of file tinyxmlparser.cpp.

372 {
373 for (;;) {
374 if (!in->good()) return false;
375
376 int c = in->peek();
377
378 // At this scope, we can't get to a document. So fail silently.
379 if (!IsWhiteSpace(c) || c <= 0) return true;
380
381 *tag += (char)in->get();
382 }
383}

References IsWhiteSpace(), and TIXML_STRING.

Referenced by TiXmlElement::StreamIn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StringEqual()

bool TiXmlBase::StringEqual ( const char * p,
const char * endTag,
bool ignoreCase,
TiXmlEncoding encoding )
staticprotectedinherited

Definition at line 532 of file tinyxmlparser.cpp.

535 {
536 assert(p);
537 assert(tag);
538
539 if (!p || !*p) {
540 assert(0);
541 return false;
542 }
543
544 const char* q = p;
545
546 if (ignoreCase) {
547 while (*q && *tag && ToLower(*q, encoding) == ToLower(*tag, encoding)) {
548 ++q;
549 ++tag;
550 }
551
552 if (*tag == 0) return true;
553 } else {
554 while (*q && *tag && *q == *tag) {
555 ++q;
556 ++tag;
557 }
558
559 if (*tag == 0) // Have we found the end of the tag, and everything equal?
560 return true;
561 }
562
563 return false;
564}
static int ToLower(int v, TiXmlEncoding encoding)
Definition tinyxml.h:419

References ToLower().

Referenced by TiXmlNode::Identify(), TiXmlComment::Parse(), TiXmlDeclaration::Parse(), TiXmlDocument::Parse(), TiXmlElement::Parse(), TiXmlStylesheetReference::Parse(), TiXmlText::Parse(), ReadText(), and TiXmlElement::ReadValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToLower()

int TiXmlBase::ToLower ( int v,
TiXmlEncoding encoding )
inlinestaticprotectedinherited

Definition at line 419 of file tinyxml.h.

419 {
420 if (encoding == TIXML_ENCODING_UTF8) {
421 if (v < 128) return std::tolower(v);
422
423 return v;
424 } else {
425 return std::tolower(v);
426 }
427 }

References TIXML_ENCODING_UTF8.

Referenced by StringEqual().

Here is the caller graph for this function:

◆ Value()

const char * TiXmlAttribute::Value ( ) const
inline

Return the value of this attribute.

Definition at line 947 of file tinyxml.h.

References value.

Referenced by TiXmlElement::Attribute(), TiXmlElement::CopyTo(), TiXmlDeclaration::Parse(), TiXmlElement::Parse(), and TiXmlStylesheetReference::Parse().

Here is the caller graph for this function:

◆ ValueStr()

const std::string & TiXmlAttribute::ValueStr ( ) const
inline

Return the value of this attribute.

Definition at line 951 of file tinyxml.h.

References value.

Referenced by TiXmlElement::Attribute(), and TiXmlElement::QueryValueAttribute().

Here is the caller graph for this function:

◆ TiXmlAttributeSet

friend class TiXmlAttributeSet
friend

Definition at line 916 of file tinyxml.h.

References TiXmlAttributeSet.

Referenced by TiXmlAttributeSet.

Member Data Documentation

◆ condenseWhiteSpace

bool TiXmlBase::condenseWhiteSpace = true
staticprivateinherited

Definition at line 445 of file tinyxml.h.

Referenced by IsWhiteSpaceCondensed(), ReadText(), and SetCondenseWhiteSpace().

◆ document

TiXmlDocument* TiXmlAttribute::document
private

Definition at line 1027 of file tinyxml.h.

Referenced by TiXmlAttribute(), TiXmlAttribute(), TiXmlAttribute(), Parse(), and SetDocument().

◆ entity

TiXmlBase::Entity TiXmlBase::entity
staticprivateinherited
Initial value:
= {{"&amp;", 5, '&'},
{"&lt;", 4, '<'},
{"&gt;", 4, '>'},
{"&quot;", 6, '\"'},
{"&apos;", 6, '\''}}

Definition at line 44 of file tinyxml.h.

Referenced by EncodeString(), and GetEntity().

◆ errorString

const char * TiXmlBase::errorString
staticprotectedinherited
Initial value:
= {
"No error",
"Error",
"Failed to open file",
"Memory allocation failed.",
"Error parsing Element.",
"Failed to read Element name",
"Error reading Element value.",
"Error reading Attributes.",
"Error: empty tag.",
"Error reading end tag.",
"Error parsing Unknown.",
"Error parsing Comment.",
"Error parsing Declaration.",
"Error document empty.",
"Error null (0) or unexpected EOF found in input stream.",
"Error parsing CDATA.",
"Error when TiXmlDocument added to document, because "
"TiXmlDocument can only be at the root.",
}

Definition at line 35 of file tinyxml.h.

Referenced by TiXmlDocument::SetError().

◆ location

◆ m_spawnedWrappers

std::vector< ticpp::Base* > TiCppRC::m_spawnedWrappers
inherited

Remember all wrappers that we've created with 'new' - ( e.g.

NodeFactory, FirstChildElement, etc. )

Definition at line 63 of file ticpprc.h.

Referenced by DeleteSpawnedWrappers(), ticpp::Element::LastAttribute(), ticpp::Attribute::Next(), ticpp::Node::NodeFactory(), ticpp::Attribute::Previous(), ticpp::Node::ToComment(), ticpp::Node::ToDocument(), and ticpp::Node::ToElement().

◆ m_tiRC

TiCppRCImp* TiCppRC::m_tiRC
privateinherited

Pointer to reference counter.

Definition at line 46 of file ticpprc.h.

Referenced by ticpp::Base::SetImpRC().

◆ name

TIXML_STRING TiXmlAttribute::name
private

◆ next

TiXmlAttribute* TiXmlAttribute::next
private

◆ prev

TiXmlAttribute* TiXmlAttribute::prev
private

◆ userData

void* TiXmlBase::userData
protectedinherited

Field containing a generic user pointer.

Definition at line 413 of file tinyxml.h.

Referenced by TiXmlBase(), TiXmlNode::CopyTo(), GetUserData(), GetUserData(), and SetUserData().

◆ utf8ByteTable

const int TiXmlBase::utf8ByteTable
staticinherited

Definition at line 64 of file tinyxml.h.

Referenced by GetChar(), and TiXmlParsingData::Stamp().

◆ value


The documentation for this class was generated from the following files: