MCPcopy Create free account
hub / github.com/DFHack/dfhack / QueryValueAttribute

Method QueryValueAttribute

depends/tinyxml/tinyxml.h:1024–1035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1022 @return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE
1023 */
1024 template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const
1025 {
1026 const TiXmlAttribute* node = attributeSet.Find( name );
1027 if ( !node )
1028 return TIXML_NO_ATTRIBUTE;
1029
1030 std::stringstream sstream( node->ValueStr() );
1031 sstream >> *outValue;
1032 if ( !sstream.fail() )
1033 return TIXML_SUCCESS;
1034 return TIXML_WRONG_TYPE;
1035 }
1036
1037 int QueryValueAttribute( const std::string& name, std::string* outValue ) const
1038 {

Callers

nothing calls this directly

Calls 1

FindMethod · 0.45

Tested by

no test coverage detected