Flow123d
JS_before_hm-2210-gb57a0a528
|
Go to the documentation of this file.
20 #include <boost/iostreams/device/file.hpp>
21 #include <boost/iostreams/filtering_stream.hpp>
61 std::string fname = in_file;
62 std::string extension = fname.substr(fname.find_last_of(
".") + 1);
64 if (extension ==
"con") {
66 }
else if (extension ==
"yaml") {
69 THROW(ExcInputMessage() << EI_Message(
"Invalid extension of file " + fname +
".\nMust be 'con' or 'yaml'."));
81 e << Input::ReaderInternalBase::EI_File(in_file);
throw;
94 istringstream is(str);
96 }
catch (ReaderInternalBase::ExcNotJSONFormat &e) {
97 e << ReaderInternalBase::EI_File(
"STRING: "+str);
throw;
122 std::unique_ptr<PathBase> root_path_ptr(root_path);
128 }
catch (ReaderInternalBase::ExcInputError &e) {
130 e << ReaderInternalBase::EI_Format(
"JSON");
132 e << ReaderInternalBase::EI_Format(
"YAML");
158 auto tmp_root_type =
static_cast<const typename T::InputType &
>(*root_type_);
159 return T( addr, tmp_root_type );
163 template ::Input::Record ReaderToStorage::get_root_interface<::Input::Record>()
const;
164 template ::Input::Array ReaderToStorage::get_root_interface<::Input::Array>()
const;
165 template ::Input::AbstractRecord ReaderToStorage::get_root_interface<::Input::AbstractRecord>()
const;
166 template ::Input::Tuple ReaderToStorage::get_root_interface<::Input::Tuple>()
const;
manipulators::Array< T, Delim > format(T const &deduce, Delim delim=", ")
Dedicated class for storing path to input and output files.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
void open_stream(Stream &stream) const
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.