26 template <
class... t_Args>
40 return (
back().node_);
54 impl_ = std::make_shared<impl::Writer>(file_name);
60 impl_ = std::make_shared<impl::Writer>(output_stream);
67 impl_->document_.save(*
impl_->output_stream_,
" ", pugi::format_indent);
68 impl_->output_stream_->flush();
74 impl_->emplace(
impl_->getRawNode().append_child(map_name.c_str()));
92 "Internal error: array has more elements than expected.");
93 impl_->emplace(
impl_->getRawNode().append_child(
"item"));
130 impl_->getRawNode().text() = element.c_str();
134 #define ARILES2_BASIC_TYPE(type) \
135 void Writer::writeElement(const type &element, const Parameters &) \
137 impl_->getRawNode().text() = (boost::lexical_cast<std::string>(element)).c_str(); \
142 #undef ARILES2_BASIC_TYPE
void startRoot(const std::string &name, const Parameters &)
void startArray(const std::size_t size, const bool=false)
void endRoot(const std::string &name)
void startMapEntry(const std::string &map_name)
Starts a nested map in the configuration file.
Writer(const std::string &file_name)
void flush()
Flush the configuration to the output.
pugi::xml_node & getRawNode()
Get current node.
pugi::xml_document document_
std::vector< NodeWrapper > node_stack_
FileVisitorImplementation(const std::string &file_name)
void writeElement(const std::complex< t_Scalar > &entry, const Parameters ¶m)
#define CPPUT_ASSERT(condition,...)
#define ARILES2_BASIC_NUMERIC_TYPES_LIST
#define CPPUT_MACRO_SUBSTITUTE(macro)
visitor::Parameters Parameters
#define CPPUT_TRACE_FUNCTION