MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / QueryValueAttribute

Method QueryValueAttribute

cpp/tinyxml/tinyxml.h:1011–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1009 \return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE
1010 */
1011 template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const
1012 {
1013 const TiXmlAttribute* node = attributeSet.Find( name );
1014 if ( !node )
1015 return TIXML_NO_ATTRIBUTE;
1016
1017 std::stringstream sstream( node->ValueStr() );
1018 sstream >> *outValue;
1019 if ( !sstream.fail() )
1020 return TIXML_SUCCESS;
1021 return TIXML_WRONG_TYPE;
1022 }
1023 /*
1024 This is - in theory - a bug fix for "QueryValueAtribute returns truncated std::string"
1025 but template specialization is hard to get working cross-compiler. Leaving the bug for now.

Callers

nothing calls this directly

Calls 1

FindMethod · 0.45

Tested by

no test coverage detected