33 static void openFile(std::ofstream &config_ofs,
const std::string &file_name)
35 config_ofs.open(file_name.c_str());
37 ARILES_PERSISTENT_ASSERT(
38 true == config_ofs.good(),
39 std::string(
"Could not open configuration file for writing: ") + file_name.c_str());
46 virtual void flush() = 0;
54 virtual void descend(
const std::string &map_name)
56 ARILES_UNUSED_ARG(map_name)
68 virtual void startMap(
const std::size_t num_entries)
70 ARILES_UNUSED_ARG(num_entries)
81 virtual void startArray(
const std::size_t size,
const bool compact =
false) = 0;
91 ARILES_UNUSED_ARG(compact)
107 if (
false == name.empty())
115 if (
false == name.empty())
122 #define ARILES_BASIC_TYPE(type) virtual void writeElement(const type &entry) = 0; 126 #undef ARILES_BASIC_TYPE 129 template <
typename t_Entry>
130 void start(
const t_Entry &entry,
const std::string &entry_name,
const Parameters ¶m)
133 this->startRoot(entry_name);
135 this->endRoot(entry_name);
140 template <
typename t_Entry>
147 this->descend(entry_name);
159 #ifndef ARILES_METHODS_write 160 # define ARILES_METHODS_write ARILES_METHODS(write, ARILES_EMPTY_MACRO, const)
#define ARILES_TRACE_FUNCTION
virtual void startMap(const std::size_t num_entries)
Starts a nested map in the configuration file.
virtual void shiftArray()
virtual void descend(const std::string &map_name)
Starts a nested map in the configuration file.
virtual void startMatrixRow()
#define ARILES_BASIC_TYPES_LIST
#define ARILES_TRACE_TYPE(entry)
virtual void endRoot(const std::string &name)
virtual void startRoot(const std::string &name)
static void openFile(std::ofstream &config_ofs, const std::string &file_name)
open configuration file
virtual void endMap()
Ends a nested map in the configuration file.
ARILES_BASIC_TYPES_LIST void start(const t_Entry &entry, const std::string &entry_name, const Parameters ¶m)
virtual void endMatrixRow()
void ARILES_VISIBILITY_ATTRIBUTE apply_write(t_Visitor &writer, const t_Entry &entry, const typename t_Visitor::Parameters ¶m, ARILES_IS_BASE_ENABLER(ariles::write::Base, t_Entry))
void operator()(const t_Entry &entry, const std::string &entry_name, const Parameters ¶m)
virtual void startMatrix(const bool compact=false)
#define ARILES_VISIBILITY_ATTRIBUTE
#define ARILES_TRACE_ENTRY(entry_name)