SUNphi  1.0
SUNphi::SerializableClass< T > Class Template Reference

Provides serialization features to a class. More...

#include <Map.hpp>

Public Member Functions

T & operator~ ()
 
const T & operator~ () const
 
bool isDefault () const
 Check if the class is default. More...
 
YAML::Node serialize (YAML::Node &node, const bool &onlyNonDefault=false) const
 Convert to YAML node. More...
 
YAML::Node serialize (const bool &onlyNonDefault=false) const
 Convert to YAML node. More...
 
void putToDefault ()
 Put the class to the default value.
 
void checkNoSpuriousSubNodes (const YAML::Node &node)
 Check that no spurious subnodes are contained. More...
 
bool deSerialize (const YAML::Node &node)
 Convert from a YAML node. More...
 
template<typename B = Binarizer>
Binarizerbinarize (B &&out={}) const
 Convert to binary. More...
 
template<typename B = Binarizer>
BinarizerdeBinarize (B &&in)
 Convert from binary. More...
 

Detailed Description

template<typename T>
class SUNphi::SerializableClass< T >

Provides serialization features to a class.

Definition at line 46 of file Map.hpp.

Member Function Documentation

template<typename T>
template<typename B = Binarizer>
Binarizer& SUNphi::SerializableClass< T >::binarize ( B &&  out = {}) const
inline

Convert to binary.

Parameters
outOutput

Definition at line 165 of file Map.hpp.

template<typename T>
void SUNphi::SerializableClass< T >::checkNoSpuriousSubNodes ( const YAML::Node &  node)
inline

Check that no spurious subnodes are contained.

Spurious list

Mark found or not

Expected name

Parameters
nodeNode to be checked

Definition at line 108 of file Map.hpp.

template<typename T>
template<typename B = Binarizer>
Binarizer& SUNphi::SerializableClass< T >::deBinarize ( B &&  in)
inline

Convert from binary.

Parameters
inInput

Definition at line 180 of file Map.hpp.

template<typename T>
bool SUNphi::SerializableClass< T >::deSerialize ( const YAML::Node &  node)
inline

Convert from a YAML node.

Parameters
nodeNode from which to convert

Definition at line 146 of file Map.hpp.

template<typename T>
bool SUNphi::SerializableClass< T >::isDefault ( ) const
inline

Check if the class is default.

Default value

Definition at line 53 of file Map.hpp.

template<typename T>
const T& SUNphi::SerializableClass< T >::operator~ ( ) const
inline

Constant cast operator to class T

Definition at line 50 of file Map.hpp.

template<typename T>
T& SUNphi::SerializableClass< T >::operator~ ( )
inline

Cast operator to class T

Definition at line 50 of file Map.hpp.

template<typename T>
YAML::Node SUNphi::SerializableClass< T >::serialize ( YAML::Node &  node,
const bool &  onlyNonDefault = false 
) const
inline

Convert to YAML node.

Parameters
nodeResulting node
onlyNonDefaultPrints only non-default

Definition at line 72 of file Map.hpp.

template<typename T>
YAML::Node SUNphi::SerializableClass< T >::serialize ( const bool &  onlyNonDefault = false) const
inline

Convert to YAML node.

Resulting node

Parameters
onlyNonDefaultPrints only non-default

Definition at line 87 of file Map.hpp.


The documentation for this class was generated from the following file: