10#ifndef TEUCHOS_YAMLPARSER_DECL_H_
11#define TEUCHOS_YAMLPARSER_DECL_H_
105#include "Teuchos_PtrDecl.hpp"
107#ifdef HAVE_TEUCHOSPARAMETERLIST_YAMLCPP
108#include "yaml-cpp/yaml.h"
117#ifdef HAVE_TEUCHOSPARAMETERLIST_YAMLCPP
118#define MAKE_EXCEPTION_TYPE(Name) \
119class Name : public Teuchos::ExceptionBase \
122 Name(const std::string& arg) : ExceptionBase(arg) {} \
125MAKE_EXCEPTION_TYPE(YamlKeyError)
126MAKE_EXCEPTION_TYPE(YamlSequenceError)
127MAKE_EXCEPTION_TYPE(YamlStructureError)
128MAKE_EXCEPTION_TYPE(YamlUndefinedNodeError)
130#undef MAKE_EXCEPTION_TYPE
133std::string convertXmlToYaml(
const std::string& xmlFileName);
134void convertXmlToYaml(
const std::string& xmlFileName,
const std::string& yamlFileName);
135void convertXmlToYaml(std::istream& xmlStream, std::ostream& yamlStream);
138namespace YAMLParameterList
141 const std::string& name);
147 #ifdef HAVE_TEUCHOSPARAMETERLIST_YAMLCPP
150 void processKeyValueNode(
const std::string& key, const ::YAML::Node& node,
Teuchos::ParameterList& parent,
bool topLevel =
false);
154 void writeParameter(
const std::string& paramName,
const Teuchos::ParameterEntry& entry, std::ostream& yaml,
int indentLevel);
155 void generalWriteString(
const std::string& str, std::ostream& yaml);
156 void generalWriteDouble(
double d, std::ostream& yaml);
157 bool stringNeedsQuotes(
const std::string& str);
Object held as the "value" in the Teuchos::ParameterList std::map.
Templated Parameter List class.
Reference-counted pointer class and non-member templated function implementations.
This object is held as the "value" in the Teuchos::ParameterList std::map.
A list of parameters of arbitrary type.
params_t::ConstIterator ConstIterator
Parameter container const iterator typedef.
Smart reference counting pointer class for automatic garbage collection.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...