Added back in getNamedStringValue() definition. Somehow it had gotten erased, causing multiple problems to fail.

This commit is contained in:
Harry Moffat 2012-11-07 23:29:08 +00:00
parent 7c70568bb3
commit 27671cf299

View file

@ -322,6 +322,27 @@ std::string getChildValue(const Cantera::XML_Node& parent, const std::string& na
}
return parent(nameString);
}
void getNamedStringValue(const Cantera::XML_Node& node, const std::string &nameString, std::string& valueString,
std::string& typeString)
{
valueString = "";
typeString = "";
if (node.hasChild(nameString)) {
XML_Node &xc = node.child(nameString);
valueString = xc.value();
typeString = xc["type"];
} else {
XML_Node* s = getByTitle(node, nameString);
if (s) {
if (s->name() == "string") {
valueString = (*s).value();
typeString = (*s)["type"];
return;
}
}
}
}
//====================================================================================================================
// Get a vector of integer values from a child element.