openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::InputArchiveBase< Derived > Class Template Reference

#include <serialize.hh>

Inheritance diagram for openmsx::InputArchiveBase< Derived >:
Inheritance graph
[legend]
Collaboration diagram for openmsx::InputArchiveBase< Derived >:
Collaboration graph
[legend]

Public Member Functions

template<typename T , typename... Args>
void serializeWithID (const char *tag, T &t, Args... args)
 
void serialize_blob (const char *tag, void *data, size_t len, bool diff=true)
 
template<typename T >
void serialize (const char *tag, T &t)
 
template<typename T >
void serializePointerID (const char *tag, const T &t)
 
template<typename T >
void serializePolymorphic (const char *tag, T &t)
 
template<typename T >
void serializeOnlyOnce (const char *tag, const T &t)
 
void serializeChar (const char *tag, char &c)
 
template<typename T , typename TUPLE >
void doSerialize (const char *tag, T &t, TUPLE args, int id=0)
 
- Public Member Functions inherited from openmsx::ArchiveBase< Derived >
template<typename Base , typename T >
void serializeBase (T &t)
 Is this archive a loader or a saver. More...
 
template<typename Base , typename T >
void serializeInlinedBase (T &t, unsigned version)
 Serialize the base class of this classtype. More...
 
bool isReverseSnapshot () const
 Is this a reverse-snapshot? More...
 
template<typename T >
void attribute (const char *name, T &t)
 Load/store an attribute from/in the archive. More...
 
void attribute (const char *name, const char *value)
 
bool hasAttribute (const char *)
 Check the presence of a (optional) attribute. More...
 
bool findAttribute (const char *, unsigned &)
 Optimization: combination of hasAttribute() and getAttribute(). More...
 
int countChildren () const
 Count the number of child tags. More...
 
void beginTag (const char *)
 Indicate begin of a tag. More...
 
void endTag (const char *)
 Indicate begin of a tag. More...
 
- Public Member Functions inherited from openmsx::InputArchiveBase2
void beginSection ()
 
void endSection ()
 
void * getPointer (unsigned id)
 
void addPointer (unsigned id, const void *p)
 
unsigned getId (const void *p) const
 
template<typename T >
void resetSharedPtr (std::shared_ptr< T > &s, T *r)
 

Protected Member Functions

 InputArchiveBase ()=default
 
- Protected Member Functions inherited from openmsx::ArchiveBase< Derived >
Derived & self ()
 Returns a reference to the most derived class. More...
 
- Protected Member Functions inherited from openmsx::InputArchiveBase2
 InputArchiveBase2 ()=default
 

Additional Inherited Members

- Static Public Attributes inherited from openmsx::ArchiveBase< Derived >
static constexpr bool NEED_VERSION = true
 Does this archive store version information. More...
 
static constexpr bool TRANSLATE_ENUM_TO_STRING = false
 Does this archive store enums as strings. More...
 
static constexpr bool CAN_HAVE_OPTIONAL_ATTRIBUTES = false
 Some archives (like XML archives) can store optional attributes. More...
 
static constexpr bool CAN_COUNT_CHILDREN = false
 Some archives (like XML archives) can count the number of subtags that belong to the current tag. More...
 
- Static Public Attributes inherited from openmsx::InputArchiveBase2
static constexpr bool IS_LOADER = true
 

Detailed Description

template<typename Derived>
class openmsx::InputArchiveBase< Derived >

Definition at line 548 of file serialize.hh.

Constructor & Destructor Documentation

◆ InputArchiveBase()

template<typename Derived >
openmsx::InputArchiveBase< Derived >::InputArchiveBase ( )
protecteddefault

Member Function Documentation

◆ doSerialize()

template<typename Derived >
template<typename T , typename TUPLE >
void openmsx::InputArchiveBase< Derived >::doSerialize ( const char *  tag,
T &  t,
TUPLE  args,
int  id = 0 
)
inline

◆ serialize()

template<typename Derived >
template<typename T >
void openmsx::InputArchiveBase< Derived >::serialize ( const char *  tag,
T &  t 
)
inline

◆ serialize_blob()

template<typename Derived >
void openmsx::InputArchiveBase< Derived >::serialize_blob ( const char *  tag,
void *  data,
size_t  len,
bool  diff = true 
)

Definition at line 136 of file serialize.cc.

References Base64::decode_inplace(), and HexDump::decode_inplace().

◆ serializeChar()

template<typename Derived >
void openmsx::InputArchiveBase< Derived >::serializeChar ( const char *  tag,
char &  c 
)
inline

◆ serializeOnlyOnce()

template<typename Derived >
template<typename T >
void openmsx::InputArchiveBase< Derived >::serializeOnlyOnce ( const char *  tag,
const T &  t 
)
inline

◆ serializePointerID()

template<typename Derived >
template<typename T >
void openmsx::InputArchiveBase< Derived >::serializePointerID ( const char *  tag,
const T &  t 
)
inline

◆ serializePolymorphic()

template<typename Derived >
template<typename T >
void openmsx::InputArchiveBase< Derived >::serializePolymorphic ( const char *  tag,
T &  t 
)
inline

◆ serializeWithID()

template<typename Derived >
template<typename T , typename... Args>
void openmsx::InputArchiveBase< Derived >::serializeWithID ( const char *  tag,
T &  t,
Args...  args 
)
inline

The documentation for this class was generated from the following files: