- Author
- Alexander Sherikov
- Copyright
- 2018-2026 Alexander Sherikov, Licensed under the Apache License, Version 2.0. (see LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
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>
◆ 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.