openMSX
Classes | Namespaces | Macros | Functions
serialize_core.hh File Reference
#include "serialize_constr.hh"
#include "serialize_meta.hh"
#include "one_of.hh"
#include "unreachable.hh"
#include "xrange.hh"
#include <array>
#include <cassert>
#include <initializer_list>
#include <memory>
#include <string>
#include <type_traits>
#include <variant>
Include dependency graph for serialize_core.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openmsx::Serializer< T >
 
struct  openmsx::Serializer< T >::Saver
 
struct  openmsx::Serializer< T >::Loader
 
struct  openmsx::is_primitive< T >
 
struct  openmsx::is_primitive< bool >
 
struct  openmsx::is_primitive< char >
 
struct  openmsx::is_primitive< signed char >
 
struct  openmsx::is_primitive< signed short >
 
struct  openmsx::is_primitive< signed int >
 
struct  openmsx::is_primitive< signed long >
 
struct  openmsx::is_primitive< unsigned char >
 
struct  openmsx::is_primitive< unsigned short >
 
struct  openmsx::is_primitive< unsigned int >
 
struct  openmsx::is_primitive< unsigned long >
 
struct  openmsx::is_primitive< float >
 
struct  openmsx::is_primitive< double >
 
struct  openmsx::is_primitive< long double >
 
struct  openmsx::is_primitive< long long >
 
struct  openmsx::is_primitive< unsigned long long >
 
struct  openmsx::is_primitive< std::string >
 
struct  openmsx::SerializeClassVersion< std::pair< T1, T2 > >
 
struct  openmsx::serialize_as_enum< T >
 serialize_as_enum<T> More...
 
struct  openmsx::enum_string< T >
 
struct  openmsx::DefaultConstructVariant< I, Variant >
 
struct  openmsx::VariantSerializer< V >
 
struct  openmsx::VariantSerializer< V >::Saver
 
struct  openmsx::VariantSerializer< V >::Loader
 
struct  openmsx::serialize_as_pointer< T >
 
struct  openmsx::serialize_as_pointer_impl< T >
 
struct  openmsx::serialize_as_pointer< T * >
 
struct  openmsx::serialize_as_pointer< std::unique_ptr< T > >
 
struct  openmsx::serialize_as_pointer< std::shared_ptr< T > >
 
struct  openmsx::serialize_as_collection< T >
 
struct  openmsx::serialize_as_collection< std::array< T, N > >
 
struct  openmsx::PrimitiveSaver< T >
 
struct  openmsx::EnumSaver< T >
 
struct  openmsx::ClassSaver< T >
 
struct  openmsx::PointerSaver< TP >
 
struct  openmsx::IDSaver< TP >
 
struct  openmsx::CollectionSaver< TC >
 
struct  openmsx::Saver< T >
 
struct  openmsx::PrimitiveLoader< T >
 
struct  openmsx::EnumLoader< T >
 
struct  openmsx::ClassLoader< T >
 
struct  openmsx::NonPolymorphicPointerLoader< T >
 
struct  openmsx::PolymorphicPointerLoader< T >
 
struct  openmsx::PointerLoader2< T >
 
struct  openmsx::PointerLoader< TP >
 
struct  openmsx::IDLoader< TP >
 
struct  openmsx::CollectionLoaderHelper< sac, true >
 
struct  openmsx::CollectionLoaderHelper< sac, false >
 
struct  openmsx::CollectionLoader< TC >
 
struct  openmsx::Loader< T >
 

Namespaces

namespace  openmsx
 This file implemented 3 utility functions:
 

Macros

#define SERIALIZE_ENUM(TYPE, INFO)
 

Functions

template<typename Archive , typename T >
void openmsx::serialize (Archive &ar, T &t, unsigned version)
 
template<typename Archive , typename T1 , typename T2 >
void openmsx::serialize (Archive &ar, std::pair< T1, T2 > &p, unsigned)
 
void openmsx::enumError (std::string_view str)
 
template<typename T >
std::string openmsx::toString (std::initializer_list< enum_string< T > > list, T t_)
 
template<typename T >
openmsx::fromString (std::initializer_list< enum_string< T > > list, std::string_view str_)
 
template<typename Archive , typename T , typename SaveAction >
void openmsx::saveEnum (std::initializer_list< enum_string< T > > list, T t, SaveAction save)
 
template<typename Archive , typename T , typename LoadAction >
void openmsx::loadEnum (std::initializer_list< enum_string< T > > list, T &t, LoadAction load)
 
template<typename Variant >
Variant openmsx::defaultConstructVariant (size_t index)
 
unsigned openmsx::loadVersionHelper (MemInputArchive &, const char *, unsigned)
 
unsigned openmsx::loadVersionHelper (XmlInputArchive &ar, const char *className, unsigned latestVersion)
 
template<typename T , typename Archive >
unsigned openmsx::loadVersion (Archive &ar)
 
void openmsx::pointerError (unsigned id)
 

Macro Definition Documentation

◆ SERIALIZE_ENUM

#define SERIALIZE_ENUM (   TYPE,
  INFO 
)
Value:
template<> struct serialize_as_enum< TYPE > : std::true_type { \
serialize_as_enum() : info(INFO) {} \
std::initializer_list<enum_string< TYPE >> info; \
};

Definition at line 135 of file serialize_core.hh.