Archive Class Reference

#include <iarchive.h>

Inheritance diagram for Archive:
Inheritance graph
[legend]

Data Structures

class  Visitor

Public Types

enum  EMode { eFiles = 0x01, eDirectories = 0x02, eFilesAndDirectories = 0x03 }
typedef CustomArchiveVisitor VisitorFunc

Public Member Functions

*virtual ~Archive ()
 Destroys the archive object. Any unreleased file object associated with the archive remains valid.
virtual ArchiveFileopenFile (const std::string &name)=0
 Returns a new object associated with the file identified by name, or 0 if the file cannot be opened. Name comparisons are case-insensitive.
virtual ArchiveTextFileopenTextFile (const std::string &name)=0
 Returns a new object associated with the file identified by name, or 0 if the file cannot be opened. Name comparisons are case-insensitive.
virtual bool containsFile (const std::string &name)=0
virtual void forEachFile (VisitorFunc visitor, const std::string &root)=0
 Performs a depth-first traversal of the archive tree starting at root. Traverses the entire tree if root is "". When a file is encountered, calls visitor.file passing the file name. When a directory is encountered, calls visitor.directory passing the directory name. Skips the directory if visitor.directory returned true. Root comparisons are case-insensitive. Names are mixed-case.

Detailed Description

Definition at line 91 of file iarchive.h.


Member Typedef Documentation

Definition at line 104 of file iarchive.h.


Member Enumeration Documentation

Enumerator:
eFiles 
eDirectories 
eFilesAndDirectories 

Definition at line 106 of file iarchive.h.


Constructor & Destructor Documentation

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

Destroys the archive object. Any unreleased file object associated with the archive remains valid.

Definition at line 113 of file iarchive.h.


Member Function Documentation

virtual bool Archive::containsFile ( const std::string name  )  [pure virtual]

Returns true if the file identified by name can be opened. Name comparisons are case-insensitive.

Implemented in ZipArchive.

virtual void Archive::forEachFile ( VisitorFunc  visitor,
const std::string root 
) [pure virtual]

Performs a depth-first traversal of the archive tree starting at root. Traverses the entire tree if root is "". When a file is encountered, calls visitor.file passing the file name. When a directory is encountered, calls visitor.directory passing the directory name. Skips the directory if visitor.directory returned true. Root comparisons are case-insensitive. Names are mixed-case.

Implemented in ZipArchive.

virtual ArchiveFile* Archive::openFile ( const std::string name  )  [pure virtual]

Returns a new object associated with the file identified by name, or 0 if the file cannot be opened. Name comparisons are case-insensitive.

Implemented in ZipArchive.

virtual ArchiveTextFile* Archive::openTextFile ( const std::string name  )  [pure virtual]

Returns a new object associated with the file identified by name, or 0 if the file cannot be opened. Name comparisons are case-insensitive.

Implemented in ZipArchive.


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

Generated by  doxygen 1.6.2