FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Functions
FotoSHOCKcore::Serialization_internal Namespace Reference

Do not ever use things from this namespace. Ever. More...

Classes

class  HasSerialize
 Class for checking whether the type implementes the serialize() function using SFINAE. More...
 
class  CompoundTypeSerializer
 
struct  CompoundTypeSerializer< true >
 

Functions

template<typename T >
xmlNodePtr serializeGeneral_impl (T value, boost::true_type)
 Try to serialize data as a fundamental data type. More...
 
template<typename T >
xmlNodePtr serializeGeneral_impl (T value, boost::false_type)
 Overload that is used for serializing types, that are not fundamental. More...
 
template<typename T >
xmlNodePtr serializeGeneral (T value)
 General serialization routine. More...
 
template<typename T >
deserializeGeneral_impl (const xmlNodePtr value, boost::true_type)
 Fundamental data type deserialization.
 
template<typename T >
deserializeGeneral_impl (const xmlNodePtr value, boost::false_type)
 Compound data type deserialization.
 
template<typename T >
deserializeGeneral (const xmlNodePtr value)
 
uint64_t htonll (uint64_t value)
 
uint64_t ntohll (uint64_t value)
 

Detailed Description

Do not ever use things from this namespace. Ever.

Function Documentation

template<typename T >
xmlNodePtr FotoSHOCKcore::Serialization_internal::serializeGeneral ( value)

General serialization routine.

This function detects whether the value is of a fundamental data type. The fundamental data types are serialized using serializeFundamental_impl(T value, boost::true_type), other types are serialized using serializeFundamental_impl(T value, boost::false_type) that uses NVPtypeSerializer to serialize data internally.

template<typename T >
xmlNodePtr FotoSHOCKcore::Serialization_internal::serializeGeneral_impl ( value,
boost::true_type   
)

Try to serialize data as a fundamental data type.

Serializes all data types supported by the std::stringstream::operator<< It won't work with other types.

This function has to be called in a following way: serializeFundamental_impl(value, boost::is_fundamental<T>()); so a proper overload (either this or the overload for compounds) is selected.

template<typename T >
xmlNodePtr FotoSHOCKcore::Serialization_internal::serializeGeneral_impl ( value,
boost::false_type   
)

Overload that is used for serializing types, that are not fundamental.

Uses NVPtypeSerializer for serialization. The NVPtypeSerializer tries to use a serialize member function if possible.