47 #ifndef TEUCHOS_YAMLPARSER_DECL_H_ 48 #define TEUCHOS_YAMLPARSER_DECL_H_ 50 #include "yaml-cpp/yaml.h" 68 #define MAKE_EXCEPTION_TYPE(Name) \ 69 class Name : public Teuchos::ExceptionBase \ 72 Name(const std::string& arg) : ExceptionBase(arg) {} \ 81 #undef MAKE_EXCEPTION_TYPE 88 bool overwrite =
true);
91 bool overwrite =
true);
95 void convertXmlToYaml(
const std::string& xmlFileName,
const std::string& yamlFileName);
99 namespace YAMLParameterList
Object held as the "value" in the Teuchos::ParameterList std::map.
C++ Standard Library compatable filtered iterator.
void writeYamlFile(const std::string &yamlFile, Teuchos::RCP< Teuchos::ParameterList > &pl)
void updateParametersFromYamlFile(const std::string &yamlFileName, const Teuchos::Ptr< Teuchos::ParameterList > ¶mList)
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromYamlCString(const char *const data, const Teuchos::Ptr< Teuchos::ParameterList > ¶mList, bool overwrite)
This object is held as the "value" in the Teuchos::ParameterList std::map.
void processKeyValueNode(const std::string &key, const YAML::Node &node, Teuchos::ParameterList &parent, bool topLevel)
void generalWriteDouble(double d, std::ofstream &yaml)
Teuchos::RCP< Teuchos::ParameterList > parseYamlText(const std::string &text)
void updateParametersFromYamlString(const std::string &yamlData, const Teuchos::Ptr< Teuchos::ParameterList > ¶mList, bool overwrite)
Templated Parameter List class.
void processMapNode(const YAML::Node &node, Teuchos::ParameterList &parent, bool topLevel)
void writeParameterList(Teuchos::ParameterList &pl, std::ofstream &yaml, int indentLevel)
#define MAKE_EXCEPTION_TYPE(Name)
Teuchos::RCP< Teuchos::ParameterList > readParams(std::vector< YAML::Node > &lists)
A list of parameters of arbitrary type.
Teuchos::RCP< Teuchos::ParameterList > parseYamlFile(const std::string &yamlFile)
bool stringNeedsQuotes(const std::string &str)
std::string convertXmlToYaml(const std::string &xmlFileName)
Teuchos::RCP< Teuchos::ParameterList > getParametersFromYamlFile(const std::string &yamlFileName)
void writeParameter(const std::string ¶mName, const Teuchos::ParameterEntry &entry, std::ofstream &yaml, int indentLevel)
Reference-counted pointer class and non-member templated function implementations.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists...
void generalWriteString(const std::string &str, std::ofstream &yaml)
bool haveSameValuesUnordered(const Teuchos::ParameterList &lhs, const Teuchos::ParameterList &rhs, bool verbose)
Teuchos::ParameterList::ConstIterator PLIter