47 #ifndef TEUCHOS_YAMLPARSER_DECL_H_ 48 #define TEUCHOS_YAMLPARSER_DECL_H_ 50 #include "yaml-cpp/yaml.h" 54 #include "Teuchos_PtrDecl.hpp" 68 #define MAKE_EXCEPTION_TYPE(Name) \ 69 class Name : public Teuchos::ExceptionBase \ 72 Name(const std::string& arg) : ExceptionBase(arg) {} \ 75 MAKE_EXCEPTION_TYPE(YamlKeyError)
76 MAKE_EXCEPTION_TYPE(YamlScalarError)
77 MAKE_EXCEPTION_TYPE(YamlSequenceError)
78 MAKE_EXCEPTION_TYPE(YamlStructureError)
79 MAKE_EXCEPTION_TYPE(YamlUndefinedNodeError)
81 #undef MAKE_EXCEPTION_TYPE 83 std::string convertXmlToYaml(
const std::string& xmlFileName);
84 void convertXmlToYaml(
const std::string& xmlFileName,
const std::string& yamlFileName);
85 void convertXmlToYaml(std::istream& xmlStream, std::ostream& yamlStream);
89 namespace YAMLParameterList
101 void processKeyValueNode(
const std::string& key,
const YAML::Node& node,
Teuchos::ParameterList& parent,
bool topLevel =
false);
104 void writeParameter(
const std::string& paramName,
const Teuchos::ParameterEntry& entry, std::ostream& yaml,
int indentLevel);
105 void generalWriteString(
const std::string& str, std::ostream& yaml);
106 void generalWriteDouble(
double d, std::ostream& yaml);
107 bool stringNeedsQuotes(
const std::string& str);
Object held as the "value" in the Teuchos::ParameterList std::map.
C++ Standard Library compatable filtered iterator.
This object is held as the "value" in the Teuchos::ParameterList std::map.
Templated Parameter List class.
A list of parameters of arbitrary type.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.
Reference-counted pointer class and non-member templated function implementations.