openMSX
Public Member Functions | List of all members
openmsx::MemInputArchive Class Referencefinal

#include <serialize.hh>

Inheritance diagram for openmsx::MemInputArchive:
Inheritance graph
[legend]
Collaboration diagram for openmsx::MemInputArchive:
Collaboration graph
[legend]

Public Member Functions

 MemInputArchive (const byte *data, size_t size, const std::vector< std::shared_ptr< DeltaBlock >> &deltaBlocks_)
 
bool needVersion () const
 
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)
 
string_ref loadStr ()
 
void serialize_blob (const char *, void *data, size_t len, bool diff=true)
 
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, void *data, size_t len, 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< MemInputArchive >
void serializeBase (T &t)
 Is this archive a loader or a saver. More...
 
void serializeInlinedBase (T &t, unsigned version)
 Serialize the base class of this classtype. More...
 
bool needVersion () const
 Does this archive store version information. More...
 
bool isReverseSnapshot () const
 Is this a reverse-snapshot? More...
 
bool translateEnumToString () const
 Does this archive store enums as strings. More...
 
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 canHaveOptionalAttributes () const
 Some archives (like XML archives) can store optional attributes. More...
 
bool hasAttribute (const char *)
 Check the presence of a (optional) attribute. More...
 
bool findAttribute (const char *, unsigned &)
 Optimization: combination of hasAttribute() and getAttribute(). More...
 
bool canCountChildren () const
 Some archives (like XML archives) can count the number of subtags that belong to the current tag. 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
bool isLoader () const
 
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)
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::InputArchiveBase< MemInputArchive >
 InputArchiveBase ()
 
- Protected Member Functions inherited from openmsx::ArchiveBase< MemInputArchive >
MemInputArchiveself ()
 Returns a reference to the most derived class. More...
 
- Protected Member Functions inherited from openmsx::InputArchiveBase2
 InputArchiveBase2 ()
 

Detailed Description

Definition at line 663 of file serialize.hh.

Constructor & Destructor Documentation

◆ MemInputArchive()

openmsx::MemInputArchive::MemInputArchive ( const byte data,
size_t  size,
const std::vector< std::shared_ptr< DeltaBlock >> &  deltaBlocks_ 
)
inline

Definition at line 666 of file serialize.hh.

Member Function Documentation

◆ load() [1/2]

template<typename T >
void openmsx::MemInputArchive::load ( T &  t)
inline

Definition at line 683 of file serialize.hh.

◆ load() [2/2]

void openmsx::MemInputArchive::load ( std::string &  s)

Definition at line 190 of file serialize.cc.

References gl::length(), and openmsx::XMLLoader::load().

◆ loadChar()

void openmsx::MemInputArchive::loadChar ( char &  c)
inline

Definition at line 687 of file serialize.hh.

References data(), and openmsx::XMLLoader::load().

◆ loadStr()

string_ref openmsx::MemInputArchive::loadStr ( )

Definition at line 200 of file serialize.cc.

References gl::length(), and openmsx::XMLLoader::load().

◆ needVersion()

bool openmsx::MemInputArchive::needVersion ( ) const
inline

Definition at line 673 of file serialize.hh.

◆ serialize_blob()

void openmsx::MemInputArchive::serialize_blob ( const char *  ,
void *  data,
size_t  len,
bool  diff = true 
)

Definition at line 236 of file serialize.cc.

References openmsx::XMLLoader::load().

◆ skipSection()

void openmsx::MemInputArchive::skipSection ( bool  skip)
inline

Definition at line 696 of file serialize.hh.

◆ versionAtLeast()

bool openmsx::MemInputArchive::versionAtLeast ( unsigned  ,
unsigned   
) const
inline

Definition at line 674 of file serialize.hh.

◆ versionBelow()

bool openmsx::MemInputArchive::versionBelow ( unsigned  ,
unsigned   
) const
inline

Definition at line 678 of file serialize.hh.


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