MIRA
Classes | Typedefs | Functions
mira::serialization Namespace Reference

Classes

struct  AcceptDesiredVersion
 Tag class used as parameter to ReflectorInterface::version() etc. More...
 
class  IgnoreMissing
 Marker for indicating parameters that should be ignored if they are missing in the config file. More...
 
struct  ReadMapPairHelper
 
struct  ReflectCallHelper
 
struct  ReflectCollectionCount
 Can be specialized for a concrete derived RecursiveMemberReflector to reflect the size of collections like vectors, arrays, lists, maps, etc. More...
 
struct  ReflectCollectionCount< JSONDeserializer, Collection >
 Specialization for JSONDeserializer which counts the item nodes in the parent node to recover the item count, which is much more user friendly, since the user does not need to provide the count himself. More...
 
struct  ReflectCollectionCount< JSONDeserializer, std::map< std::string, mapped_type > >
 
struct  ReflectCollectionCount< JSONSerializer, Collection >
 Specialization for JSONSerializer which does not write the item count explicitly. More...
 
struct  ReflectCollectionItems
 Can be specialized for a concrete derived RecursiveMemberReflector to reflect the items of collections like vectors, arrays, lists, maps, etc. More...
 
struct  ReflectedAsPointer
 For internal use only: Holds value=true, if the type T is ever reflected as pointer with Reflector within this translation unit (C file), otherwise false. More...
 
struct  ReflectReadMap
 reflects generic associative containers like map, multimap, hash_map More...
 
struct  ReflectReadMapItems
 
struct  ReflectReadMapItems< JSONSerializer, std::map< std::string, mapped_type > >
 
struct  ReflectReadSeq
 Reflects generic sequential containers like vectors, list, deque (Read Only / Serialization) More...
 
struct  ReflectReadSet
 Reflects generic set containers like set, multiset. More...
 
struct  ReflectReadSetItems
 
struct  ReflectWriteMap
 reflects generic associative containers like map, multimap, hash_map More...
 
struct  ReflectWriteMapItems
 
struct  ReflectWriteMapItems< JSONDeserializer, std::map< std::string, mapped_type > >
 
struct  ReflectWriteSeq
 Reflects generic sequencial containers like vectors, list, deque (Write Only / Deserialization) More...
 
struct  ReflectWriteSet
 Deserializes generic set containers like set, multiset. More...
 
struct  ReflectWriteSetItems
 
struct  SetReflectedAsPointer
 
struct  SplitReflectMemberHelper
 
struct  WriteMapPairHelper
 

Typedefs

typedef uint8 VersionType
 
typedef std::unordered_map< Typename, VersionTypeClassVersionMap
 

Functions

template<typename Derived , typename Container >
void reflectReadMapPair (Derived &r, const char *itemName, uint32 id, const typename Container::value_type &p)
 
template<typename Derived , typename Container >
void reflectWriteMapPair (Derived &r, const char *itemName, const char *keyName, uint32 id, Container &c, typename Container::iterator &ioHint)
 
template<typename T >
void * void_upcast (T *pointer)
 Safe cast for casting from a pointer upwards to void* while taking care of polymorphism and multiple inheritance. More...
 
template<typename T >
T * void_downcast (void *pointer)
 Safe cast for casting from a void pointer to a derived pointer T* while taking care of polymorphism and multiple inheritance. More...
 

Typedef Documentation

◆ VersionType

typedef uint8 VersionType

◆ ClassVersionMap

typedef std::unordered_map<Typename, VersionType> ClassVersionMap

Function Documentation

◆ reflectReadMapPair()

void mira::serialization::reflectReadMapPair ( Derived &  r,
const char *  itemName,
uint32  id,
const typename Container::value_type &  p 
)

◆ reflectWriteMapPair()

void mira::serialization::reflectWriteMapPair ( Derived &  r,
const char *  itemName,
const char *  keyName,
uint32  id,
Container &  c,
typename Container::iterator &  ioHint 
)

◆ void_upcast()

void* mira::serialization::void_upcast ( T *  pointer)

Safe cast for casting from a pointer upwards to void* while taking care of polymorphism and multiple inheritance.

To cast the void pointer upwards to the derived type use void_downcast.

◆ void_downcast()

T* mira::serialization::void_downcast ( void *  pointer)

Safe cast for casting from a void pointer to a derived pointer T* while taking care of polymorphism and multiple inheritance.

The void pointer must have been casted down before using void_upcast.