Go to the documentation of this file.
   41         #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) 
   43                 errno_t err = fopen_s( &fp, 
filename, mode );
 
   56         while( i<(
int)str.length() )
 
   58                 unsigned char c = (
unsigned char) str[i];
 
   61                      && i < ( (
int)str.length() - 2 )
 
   75                         while ( i<(
int)str.length()-1 )
 
   77                                 outString->append( str.c_str() + i, 1 );
 
  100                         outString->append( 
entity[3].str, 
entity[3].strLength );
 
  103                 else if ( c == 
'\'' )
 
  105                         outString->append( 
entity[4].str, 
entity[4].strLength );
 
  114                         #if defined(TIXML_SNPRINTF)              
  115                                 TIXML_SNPRINTF( buf, 
sizeof(buf), 
"&#x%02X;", (
unsigned) ( c & 0xff ) );
 
  117                                 sprintf( buf, 
"&#x%02X;", (
unsigned) ( c & 0xff ) );
 
  122                         outString->append( buf, (
int)strlen( buf ) );
 
  129                         *outString += (char) c; 
 
  232         if ( !beforeThis || beforeThis->
parent != 
this ) {
 
  247         node->
next = beforeThis;
 
  249         if ( beforeThis->
prev )
 
  258         beforeThis->
prev = node;
 
  265         if ( !afterThis || afterThis->
parent != 
this ) {
 
  280         node->
prev = afterThis;
 
  282         if ( afterThis->
next )
 
  291         afterThis->
next = node;
 
  301         if ( replaceThis->
parent != 
this )
 
  304         if ( withThis.ToDocument() ) {
 
  319         if ( replaceThis->
next )
 
  324         if ( replaceThis->
prev )
 
  341         if ( removeThis->
parent != 
this )
 
  347         if ( removeThis->
next )
 
  352         if ( removeThis->
prev )
 
  366                 if ( strcmp( node->
Value(), _value ) == 0 )
 
  378                 if ( strcmp( node->
Value(), _value ) == 0 )
 
  393                 assert( previous->
parent == 
this );
 
  407                 assert( previous->
parent == 
this );
 
  416         for ( node = 
next; node; node = node->
next )
 
  418                 if ( strcmp( node->
Value(), _value ) == 0 )
 
  428         for ( node = 
prev; node; node = node->
prev )
 
  430                 if ( strcmp( node->
Value(), _value ) == 0 )
 
  460                 if ( node->ToElement() )
 
  461                         return node->ToElement();
 
  475                 if ( node->ToElement() )
 
  476                         return node->ToElement();
 
  490                 if ( node->ToElement() )
 
  491                         return node->ToElement();
 
  505                 if ( node->ToElement() )
 
  506                         return node->ToElement();
 
  516         for( node = 
this; node; node = node->
parent )
 
  518                 if ( node->ToDocument() )
 
  519                         return node->ToDocument();
 
  581                 return node->Value();
 
  591                 return &attrib->ValueStr();
 
  600         const char* result = 0;
 
  603                 result = attrib->Value();
 
  616         const std::string* result = 0;
 
  619                 result = &attrib->ValueStr();
 
  632         const char* result = 0;
 
  635                 result = attrib->Value();
 
  648         const std::string* result = 0;
 
  651                 result = &attrib->ValueStr();
 
  678         *
value = (unsigned)ival;
 
  784                 attrib->SetValue( cvalue );
 
  794                 attrib->SetValue( _value );
 
  804         for ( i=0; i<depth; i++ ) {
 
  805                 fprintf( cfile, 
"    " );
 
  808         fprintf( cfile, 
"<%s", 
value.c_str() );
 
  813                 fprintf( cfile, 
" " );
 
  814                 attrib->
Print( cfile, depth );
 
  824                 fprintf( cfile, 
" />" );
 
  828                 fprintf( cfile, 
">" );
 
  830                 fprintf( cfile, 
"</%s>", 
value.c_str() );
 
  834                 fprintf( cfile, 
">" );
 
  838                         if ( !node->ToText() )
 
  840                                 fprintf( cfile, 
"\n" );
 
  842                         node->
Print( cfile, depth+1 );
 
  844                 fprintf( cfile, 
"\n" );
 
  845                 for( i=0; i<depth; ++i ) {
 
  846                         fprintf( cfile, 
"    " );
 
  848                 fprintf( cfile, 
"</%s>", 
value.c_str() );
 
  863         attribute = attribute->
Next() )
 
  865                 target->
SetAttribute( attribute->Name(), attribute->Value() );
 
  881                         if ( !node->Accept( visitor ) )
 
  904                 const TiXmlText* childText = child->ToText();
 
  906                         return childText->
Value();
 
  924         value = documentName;
 
  934     value = documentName;
 
  975                 bool result = 
LoadFile( file, encoding );
 
 1000         fseek( file, 0, SEEK_END );
 
 1002         fseek( file, 0, SEEK_SET );
 
 1032         char* buf = 
new char[ 
length+1 ];
 
 1035         if ( fread( buf, 
length, 1, file ) != 1 ) {
 
 1052         const char* p = buf;    
 
 1054         const char CR = 0x0d;
 
 1055         const char LF = 0x0a;
 
 1059                 assert( p < (buf+
length) );
 
 1060                 assert( q <= (buf+
length) );
 
 1074         assert( q <= (buf+
length) );
 
 1077         Parse( buf, 0, encoding );
 
 1111         return (ferror(fp) == 0);
 
 1150                 node->Print( cfile, depth );
 
 1151                 fprintf( cfile, 
"\n" );
 
 1162                         if ( !node->Accept( visitor ) )
 
 1217         if (
value.find (
'\"') == TIXML_STRING::npos) {
 
 1219                         fprintf (cfile, 
"%s=\"%s\"", n.c_str(), v.c_str() );
 
 1222                         (*str) += n; (*str) += 
"=\""; (*str) += v; (*str) += 
"\"";
 
 1227                         fprintf (cfile, 
"%s='%s'", n.c_str(), v.c_str() );
 
 1230                         (*str) += n; (*str) += 
"='"; (*str) += v; (*str) += 
"'";
 
 1253         #if defined(TIXML_SNPRINTF)              
 1256                 sprintf (buf, 
"%d", _value);
 
 1264         #if defined(TIXML_SNPRINTF)              
 1267                 sprintf (buf, 
"%g", _value);
 
 1274         return atoi (
value.c_str ());
 
 1279         return atof (
value.c_str ());
 
 1300         for ( 
int i=0; i<depth; i++ )
 
 1302                 fprintf( cfile,  
"    " );
 
 1304         fprintf( cfile, 
"<!--%s-->", 
value.c_str() );
 
 1316         return visitor->
Visit( *
this );
 
 1338                 fprintf( cfile, 
"\n" );
 
 1339                 for ( i=0; i<depth; i++ ) {
 
 1340                         fprintf( cfile, 
"    " );
 
 1342                 fprintf( cfile, 
"<![CDATA[%s]]>\n", 
value.c_str() );    
 
 1348                 fprintf( cfile, 
"%s", buffer.c_str() );
 
 1362         return visitor->
Visit( *
this );
 
 1380                                                                         const char * _encoding,
 
 1381                                                                         const char * _standalone )
 
 1390 #ifdef TIXML_USE_STL 
 1392                                                                         const std::string& _encoding,
 
 1393                                                                         const std::string& _standalone )
 
 1420         if ( cfile ) fprintf( cfile, 
"<?xml " );
 
 1421         if ( str )       (*str) += 
"<?xml ";
 
 1424                 if ( cfile ) fprintf (cfile, 
"version=\"%s\" ", 
version.c_str ());
 
 1425                 if ( str ) { (*str) += 
"version=\""; (*str) += 
version; (*str) += 
"\" "; }
 
 1428                 if ( cfile ) fprintf (cfile, 
"encoding=\"%s\" ", 
encoding.c_str ());
 
 1429                 if ( str ) { (*str) += 
"encoding=\""; (*str) += 
encoding; (*str) += 
"\" "; }
 
 1432                 if ( cfile ) fprintf (cfile, 
"standalone=\"%s\" ", 
standalone.c_str ());
 
 1433                 if ( str ) { (*str) += 
"standalone=\""; (*str) += 
standalone; (*str) += 
"\" "; }
 
 1435         if ( cfile ) fprintf( cfile, 
"?>" );
 
 1436         if ( str )       (*str) += 
"?>";
 
 1452         return visitor->
Visit( *
this );
 
 1470         for ( 
int i=0; i<depth; i++ )
 
 1471                 fprintf( cfile, 
"    " );
 
 1472         fprintf( cfile, 
"<%s>", 
value.c_str() );
 
 1484         return visitor->
Visit( *
this );
 
 1516     #ifdef TIXML_USE_STL 
 1519         assert( !
Find( addMe->Name() ) );       
 
 1535                 if ( node == removeMe )
 
 1548 #ifdef TIXML_USE_STL 
 1553                 if ( node->name == name )
 
 1565                 attrib->SetName( _name );
 
 1576                 if ( strcmp( node->name.c_str(), name ) == 0 )
 
 1589                 attrib->SetName( _name );
 
 1595 #ifdef TIXML_USE_STL     
 1599         tag.reserve( 8 * 1000 );
 
 1600         base.StreamIn( &in, &tag );
 
 1608 #ifdef TIXML_USE_STL     
 1609 std::ostream& operator<< (std::ostream & out, 
const TiXmlNode & base)
 
 1614         out << printer.Str();
 
 1620 std::string& operator<< (std::string& out, 
const TiXmlNode& base )
 
 1625         out.append( printer.Str() );
 
 1772         for( 
const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->
Next() )
 
 1788                           && element.
FirstChild()->ToText()->CDATA() == 
false )
 
  
TiXmlAttributeSet attributeSet
const TiXmlNode * LastChild() const
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)=0
const char * Attribute(const char *name) const
int IntValue() const
Return the value of this attribute, converted to an integer.
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
int QueryUnsignedAttribute(const char *name, unsigned *_value) const
QueryUnsignedAttribute examines the attribute - see QueryIntAttribute().
TiXmlHandle FirstChildElement() const
Return a handle to the first child element.
const TIXML_STRING & ValueTStr() const
virtual bool Accept(TiXmlVisitor *visitor) const
virtual void Print(FILE *cfile, int depth) const
virtual TiXmlNode * Clone() const
virtual bool Visit(const TiXmlDeclaration &declaration)
Visit a declaration.
const unsigned char TIXML_UTF_LEAD_2
virtual TiXmlNode * Clone() const
Creates a copy of this Declaration and returns it.
void CopyTo(TiXmlText *target) const
TiXmlHandle ChildElement(const char *value, int index) const
void SetDoubleAttribute(const char *name, double value)
TiXmlAttribute * FindOrCreate(const char *_name)
virtual bool Visit(const TiXmlDeclaration &)
Visit a declaration.
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
virtual void Print(FILE *cfile, int depth) const
const unsigned char TIXML_UTF_LEAD_1
TiXmlText(const char *initValue)
void CopyTo(TiXmlUnknown *target) const
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
virtual bool Accept(TiXmlVisitor *visitor) const
TiXmlHandle Child(const char *value, int index) const
void SetError(int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding)
static void EncodeString(const TIXML_STRING &str, TIXML_STRING *out)
virtual bool Accept(TiXmlVisitor *content) const
virtual void Print(FILE *cfile, int depth) const
void CopyTo(TiXmlDeclaration *target) const
virtual bool VisitEnter(const TiXmlDocument &doc)
Visit a document.
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
void CopyTo(TiXmlNode *target) const
TiXmlAttribute * Find(const char *_name) const
friend class TiXmlElement
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
const TiXmlDocument * GetDocument() const
TiXmlDeclaration()
Construct an empty declaration.
TiXmlElement & operator=(const TiXmlElement &base)
@ TIXML_ERROR_OPENING_FILE
void Clear()
Delete all the children of this node. Does not affect 'this'.
virtual bool Accept(TiXmlVisitor *content) const
static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
virtual TiXmlNode * Clone() const
[internal use] Creates a new Element and returns it.
bool SaveFile() const
Save a file using the current document value. Returns true if successful.
virtual TiXmlNode * Clone() const =0
std::istream & operator>>(std::istream &str, CSVRow &data)
TiXmlDeclaration & operator=(const TiXmlDeclaration ©)
const TiXmlElement * NextSiblingElement() const
void RemoveAttribute(const char *name)
int QueryDoubleAttribute(const char *name, double *_value) const
QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
@ TIXML_ERROR_DOCUMENT_EMPTY
int QueryDoubleValue(double *_value) const
QueryDoubleValue examines the value string. See QueryIntValue().
int QueryIntValue(int *_value) const
void CopyTo(TiXmlElement *target) const
void SetAttribute(const char *name, const char *_value)
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
virtual bool VisitEnter(const TiXmlDocument &)
Visit a document.
int QueryBoolAttribute(const char *name, bool *_value) const
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
double DoubleValue() const
Return the value of this attribute, converted to a double.
TiXmlHandle FirstChild() const
Return a handle to the first child node.
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
const TiXmlEncoding TIXML_DEFAULT_ENCODING
void SetIntValue(int _value)
Set the value from an integer.
static Entity entity[NUM_ENTITY]
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
bool CDATA() const
Queries whether this represents text using a CDATA section.
void CopyTo(TiXmlDocument *target) const
virtual void Print(FILE *cfile, int depth) const =0
virtual bool VisitExit(const TiXmlDocument &)
Visit a document.
static bool condenseWhiteSpace
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
const TiXmlAttribute * First() const
virtual void Print(FILE *cfile, int depth, TIXML_STRING *str) const
const char * Value() const
virtual void Print(FILE *cfile, int depth) const
@ TIXML_ERROR_DOCUMENT_TOP_ONLY
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
void Add(TiXmlAttribute *attribute)
void SetDoubleValue(double _value)
Set the value from a double.
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
FILE * TiXmlFOpen(const char *filename, const char *mode)
bool LoadFile(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
int QueryIntAttribute(const char *name, int *_value) const
void SetValue(const char *_value)
virtual bool VisitExit(const TiXmlDocument &doc)
Visit a document.
void Remove(TiXmlAttribute *attribute)
void * userData
Field containing a generic user pointer.
TiXmlCursor errorLocation
virtual bool Accept(TiXmlVisitor *visitor) const =0
virtual bool Accept(TiXmlVisitor *content) const
TiXmlDocument & operator=(const TiXmlDocument ©)
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
const unsigned char TIXML_UTF_LEAD_0
const char * GetText() const
TiXmlDocument()
Create an empty document, that has no name.
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
TiXmlHandle(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
virtual TiXmlNode * Clone() const
Creates a copy of this Unknown and returns it.
sick_scan
Author(s): Michael Lehning 
, Jochen Sprickerhof , Martin Günther 
autogenerated on Thu Sep 8 2022 02:30:19