ScummVM API documentation
Xeen::BaseCCArchive Class Reference

#include <files.h>

Inheritance diagram for Xeen::BaseCCArchive:
Common::Archive Xeen::CCArchive Xeen::SaveArchive

Public Member Functions

bool hasFile (const Common::Path &path) const override
 
int listMembers (Common::ArchiveMemberList &list) const override
 
const Common::ArchiveMemberPtr getMember (const Common::Path &path) const override
 
- Public Member Functions inherited from Common::Archive
virtual int listMatchingMembers (ArchiveMemberList &list, const Path &pattern) const
 
virtual SeekableReadStreamcreateReadStreamForMember (const Path &path) const =0
 

Static Public Member Functions

static uint16 convertNameToId (const Common::String &resourceName)
 

Protected Member Functions

void loadIndex (Common::SeekableReadStream &stream)
 
void saveIndex (Common::WriteStream &stream)
 
virtual bool getHeaderEntry (const Common::String &resourceName, CCEntry &ccEntry) const
 
virtual bool getHeaderEntry (uint16 id, CCEntry &ccEntry) const
 

Protected Attributes

Common::Array< CCEntry_index
 

Detailed Description

Base Xeen CC file implementation

Member Function Documentation

◆ loadIndex()

void Xeen::BaseCCArchive::loadIndex ( Common::SeekableReadStream stream)
protected

Load the index of a given CC file

◆ saveIndex()

void Xeen::BaseCCArchive::saveIndex ( Common::WriteStream stream)
protected

Saves out the contents of the index. Used when creating savegames

◆ getHeaderEntry() [1/2]

virtual bool Xeen::BaseCCArchive::getHeaderEntry ( const Common::String resourceName,
CCEntry ccEntry 
) const
protectedvirtual

Given a resource name, returns whether an entry exists, and returns the header index data for that entry

Reimplemented in Xeen::CCArchive.

◆ getHeaderEntry() [2/2]

virtual bool Xeen::BaseCCArchive::getHeaderEntry ( uint16  id,
CCEntry ccEntry 
) const
protectedvirtual

Given a resource Id, returns whether an entry exists, and returns the header index data for that entry

◆ convertNameToId()

static uint16 Xeen::BaseCCArchive::convertNameToId ( const Common::String resourceName)
static

Hash a given filename to produce the Id that represents it

◆ hasFile()

bool Xeen::BaseCCArchive::hasFile ( const Common::Path path) const
overridevirtual

Check if a member with the given name is present in the Archive. Patterns are not allowed, as this is meant to be a quick File::exists() replacement.

Implements Common::Archive.

◆ listMembers()

int Xeen::BaseCCArchive::listMembers ( Common::ArchiveMemberList list) const
overridevirtual

Add all members of the Archive to the list. Must only append to list, and not remove elements from it.

Returns
The number of names added to list.

Implements Common::Archive.

◆ getMember()

const Common::ArchiveMemberPtr Xeen::BaseCCArchive::getMember ( const Common::Path path) const
overridevirtual

Return an ArchiveMember representation of the given file.

Implements Common::Archive.


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