ScummVM
Common::Archive Class Referenceabstract

Archive allows managing of member of arbitrary containers in a uniform fashion, allowing lookup by (file)names. More...

#include <archive.h>

+ Inheritance diagram for Common::Archive:

Public Member Functions

virtual ~Archive ()
 
virtual bool hasFile (const String &name) const =0
 Check if a member with the given name is present in the Archive. More...
 
virtual int listMatchingMembers (ArchiveMemberList &list, const String &pattern) const
 Add all members of the Archive matching the specified pattern to list. More...
 
virtual int listMembers (ArchiveMemberList &list) const =0
 Add all members of the Archive to list. More...
 
virtual const ArchiveMemberPtr getMember (const String &name) const =0
 Returns a ArchiveMember representation of the given file. More...
 
virtual SeekableReadStreamcreateReadStreamForMember (const String &name) const =0
 Create a stream bound to a member with the specified name in the archive. More...
 

Detailed Description

Archive allows managing of member of arbitrary containers in a uniform fashion, allowing lookup by (file)names.

It also supports opening a file and returning an usable input stream.

Definition at line 88 of file archive.h.

Constructor & Destructor Documentation

◆ ~Archive()

virtual Common::Archive::~Archive ( )
inlinevirtual

Definition at line 90 of file archive.h.

Member Function Documentation

◆ createReadStreamForMember()

◆ getMember()

◆ hasFile()

◆ listMatchingMembers()

int Common::Archive::listMatchingMembers ( ArchiveMemberList list,
const String pattern 
) const
virtual

Add all members of the Archive matching the specified pattern to list.

Must only append to list, and not remove elements from it.

Returns
the number of members added to list

Reimplemented in Ultima::Shared::UltimaDataArchive, Common::FSDirectory, and Common::SearchSet.

Definition at line 43 of file archive.cpp.

◆ listMembers()


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