#include <ExplicitTriangulation.h>
#include <OneSkeleton.h>
#include <ThreeSkeleton.h>
#include <TwoSkeleton.h>
#include <ZeroSkeleton.h>
#include <cstring>
#include <numeric>
Go to the source code of this file.
|
template<typename T > |
void | writeBin (std::ofstream &stream, const T var) |
|
template<typename T > |
void | writeBinArray (std::ofstream &stream, const T *const buff, const size_t size) |
|
template<typename T > |
void | readBin (std::ifstream &stream, T &res) |
|
template<typename T > |
void | readBinArray (std::ifstream &stream, T *const res, const size_t size) |
|
◆ READ_FIXED
#define READ_FIXED |
( |
|
ARRAY, |
|
|
|
N_ITEMS |
|
) |
| |
Value: if(!read_guard()) { \
ARRAY.resize(N_ITEMS); \
readBinArray(stream, ARRAY.data(), N_ITEMS); \
}
◆ WRITE_ASCII
#define WRITE_ASCII |
( |
|
ARRAY | ) |
|
Value: stream << #ARRAY << '\n'; \
for(const auto &slice : ARRAY) { \
for(size_t i = 0; i < slice.size(); ++i) { \
if(i > 0) { \
stream << ' '; \
} \
stream << slice[i]; \
} \
stream << '\n'; \
}
◆ WRITE_BOOL
#define WRITE_BOOL |
( |
|
ARRAY | ) |
|
Value: stream << #ARRAY << '\n'; \
for(const auto el : ARRAY) { \
stream << el << '\n'; \
}
◆ WRITE_FIXED
#define WRITE_FIXED |
( |
|
ARRAY | ) |
|
Value: if(ARRAY.empty()) { \
writeBin(stream, char{0}); \
} else { \
writeBin(stream, char{1}); \
writeBinArray(stream, ARRAY.data(), ARRAY.size()); \
}
◆ WRITE_GUARD
#define WRITE_GUARD |
( |
|
ARRAY | ) |
|
Value: if(ARRAY.empty()) { \
writeBin(stream, char{0}); \
return; \
} else { \
writeBin(stream, char{1}); \
}
◆ readBin()
template<typename T >
void readBin |
( |
std::ifstream & |
stream, |
|
|
T & |
res |
|
) |
| |
◆ readBinArray()
template<typename T >
void readBinArray |
( |
std::ifstream & |
stream, |
|
|
T *const |
res, |
|
|
const size_t |
size |
|
) |
| |
◆ writeBin()
template<typename T >
void writeBin |
( |
std::ofstream & |
stream, |
|
|
const T |
var |
|
) |
| |
◆ writeBinArray()
template<typename T >
void writeBinArray |
( |
std::ofstream & |
stream, |
|
|
const T *const |
buff, |
|
|
const size_t |
size |
|
) |
| |