openMSX
|
#include <serialize.hh>
Public Member Functions | |
MemInputArchive (std::span< const uint8_t > buf_, std::span< const std::shared_ptr< DeltaBlock > > deltaBlocks_) | |
bool | versionAtLeast (unsigned, unsigned) const |
bool | versionBelow (unsigned, unsigned) const |
template<typename T > | |
void | load (T &t) |
void | loadChar (char &c) |
void | load (std::string &s) |
std::string_view | loadStr () |
void | serialize_blob (const char *tag, std::span< uint8_t > data, bool diff=true) |
template<typename T , typename ... Args> | |
ALWAYS_INLINE void | serialize (const char *tag, T &t, Args &&...args) |
template<typename T , size_t N> requires (SerializeAsMemcpy<T>::value) | |
ALWAYS_INLINE void | serialize (const char *, std::array< T, N > &t) |
void | skipSection (bool skip) |
Public Member Functions inherited from openmsx::InputArchiveBase< MemInputArchive > | |
void | serializeWithID (const char *tag, T &t, Args... args) |
void | serialize_blob (const char *tag, std::span< uint8_t > data, bool diff=true) |
void | serialize (const char *tag, T &t) |
void | serializePointerID (const char *tag, const T &t) |
void | serializePolymorphic (const char *tag, T &t) |
void | serializeOnlyOnce (const char *tag, const T &t) |
void | serializeChar (const char *tag, char &c) |
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. | |
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 *) const |
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 *) const |
Indicate begin of a tag. | |
void | endTag (const char *) const |
Indicate begin of a tag. | |
Public Member Functions inherited from openmsx::InputArchiveBase2 | |
void | beginSection () const |
void | endSection () const |
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) |
Static Public Attributes | |
static constexpr bool | NEED_VERSION = false |
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::InputArchiveBase2 | |
static constexpr bool | IS_LOADER = true |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::InputArchiveBase< MemInputArchive > | |
InputArchiveBase ()=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::InputArchiveBase2 | |
InputArchiveBase2 ()=default | |
Definition at line 762 of file serialize.hh.
|
inline |
Definition at line 765 of file serialize.hh.
void openmsx::MemInputArchive::load | ( | std::string & | s | ) |
Definition at line 186 of file serialize.cc.
References load(), and openmsx::InputBuffer::read().
|
inline |
Definition at line 782 of file serialize.hh.
References openmsx::InputBuffer::read(), and t.
Referenced by load(), loadChar(), loadStr(), serialize_blob(), and skipSection().
|
inline |
Definition at line 786 of file serialize.hh.
References load().
string_view openmsx::MemInputArchive::loadStr | ( | ) |
Definition at line 196 of file serialize.cc.
References openmsx::InputBuffer::getCurrentPos(), load(), and openmsx::InputBuffer::skip().
|
inline |
Definition at line 804 of file serialize.hh.
References openmsx::InputBuffer::read(), and t.
|
inline |
Definition at line 797 of file serialize.hh.
References t.
void openmsx::MemInputArchive::serialize_blob | ( | const char * | tag, |
std::span< uint8_t > | data, | ||
bool | diff = true |
||
) |
Definition at line 229 of file serialize.cc.
References ranges::copy(), openmsx::InputBuffer::getCurrentPos(), load(), and openmsx::InputBuffer::skip().
|
inline |
Definition at line 810 of file serialize.hh.
References load(), and openmsx::InputBuffer::skip().
|
inline |
Definition at line 773 of file serialize.hh.
|
inline |
Definition at line 777 of file serialize.hh.
|
staticconstexpr |
Definition at line 772 of file serialize.hh.