OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
StandardSerialization.cpp File Reference
#include "StandardSerialization.h"
#include <fast_float/fast_float.h>
#include <string>
#include <charconv>
#include "Utility/String/Format.h"
#include "SerializationExceptions.h"

Namespaces

namespace  detail
 
namespace  detail_float
 
namespace  detail_integral
 

Macros

#define MM_DEFINE_TYPE_NAME(T)   template<> const char *typeName<T>() { return #T; }
 
#define MM_DEFINE_PROXY_SERIALIZATION_FUNCTIONS(TYPE, NAMESPACE)
 

Functions

template<class T >
const char * detail::typeName ()
 
bool trySerialize (const bool &src, std::string *dst)
 
bool tryDeserialize (std::string_view src, bool *dst)
 
void serialize (const bool &src, std::string *dst)
 
void deserialize (std::string_view src, bool *dst)
 
bool trySerialize (const std::string &src, std::string *dst)
 
bool tryDeserialize (std::string_view src, std::string *dst)
 
void serialize (const std::string &src, std::string *dst)
 
void deserialize (std::string_view src, std::string *dst)
 
template<class T >
bool detail_float::trySerialize (const T &src, std::string *dst)
 
template<class T >
bool detail_float::tryDeserialize (std::string_view src, T *dst)
 
template<class T >
void detail_float::serialize (const T &src, std::string *dst)
 
template<class T >
void detail_float::deserialize (std::string_view src, T *dst)
 
template<class T >
bool detail_integral::trySerialize (const T &src, std::string *dst)
 
template<class T >
bool detail_integral::tryDeserialize (std::string_view src, T *dst)
 
template<class T >
void detail_integral::serialize (const T &src, std::string *dst)
 
template<class T >
void detail_integral::deserialize (std::string_view src, T *dst)
 

Macro Definition Documentation

◆ MM_DEFINE_PROXY_SERIALIZATION_FUNCTIONS

#define MM_DEFINE_PROXY_SERIALIZATION_FUNCTIONS (   TYPE,
  NAMESPACE 
)
Value:
bool trySerialize(const TYPE &src, std::string *dst) { return NAMESPACE::trySerialize(src, dst); } \
bool tryDeserialize(std::string_view src, TYPE *dst) { return NAMESPACE::tryDeserialize(src, dst); } \
void serialize(const TYPE &src, std::string *dst) { NAMESPACE::serialize(src, dst); } \
void deserialize(std::string_view src, TYPE *dst) { NAMESPACE::deserialize(src, dst); }
bool trySerialize(const bool &src, std::string *dst)
Definition: StandardSerialization.cpp:32
bool tryDeserialize(std::string_view src, bool *dst)
Definition: StandardSerialization.cpp:37
void deserialize(std::string_view src, bool *dst)
Definition: StandardSerialization.cpp:53
void serialize(const bool &src, std::string *dst)
Definition: StandardSerialization.cpp:49

◆ MM_DEFINE_TYPE_NAME

#define MM_DEFINE_TYPE_NAME (   T)    template<> const char *typeName<T>() { return #T; }

Function Documentation

◆ deserialize() [1/2]

void deserialize ( std::string_view  src,
bool *  dst 
)

◆ deserialize() [2/2]

void deserialize ( std::string_view  src,
std::string *  dst 
)

◆ serialize() [1/2]

void serialize ( const bool &  src,
std::string *  dst 
)

◆ serialize() [2/2]

void serialize ( const std::string &  src,
std::string *  dst 
)

◆ tryDeserialize() [1/2]

bool tryDeserialize ( std::string_view  src,
bool *  dst 
)

◆ tryDeserialize() [2/2]

bool tryDeserialize ( std::string_view  src,
std::string *  dst 
)

◆ trySerialize() [1/2]

bool trySerialize ( const bool &  src,
std::string *  dst 
)

◆ trySerialize() [2/2]

bool trySerialize ( const std::string &  src,
std::string *  dst 
)