ScummVM API documentation
Gob::SaveHeader Class Reference

#include <savefile.h>

Public Member Functions

 SaveHeader (uint32 type=0, uint32 version=0, uint32 size=0)
 
bool operator== (const SaveHeader &header) const
 
bool operator!= (const SaveHeader &header) const
 
bool read (Common::ReadStream &stream)
 
bool verify (Common::ReadStream &stream) const
 
bool verifyReadSize (Common::ReadStream &stream)
 
bool write (Common::WriteStream &stream) const
 
uint32 getType () const
 
uint32 getVersion () const
 
uint32 getSize () const
 
void setType (uint32 type)
 
void setVersion (uint32 version)
 
void setSize (uint32 size)
 

Static Public Attributes

static const int kSize = 20
 
static const uint32 kID1 = MKTAG(0,'S','C','V')
 
static const uint32 kID2 = MKTAG('M','G','O','B')
 

Detailed Description

A class wrapping a save part header.

A save part header consists of 4 fields: ID : The 8 character ID \0SCVMGOB Type : The 4 character ID for this part's type Version : This part's version. Each type has its own version counter Size : The size of the contents, i.e. excluding this header

Member Function Documentation

◆ read()

bool Gob::SaveHeader::read ( Common::ReadStream stream)

Read the header out of a stream into this class.

◆ verify()

bool Gob::SaveHeader::verify ( Common::ReadStream stream) const

Read the header out of a stream and checks it against this class's contents.

◆ verifyReadSize()

bool Gob::SaveHeader::verifyReadSize ( Common::ReadStream stream)

Read the header out of a stream and checks it against this class's contents, but read the size field instead.

◆ write()

bool Gob::SaveHeader::write ( Common::WriteStream stream) const

Write this class's contents into a stream.

Member Data Documentation

◆ kSize

const int Gob::SaveHeader::kSize = 20
static

The size of the header.


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