MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / QueryIntAttribute

Function QueryIntAttribute

src/xml/tinyxml2.h:1255–1261  ·  view source on GitHub ↗

Given an attribute name, QueryIntAttribute() returns XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion can't be performed, or XML_NO_ATTRIBUTE if the attribute doesn't exist. If successful, the result of the conversion will be written to 'value'. If not successful, nothing will be written to 'value'. This allows you to provide default value:

Source from the content-addressed store, hash-verified

1253 @endverbatim
1254 */
1255 XMLError QueryIntAttribute( const char* name, int* value ) const {
1256 const XMLAttribute* a = FindAttribute( name );
1257 if ( !a ) {
1258 return XML_NO_ATTRIBUTE;
1259 }
1260 return a->QueryIntValue( value );
1261 }
1262 /// See QueryIntAttribute()
1263 XMLError QueryUnsignedAttribute( const char* name, unsigned int* value ) const {
1264 const XMLAttribute* a = FindAttribute( name );

Callers 2

IntAttributeFunction · 0.85
QueryAttributeFunction · 0.85

Calls 2

FindAttributeFunction · 0.85
QueryIntValueMethod · 0.80

Tested by

no test coverage detected