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

#include <serialize.hh>

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

Public Member Functions

template<typename Base , typename T >
void serializeInlinedBase (T &t, unsigned version)
 
template<typename T , typename... Args>
void serializeWithID (const char *tag, const T &t, Args...)
 
void serialize_blob (const char *tag, std::span< const uint8_t > data, bool diff=true)
 
template<typename T >
void serialize (const char *tag, const T &t)
 
template<typename T >
void serializePointerID (const char *tag, const T &t)
 
template<typename T >
void serializePolymorphic (const char *tag, const T &t)
 
template<typename T >
void serializeOnlyOnce (const char *tag, const T &t)
 
void serializeChar (const char *tag, char c)
 
- 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.
 
template<typename Base , typename T >
void serializeInlinedBase (T &t, unsigned version)
 Serialize the base class of this classtype.
 
template<typename T >
void serialize_blob (const char *tag, std::span< T > data, bool diff=true)
 
template<typename T >
void serialize_blob (const char *tag, std::span< const T > data, bool diff=true)
 
bool isReverseSnapshot () const
 Is this a reverse-snapshot?
 
template<typename T >
void attribute (const char *name, T &t)
 Load/store an attribute from/in the archive.
 
void attribute (const char *name, const char *value)
 
bool hasAttribute (const char *)
 Check the presence of a (optional) attribute.
 
template<typename T >
std::optional< T > findAttributeAs (const char *)
 Optimization: combination of hasAttribute() and getAttribute().
 
int countChildren () const
 Count the number of child tags.
 
void beginTag (const char *)
 Indicate begin of a tag.
 
void endTag (const char *)
 Indicate begin of a tag.
 
- Public Member Functions inherited from openmsx::OutputArchiveBase2
bool versionAtLeast (unsigned, unsigned) const
 
bool versionBelow (unsigned, unsigned) const
 
void skipSection (bool)
 
template<typename T >
unsigned generateId (const T *p)
 
template<typename T >
unsigned getId (const T *p)
 

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

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

Definition at line 449 of file serialize.hh.

Constructor & Destructor Documentation

◆ OutputArchiveBase()

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

Member Function Documentation

◆ serialize()

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

Definition at line 481 of file serialize.hh.

References openmsx::ArchiveBase< Derived >::self().

◆ serialize_blob()

template<typename Derived >
void openmsx::OutputArchiveBase< Derived >::serialize_blob ( const char *  tag,
std::span< const uint8_t >  data,
bool  diff = true 
)

Definition at line 78 of file serialize.cc.

References openmsx::MemBuffer< T, ALIGNMENT >::data().

◆ serializeChar()

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

Definition at line 509 of file serialize.hh.

References openmsx::ArchiveBase< Derived >::self().

◆ serializeInlinedBase()

template<typename Derived >
template<typename Base , typename T >
void openmsx::OutputArchiveBase< Derived >::serializeInlinedBase ( T &  t,
unsigned  version 
)
inline

Definition at line 453 of file serialize.hh.

References t.

◆ serializeOnlyOnce()

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

◆ serializePointerID()

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

Definition at line 488 of file serialize.hh.

References openmsx::ArchiveBase< Derived >::self().

◆ serializePolymorphic()

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

◆ serializeWithID()

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

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