SUNphi  1.0
Binarize.hpp File Reference

Converts to and from binary. More...

#include <cstring>
#include <string>
#include <vector>
#include <metaprogramming/CRTP.hpp>
#include <metaprogramming/SFINAE.hpp>
#include <ios/MinimalLogger.hpp>

Go to the source code of this file.

Classes

struct  SUNphi::HasMember_binarize< Type >
 
struct  SUNphi::HasMember_binarize< Type >::Fallback
 
struct  SUNphi::HasMember_binarize< Type >::Derived
 
struct  SUNphi::HasMember_binarize< Type >::Check< U, U >
 
struct  SUNphi::ConstrainHasMember_binarize< T >
 Class forcing T to have a member "binarize" defined. More...
 
struct  SUNphi::HasMember_deBinarize< Type >
 
struct  SUNphi::HasMember_deBinarize< Type >::Fallback
 
struct  SUNphi::HasMember_deBinarize< Type >::Derived
 
struct  SUNphi::HasMember_deBinarize< Type >::Check< U, U >
 
struct  SUNphi::ConstrainHasMember_deBinarize< T >
 Class forcing T to have a member "deBinarize" defined. More...
 
class  SUNphi::Binarizer
 Class to convert objects to and from binary. More...
 
class  SUNphi::Binarizable< T >
 Add binarizable functionality via CRTP. More...
 

Macros

#define PROVIDE_BEGIN_END(CV)
 Add both begin and end method, with and not const. More...
 

Functions

template<typename Type >
constexpr bool SUNphi::hasMember_binarizeHelper ()
 
template<typename Type >
constexpr bool SUNphi::hasMember_deBinarizeHelper ()
 

Variables

template<typename Type >
constexpr bool SUNphi::hasMember_binarize = hasMember_binarizeHelper<RemRef<Type>>()
 
template<typename Type >
constexpr bool SUNphi::hasMember_deBinarize = hasMember_deBinarizeHelper<RemRef<Type>>()
 
template<typename T >
constexpr bool SUNphi::isBinarizable
 Determine whether a type is serializable. More...
 

Detailed Description

Converts to and from binary.

Definition in file Binarize.hpp.

Macro Definition Documentation

#define PROVIDE_BEGIN_END (   CV)
Value:
\
CV auto begin() \
CV \
{ \
return \
buf.begin(); \
} \
\ \
CV auto end() \
CV \
{ \
return \
buf.end(); \
}

Add both begin and end method, with and not const.

Definition at line 71 of file Binarize.hpp.

Function Documentation

template<typename Type >
constexpr bool SUNphi::hasMember_binarizeHelper ( )

Intemediate function to distinguish the non-class case

Definition at line 19 of file Binarize.hpp.

template<typename Type >
constexpr bool SUNphi::hasMember_deBinarizeHelper ( )

Intemediate function to distinguish the non-class case

Definition at line 20 of file Binarize.hpp.

Variable Documentation

template<typename Type >
constexpr bool SUNphi::hasMember_binarize = hasMember_binarizeHelper<RemRef<Type>>()

Detect if Type has member (variable or method) binarize

Uses SFINAE to induce ambiguity in the detection of the member

Definition at line 19 of file Binarize.hpp.

template<typename Type >
constexpr bool SUNphi::hasMember_deBinarize = hasMember_deBinarizeHelper<RemRef<Type>>()

Detect if Type has member (variable or method) deBinarize

Uses SFINAE to induce ambiguity in the detection of the member

Definition at line 20 of file Binarize.hpp.

template<typename T >
constexpr bool SUNphi::isBinarizable
Initial value:
=
hasMember_binarize<T> and hasMember_deBinarize<T>

Determine whether a type is serializable.

Definition at line 25 of file Binarize.hpp.