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

#include <serialize.hh>

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

Public Member Functions

 MemOutputArchive ()
 
 ~MemOutputArchive ()
 
bool needVersion () const
 
template<typename T >
void save (const T &t)
 
void saveChar (char c)
 
void save (const std::string &s)
 
void serialize_blob (const char *, const void *data, size_t len)
 
void beginSection ()
 
void endSection ()
 
MemBuffer< bytereleaseBuffer (size_t &size)
 
- Public Member Functions inherited from openmsx::OutputArchiveBase< MemOutputArchive >
void serializeInlinedBase (T &t, unsigned version)
 
void serializeWithID (const char *tag, const T &t, Args...)
 
void serialize_blob (const char *tag, const void *data, size_t len)
 
void serialize (const char *tag, const T &t)
 
void serializePointerID (const char *tag, const T &t)
 
void serializePolymorphic (const char *tag, const T &t)
 
void serializeOnlyOnce (const char *tag, const T &t)
 
void serializeChar (const char *tag, char c)
 
- Public Member Functions inherited from openmsx::ArchiveBase< MemOutputArchive >
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 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::OutputArchiveBase2
bool isLoader () const
 
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)
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::OutputArchiveBase< MemOutputArchive >
 OutputArchiveBase ()
 
- Protected Member Functions inherited from openmsx::ArchiveBase< MemOutputArchive >
MemOutputArchiveself ()
 Returns a reference to the most derived class. More...
 
- Protected Member Functions inherited from openmsx::OutputArchiveBase2
 OutputArchiveBase2 ()
 

Detailed Description

Definition at line 587 of file serialize.hh.

Constructor & Destructor Documentation

openmsx::MemOutputArchive::MemOutputArchive ( )
inline

Definition at line 590 of file serialize.hh.

openmsx::MemOutputArchive::~MemOutputArchive ( )
inline

Definition at line 594 of file serialize.hh.

Member Function Documentation

void openmsx::MemOutputArchive::beginSection ( )
inline

Definition at line 612 of file serialize.hh.

References openmsx::PNG::save().

void openmsx::MemOutputArchive::endSection ( )
inline

Definition at line 619 of file serialize.hh.

References size().

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

Definition at line 599 of file serialize.hh.

MemBuffer< byte > openmsx::MemOutputArchive::releaseBuffer ( size_t &  size)

Definition at line 183 of file serialize.cc.

Referenced by openmsx::ReverseManager::~ReverseManager().

template<typename T >
void openmsx::MemOutputArchive::save ( const T &  t)
inline

Definition at line 601 of file serialize.hh.

void openmsx::MemOutputArchive::save ( const std::string &  s)

Definition at line 175 of file serialize.cc.

References size().

void openmsx::MemOutputArchive::saveChar ( char  c)
inline

Definition at line 605 of file serialize.hh.

References data(), and openmsx::PNG::save().

void openmsx::MemOutputArchive::serialize_blob ( const char *  ,
const void *  data,
size_t  len 
)

Definition at line 217 of file serialize.cc.

References snappy::compress(), and snappy::maxCompressedLength().


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