#include <savefile.h>
Classes | |
struct | Part |
struct | PartInfo |
Public Member Functions | |
SaveContainer (uint32 partCount, uint32 slot) | |
uint32 | getSlot () const |
uint32 | getSize () const |
bool | hasAllParts () const |
void | clear () |
bool | writePart (uint32 partN, const SavePart *part) |
bool | readPart (uint32 partN, SavePart *part) const |
bool | readPartHeader (uint32 partN, SaveHeader *header) const |
Static Public Member Functions | |
static bool | isSave (Common::SeekableReadStream &stream) |
Static Public Attributes | |
static const uint32 | kVersion = 1 |
static const uint32 | kID = MKTAG('C','O','N','T') |
Protected Types | |
typedef Common::Array< Part * >::iterator | PartIterator |
typedef Common::Array< Part * >::const_iterator | PartConstIterator |
Protected Member Functions | |
uint32 | calcSize () const |
bool | read (Common::ReadStream &stream) |
bool | write (Common::WriteStream &stream) const |
Static Protected Member Functions | |
static Common::Array< PartInfo > * | getPartsInfo (Common::SeekableReadStream &stream) |
Protected Attributes | |
uint32 | _partCount |
uint32 | _slot |
SaveHeader | _header |
Common::Array< Part * > | _parts |
A container for several save parts.
Gob::SaveContainer::SaveContainer | ( | uint32 | partCount, |
uint32 | slot | ||
) |
The constructor.
partCount | The number parts this container shall hold. |
slot | The save slot this save's for. |
bool Gob::SaveContainer::hasAllParts | ( | ) | const |
All parts filled?
void Gob::SaveContainer::clear | ( | ) |
Empty all parts.
bool Gob::SaveContainer::writePart | ( | uint32 | partN, |
const SavePart * | part | ||
) |
Write a SavePart into the container's part.
bool Gob::SaveContainer::readPart | ( | uint32 | partN, |
SavePart * | part | ||
) | const |
Read the container's part's content into a SavePart.
bool Gob::SaveContainer::readPartHeader | ( | uint32 | partN, |
SaveHeader * | header | ||
) | const |
Read only the container's part's header.
|
static |
Checks if the stream is a valid save container.
|
staticprotected |
Get an array containing basic information about all parts in the container in the stream.