24#ifndef __BITPIT_COMMON_BINARY_UTILS_HPP__
25#define __BITPIT_COMMON_BINARY_UTILS_HPP__
47template<typename T, typename std::enable_if<std::is_pod<T>::value>::type* =
nullptr>
48void write(std::ostream &stream,
const std::vector<T> &value);
50template<typename T, std::size_t dim, typename std::enable_if<std::is_pod<T>::value>::type* =
nullptr>
51void write(std::ostream &stream,
const std::array<T, dim> &value);
53template<typename T, std::size_t dim, typename std::enable_if<!std::is_pod<T>::value>::type* =
nullptr>
54void write(std::ostream &stream,
const std::array<T, dim> &value);
56template<typename T, typename std::enable_if<utils::is_iterable<T>::value>::type* =
nullptr>
57void write(std::ostream &stream,
const T &value);
59template<typename T, typename std::enable_if<std::is_pod<T>::value>::type* =
nullptr>
60void write(std::ostream &stream,
const T &value);
63void write(std::ostream &stream,
const T &value,
size_t size);
66void write(std::ostream &stream,
const T *value,
size_t size);
69void write(std::ostream &stream, T *value,
size_t size);
71void write(std::ostream &stream,
const std::vector<bool> &container);
73void write(std::ostream &stream,
const std::string &
string);
75template<typename T, typename std::enable_if<std::is_pod<T>::value>::type* =
nullptr>
76void read(std::istream &stream, std::vector<T> &value);
78template<typename T, std::size_t dim, typename std::enable_if<std::is_pod<T>::value>::type* =
nullptr>
79void read(std::istream &stream, std::array<T, dim> &value);
81template<typename T, std::size_t dim, typename std::enable_if<!std::is_pod<T>::value>::type* =
nullptr>
82void read(std::istream &stream, std::array<T, dim> &value);
84template<typename T, typename std::enable_if<utils::is_iterable<T>::value>::type* =
nullptr>
85void read(std::istream &stream, T &value);
87template<typename T, typename std::enable_if<std::is_pod<T>::value>::type* =
nullptr>
88void read(std::istream &stream, T &value);
91void read(std::istream &stream, T &value,
size_t size);
94void read(std::istream &stream, T *value,
size_t size);
96void read(std::istream &stream, std::vector<bool> &container);
98void read(std::istream &stream, std::vector<bool>::reference value);
100void read(std::istream &stream, std::string &
string);
109#include "binaryUtils.tpp"
void write(std::ostream &stream, const std::vector< bool > &container)
void read(std::istream &stream, std::vector< bool > &container)