ScummVM API documentation
MM::Shared::Xeen::BaseCCArchive Class Reference

#include <cc_archive.h>

Inheritance diagram for MM::Shared::Xeen::BaseCCArchive:
Common::Archive MM::Shared::Xeen::CCArchive MM::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 bool isPathDirectory (const Path &path) const
 
virtual int listMatchingMembers (ArchiveMemberList &list, const Path &pattern, bool matchPathComponents=false) const
 
virtual SeekableReadStreamcreateReadStreamForMember (const Path &path) const =0
 
virtual SeekableReadStreamcreateReadStreamForMemberAltStream (const Path &path, AltStreamType altStreamType) const
 
virtual SeekableReadStreamcreateReadStreamForMemberNext (const Path &path, const Archive *starting) const
 
Common::Error dumpArchive (const Path &destPath)
 
virtual char getPathSeparator () const
 

Static Public Member Functions

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

Protected Member Functions

void loadIndex (Common::SeekableReadStream &stream)
 
void saveIndex (Common::WriteStream &stream)
 
virtual bool getHeaderEntry (const Common::Path &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 MM::Shared::Xeen::BaseCCArchive::loadIndex ( Common::SeekableReadStream stream)
protected

Load the index of a given CC file

◆ saveIndex()

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

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

◆ getHeaderEntry() [1/2]

virtual bool MM::Shared::Xeen::BaseCCArchive::getHeaderEntry ( const Common::Path 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 MM::Shared::Xeen::CCArchive.

◆ getHeaderEntry() [2/2]

virtual bool MM::Shared::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 MM::Shared::Xeen::BaseCCArchive::convertNameToId ( const Common::Path resourceName)
static

Hash a given filename to produce the Id that represents it

◆ hasFile()

bool MM::Shared::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. This returns "true" for both files and directories.

Implements Common::Archive.

◆ listMembers()

int MM::Shared::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 MM::Shared::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: