Logo Search packages:      
Sourcecode: rarian version File versions

int TiXmlElement::QueryIntAttribute ( const char *  name,
int *  _value 
) const

QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer error checking. If the attribute 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. If the attribute does not exist, then TIXML_NO_ATTRIBUTE is returned.

Definition at line 707 of file tinyxml.cpp.

References TiXmlAttribute::QueryIntValue().

{
      TIXML_STRING str( name );
      const TiXmlAttribute* node = attributeSet.Find( str );
      if ( !node )
            return TIXML_NO_ATTRIBUTE;

      return node->QueryIntValue( ival );
}


Generated by  Doxygen 1.6.0   Back to index