ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::Archive Class Reference

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:

List of all members.

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.
virtual int listMatchingMembers (ArchiveMemberList &list, const String &pattern) const
 Add all members of the Archive matching the specified pattern to list.
virtual int listMembers (ArchiveMemberList &list) const =0
 Add all members of the Archive to list.
virtual const ArchiveMemberPtr getMember (const String &name) const =0
 Returns a ArchiveMember representation of the given file.
virtual SeekableReadStreamcreateReadStreamForMember (const String &name) const =0
 Create a stream bound to a member with the specified name in the archive.

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 common/archive.h.


Constructor & Destructor Documentation

virtual Common::Archive::~Archive (  )  [inline, virtual]

Definition at line 90 of file common/archive.h.


Member Function Documentation

virtual SeekableReadStream* Common::Archive::createReadStreamForMember ( const String name  )  const [pure virtual]

Create a stream bound to a member with the specified name in the archive.

If no member with this name exists, 0 is returned.

Returns:
the newly created input stream

Implemented in Common::SearchSet, Common::FSDirectory, Common::InstallShieldCabinet, Common::ArjArchive, Common::ZipArchive, Grim::Lab, Grim::StuffItArchive, Grim::LangFilter, Grim::MsCabinet, and Stark::Formats::XARCArchive.

virtual const ArchiveMemberPtr Common::Archive::getMember ( const String name  )  const [pure virtual]
virtual bool Common::Archive::hasFile ( const String name  )  const [pure virtual]

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.

Implemented in Common::SearchSet, Common::FSDirectory, Common::InstallShieldCabinet, Common::ArjArchive, Common::ZipArchive, Grim::Lab, Grim::StuffItArchive, Grim::LangFilter, Grim::MsCabinet, and Stark::Formats::XARCArchive.

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 Common::SearchSet, Common::FSDirectory, and Stark::Formats::XARCArchive.

Definition at line 43 of file common/archive.cpp.

virtual int Common::Archive::listMembers ( ArchiveMemberList list  )  const [pure virtual]

Add all members of the Archive to list.

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

Returns:
the number of names added to list

Implemented in Common::SearchSet, Common::FSDirectory, Common::InstallShieldCabinet, Common::ArjArchive, Common::ZipArchive, Grim::Lab, Grim::StuffItArchive, Grim::LangFilter, Grim::MsCabinet, and Stark::Formats::XARCArchive.


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


Generated on Sat Mar 23 2019 05:06:52 for ResidualVM by doxygen 1.7.1
curved edge   curved edge