Ariles
Namespaces | Macros | Functions
writer.cpp File Reference

Detailed Description

Author
Alexander Sherikov

Definition in file writer.cpp.

Go to the source code of this file.

#include <ariles2/visitors/namevalue2.h>
#include <boost/lexical_cast.hpp>

Namespaces

 ariles2
 
 ariles2::ns_namevalue2
 

Macros

#define ARILES2_BASIC_TYPE(type)
 

Functions

 ariles2::ns_namevalue2::CPPUT_MACRO_SUBSTITUTE (ARILES2_BASIC_NUMERIC_TYPES_LIST) void Writer
 

Macro Definition Documentation

◆ ARILES2_BASIC_TYPE

#define ARILES2_BASIC_TYPE (   type)
Value:
void Writer::writeElement(const type &element, const Writer::Parameters &) \
{ \
if (index_ == name_value_pairs_->size()) \
{ \
name_value_pairs_->resize(index_ + 1); \
} \
if (initialize_names_) \
{ \
name_value_pairs_->name(index_) = back().node_; \
if (back().isArray()) \
{ \
name_value_pairs_->name(index_) += "_"; \
name_value_pairs_->name(index_) += boost::lexical_cast<std::string>(back().index_); \
} \
} \
name_value_pairs_->value(index_) = element; \
++index_; \
}
visitor::Parameters Parameters
Definition: count.h:26

Definition at line 140 of file writer.cpp.