NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Attributes | List of all members
IArchive Class Referenceabstract

Search Toolkit Book for IArchive

IArchive – abstract interface class for archive formats. More...

#include <util/compress/archive_.hpp>

+ Inheritance diagram for IArchive:

Public Types

enum  EDirection { eRead , eWrite }
 Processing direction. More...
 
enum  ELocation { eFile , eFileStream , eMemory }
 Archive location. More...
 
typedef CCompression::ELevel ELevel
 
typedef size_t(* Callback_Write) (const CArchiveEntryInfo &info, const void *buf, size_t n)
 Type of user-defined callback for extraction from archive. More...
 

Public Member Functions

virtual ~IArchive (void)
 
virtual void CreateFile (const string &filename)=0
 Create new archive file. More...
 
virtual void CreateFileStream (FILE *filestream)=0
 Create new archive file on top of a FILE stream. More...
 
virtual void CreateMemory (size_t initial_allocation_size=0)=0
 Create new archive located in memory. More...
 
virtual void OpenFile (const string &filename)=0
 Open archive file for reading. More...
 
virtual void OpenFileStream (FILE *filestream, Uint8 archive_size=0)=0
 Open archive from a FILE stream, beginning at the current file position. More...
 
virtual void OpenMemory (const void *buf, size_t size)=0
 Open archive located in memory for reading. More...
 
virtual void Close (void)=0
 Close the archive. More...
 
virtual void FinalizeMemory (void **buf, size_t *size)=0
 Finalize the archive created in memory. More...
 
virtual size_t GetNumEntries (void)=0
 Returns the total number of entries in the archive. More...
 
virtual void GetEntryInfo (size_t index, CArchiveEntryInfo *info)=0
 Get detailed information about an archive entry by index. More...
 
virtual bool HaveSupport_Type (CDirEntry::EType type)=0
 Check that current archive format have support for specific feature. More...
 
virtual bool HaveSupport_AbsolutePath (void)=0
 
virtual bool HaveSupport_FileStream (void)=0
 
virtual void ExtractEntryToFileSystem (const CArchiveEntryInfo &info, const string &dst_path)=0
 Extracts an archive entry to file system. More...
 
virtual void ExtractEntryToMemory (const CArchiveEntryInfo &info, void *buf, size_t size)=0
 Extracts an archive file to a memory buffer. More...
 
virtual void ExtractEntryToCallback (const CArchiveEntryInfo &info, Callback_Write callback)=0
 Extracts an archive file using user-defined callback to process extracted data. More...
 
virtual void TestEntry (const CArchiveEntryInfo &info)=0
 Verify entry integrity. More...
 
virtual void SkipEntry (const CArchiveEntryInfo &info)=0
 Don't need to be implemented for ZIP format. More...
 
virtual void AddEntryFromFileSystem (const CArchiveEntryInfo &info, const string &src_path, ELevel level)=0
 Add single entry to newly created archive from file system. More...
 
virtual void AddEntryFromMemory (const CArchiveEntryInfo &info, void *buf, size_t size, ELevel level)=0
 Add entry to newly created archive from memory buffer. More...
 

Protected Attributes

EDirection m_Mode
 Processing direction (read/write) More...
 
ELocation m_Location
 Archive location (file/memory) More...
 

Detailed Description

IArchive – abstract interface class for archive formats.

Definition at line 185 of file archive_.hpp.


The documentation for this class was generated from the following file:
Modified on Fri Mar 01 10:04:48 2024 by modify_doxy.py rev. 669887