Ariles
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs
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/python.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <stack>

Classes

class  ariles2::ns_python::impl::Writer
 

Namespaces

namespace  ariles2
 
namespace  ariles2::ns_python
 
namespace  ariles2::ns_python::impl
 

Macros

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

Typedefs

using ariles2::ns_python::impl::Parameters = write::Parameters
 

Macro Definition Documentation

◆ ARILES2_BASIC_TYPE [1/2]

#define ARILES2_BASIC_TYPE (   type)
Value:
void Writer::writeElement(const type &element, const Parameters &) \
{ \
*impl_->output_stream_ << element; \
}

Definition at line 185 of file writer.cpp.

◆ ARILES2_BASIC_TYPE [2/2]

#define ARILES2_BASIC_TYPE (   type)
Value:
void Writer::writeElement(const type &element, const Parameters &) \
{ \
if (std::isnan(element)) \
{ \
*impl_->output_stream_ << "float('nan')"; \
} \
else if (std::isinf(element)) \
{ \
*impl_->output_stream_ << (element > 0 ? "float('inf')" : "float('-inf')"); \
} \
else \
{ \
*impl_->output_stream_ << element; \
} \
}

Definition at line 185 of file writer.cpp.