ZipArchive Class Reference

#include <ZipArchive.h>

Inheritance diagram for ZipArchive:
Inheritance graph
[legend]
Collaboration diagram for ZipArchive:
Collaboration graph
[legend]

Public Member Functions

 ZipArchive (const std::string &name)
virtual ~ZipArchive ()
bool failed ()
virtual ArchiveFileopenFile (const std::string &name)
 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)
 Returns a new object associated with the file identified by name, or 0 if the file cannot be opened. Name comparisons are case-insensitive.
bool containsFile (const std::string &name)
void forEachFile (VisitorFunc visitor, const std::string &root)
 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.

Private Member Functions

bool read_record ()
bool read_pkzip ()

Private Attributes

ZipFileSystem m_filesystem
std::string m_name
FileInputStream m_istream

Detailed Description

Definition at line 30 of file ZipArchive.h.


Constructor & Destructor Documentation

ZipArchive::ZipArchive ( const std::string name  ) 
virtual ZipArchive::~ZipArchive (  )  [virtual]

Member Function Documentation

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

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

Implements Archive.

bool ZipArchive::failed (  ) 
void ZipArchive::forEachFile ( VisitorFunc  visitor,
const std::string root 
) [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.

Implements Archive.

virtual ArchiveFile* ZipArchive::openFile ( const std::string name  )  [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.

Implements Archive.

virtual ArchiveTextFile* ZipArchive::openTextFile ( const std::string name  )  [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.

Implements Archive.

bool ZipArchive::read_pkzip (  )  [private]
bool ZipArchive::read_record (  )  [private]

Field Documentation

Definition at line 32 of file ZipArchive.h.

FileInputStream ZipArchive::m_istream [private]

Definition at line 34 of file ZipArchive.h.

Definition at line 33 of file ZipArchive.h.


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

Generated by  doxygen 1.6.2