Ariles
Classes | 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 <boost/math/special_functions.hpp>
#include <ariles2/visitors/yaml_cpp.h>
#include <yaml-cpp/yaml.h>

Classes

class  ariles2::ns_yaml_cpp::impl::Writer
 

Namespaces

 ariles2
 
 ariles2::ns_yaml_cpp
 
 ariles2::ns_yaml_cpp::impl
 

Macros

#define ARILES2_BASIC_TYPE(type)
 
#define ARILES2_BASIC_TYPE(type)
 

Functions

 ariles2::ns_yaml_cpp::CPPUT_MACRO_SUBSTITUTE (ARILES2_BASIC_INTEGER_TYPES_LIST) CPPUT_MACRO_SUBSTITUTE(ARILES2_BASIC_REAL_TYPES_LIST) void Writer
 

Macro Definition Documentation

◆ ARILES2_BASIC_TYPE [1/2]

#define ARILES2_BASIC_TYPE (   type)
Value:
void Writer::writeElement(const type &element, const Parameters &) \
{ \
*impl_->emitter_ << element; \
}
visitor::Parameters Parameters
Definition: count.h:26

Definition at line 178 of file writer.cpp.

◆ ARILES2_BASIC_TYPE [2/2]

#define ARILES2_BASIC_TYPE (   type)
Value:
void Writer::writeElement(const type &element, const Parameters &) \
{ \
if (boost::math::isnan(element)) \
{ \
*impl_->emitter_ << ".nan"; \
} \
else \
{ \
if (boost::math::isinf(element)) \
{ \
if (element < 0.0) \
{ \
*impl_->emitter_ << "-.inf"; \
} \
else \
{ \
*impl_->emitter_ << ".inf"; \
} \
} \
else \
{ \
*impl_->emitter_ << static_cast<double>(element); \
} \
} \
}

Definition at line 178 of file writer.cpp.