ScummVM API documentation
Gob::SaveContainer Class Reference

#include <savefile.h>

Inheritance diagram for Gob::SaveContainer:
Gob::SaveReader Gob::SaveWriter

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
 

Detailed Description

A container for several save parts.

Constructor & Destructor Documentation

◆ SaveContainer()

Gob::SaveContainer::SaveContainer ( uint32  partCount,
uint32  slot 
)

The constructor.

Parameters
partCountThe number parts this container shall hold.
slotThe save slot this save's for.

Member Function Documentation

◆ hasAllParts()

bool Gob::SaveContainer::hasAllParts ( ) const

All parts filled?

◆ clear()

void Gob::SaveContainer::clear ( )

Empty all parts.

◆ writePart()

bool Gob::SaveContainer::writePart ( uint32  partN,
const SavePart part 
)

Write a SavePart into the container's part.

◆ readPart()

bool Gob::SaveContainer::readPart ( uint32  partN,
SavePart part 
) const

Read the container's part's content into a SavePart.

◆ readPartHeader()

bool Gob::SaveContainer::readPartHeader ( uint32  partN,
SaveHeader header 
) const

Read only the container's part's header.

◆ isSave()

static bool Gob::SaveContainer::isSave ( Common::SeekableReadStream stream)
static

Checks if the stream is a valid save container.

◆ getPartsInfo()

static Common::Array<PartInfo>* Gob::SaveContainer::getPartsInfo ( Common::SeekableReadStream stream)
staticprotected

Get an array containing basic information about all parts in the container in the stream.


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