12 #include <metaprogramming/CRTP.hpp> 13 #include <metaprogramming/SFINAE.hpp> 15 #include <ios/MinimalLogger.hpp> 26 hasMember_binarize<T>
and hasMember_deBinarize<T>;
41 buf.insert(buf.end(),(
char*)data,(
char*)data+size);
51 memcpy(out,&buf[readPos],size);
71 #define PROVIDE_BEGIN_END(CV) 91 #undef PROVIDE_BEGIN_END 103 template <
typename T,
112 template <
typename T,
121 template <
typename T,
130 template <
typename T,
145 template <
typename T,
160 template <
typename T,
178 template <
typename T,
212 template <
typename T>
#define CRTP_THIS
Access to the inheriting class.
#define DEFINE_HAS_MEMBER(TAG)
constexpr bool isBinarizable
Determine whether a type is serializable.
Add binarizable functionality via CRTP.
Binarizer & binarize(B &&out={}) const
Binarize a Serializable.
#define PROVIDE_CRTP_CAST_OPERATOR(CLASS)
Binarizer & deBinarize(B &&rhs)
DeBinarize a Serializable.
void clear()
Restart to write.
Binarizer & pushBack(const void *data, const size_t &size)
Push data on the back.
std::vector< char > buf
Buffer.
#define SFINAE_ON_TEMPLATE_ARG(...)
Binarizer & readAdvancing(void *out, const size_t &size)
Push data on the back.
size_t size() const
Used size.
#define PROVIDE_BEGIN_END(CV)
Add both begin and end method, with and not const.