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 <ariles/visitors/yaml_cpp.h>
#include <yaml-cpp/yaml.h>

Classes

class  ariles::ns_yaml_cpp::impl::Writer
 

Namespaces

 ariles
 
 ariles::ns_yaml_cpp
 
 ariles::ns_yaml_cpp::impl
 

Macros

#define ARILES_BASIC_TYPE(type)
 
#define ARILES_BASIC_TYPE(type)
 

Functions

 ariles::ns_yaml_cpp::ARILES_MACRO_SUBSTITUTE (ARILES_BASIC_INTEGER_TYPES_LIST) ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_REAL_TYPES_LIST) void Writer
 

Macro Definition Documentation

◆ ARILES_BASIC_TYPE [1/2]

#define ARILES_BASIC_TYPE (   type)
Value:
void Writer::writeElement(const type &element) \
{ \
*impl_->emitter_ << element; \
}

Definition at line 194 of file writer.cpp.

◆ ARILES_BASIC_TYPE [2/2]

#define ARILES_BASIC_TYPE (   type)
Value:
void Writer::writeElement(const type &element) \
{ \
if (true == ariles::isNaN(element)) \
{ \
*impl_->emitter_ << ".nan"; \
} \
else \
{ \
if (true == ariles::isInfinity(element)) \
{ \
if (element < 0.0) \
{ \
*impl_->emitter_ << "-.inf"; \
} \
else \
{ \
*impl_->emitter_ << ".inf"; \
} \
} \
else \
{ \
*impl_->emitter_ << element; \
} \
} \
}

Definition at line 194 of file writer.cpp.