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

#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 ()
 
- 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 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 574 of file serialize.hh.

Constructor & Destructor Documentation

openmsx::MemOutputArchive::MemOutputArchive ( )
inline

Definition at line 577 of file serialize.hh.

openmsx::MemOutputArchive::~MemOutputArchive ( )
inline

Definition at line 581 of file serialize.hh.

Member Function Documentation

void openmsx::MemOutputArchive::beginSection ( )
inline

Definition at line 599 of file serialize.hh.

References openmsx::OutputBuffer::getPosition(), and save().

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

Definition at line 586 of file serialize.hh.

MemBuffer< byte > openmsx::MemOutputArchive::releaseBuffer ( )

Definition at line 177 of file serialize.cc.

References data(), openmsx::OutputBuffer::release(), and size().

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

Definition at line 588 of file serialize.hh.

Referenced by beginSection(), and saveChar().

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

Definition at line 169 of file serialize.cc.

References openmsx::OutputBuffer::allocate(), and size().

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

Definition at line 592 of file serialize.hh.

References save().

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

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