Logo Search packages:      
Sourcecode: rarian version File versions

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 1297 of file tinyxml.cpp.

Referenced by TiXmlElement::QueryIntAttribute().

      if ( sscanf( value.c_str(), "%d", ival ) == 1 )
            return TIXML_SUCCESS;
      return TIXML_WRONG_TYPE;

Generated by  Doxygen 1.6.0   Back to index