Empirical
Namespaces | Classes | Functions
emp::serialize Namespace Reference

Namespaces

 internal
 

Classes

class  DataPod
 A DataPod managed information about another class for serialization. More...
 

Functions

template<typename T >
auto StoreVar (DataPod &pod, const T &var, bool) -> typename T::emp_load_return_type &
 
template<typename T >
void StoreVar (DataPod &pod, const emp::vector< T > &var, bool)
 
template<typename T >
void StoreVar (DataPod &pod, const T &var, int)
 
template<typename T >
auto SetupLoad (DataPod &pod, T *, bool) -> typename T::emp_load_return_type &
 
template<typename T >
auto SetupLoad (DataPod &pod, const T *, int) -> T
 
std::string SetupLoad (DataPod &pod, std::string *, bool)
 
template<typename T >
emp::vector< T > SetupLoad (DataPod &pod, emp::vector< T > *, bool)
 
template<typename... ARG_TYPES>
void Store (DataPod &pod, ARG_TYPES &...args)
 

Function Documentation

template<typename T >
auto emp::serialize::SetupLoad ( DataPod pod,
T *  ,
bool   
) -> typename T::emp_load_return_type &
template<typename T >
auto emp::serialize::SetupLoad ( DataPod pod,
const T *  ,
int   
) -> T
std::string emp::serialize::SetupLoad ( DataPod pod,
std::string *  ,
bool   
)
template<typename T >
emp::vector<T> emp::serialize::SetupLoad ( DataPod pod,
emp::vector< T > *  ,
bool   
)
template<typename... ARG_TYPES>
void emp::serialize::Store ( DataPod pod,
ARG_TYPES &...  args 
)
template<typename T >
auto emp::serialize::StoreVar ( DataPod pod,
const T &  var,
bool   
) -> typename T::emp_load_return_type &

StoreVar() takes a DataPod and a variable and stores that variable to the pod. The third argument (bool vs. int) will receive a bool, and thus bool versions are preferred in the case of a tie. Specialized versions of this function can be included elsewhere, as needed, and should take a bool as the third argument.

template<typename T >
void emp::serialize::StoreVar ( DataPod pod,
const emp::vector< T > &  var,
bool   
)
template<typename T >
void emp::serialize::StoreVar ( DataPod pod,
const T &  var,
int   
)