filecomp::Compressor Class Reference
File compressor interface.
More...
#include <filecomp.h>
Inheritance diagram for filecomp::Compressor:
List of all members.
|
Public Member Functions |
virtual | ~Compressor () |
| Destructor.
|
virtual bool | compress (char const *path, int level)=0 |
| Compresses a file.
|
virtual char const * | extension () const =0 |
| Returns the extension appended to compressed files.
|
Static Public Attributes |
static modules::PSIID const | IID = 0x425f77ee |
| Interface ID.
|
Detailed Description
This interface class can be used as a base class by modules providing a simple file compression feature.
You must override the compress() and extension() functions in derived classes.
Modules must provide objects of this interface class through the Module::factory() function.
Member Function Documentation
virtual bool filecomp::Compressor::compress |
( |
char const * |
path, |
|
|
int |
level |
|
) |
[pure virtual] |
|
|
Compresses a file.
- Parameters:
-
[in] | path | The absolute path to the file to compress. The file must not be modified or deleted. The compressed file will have the same name but with an appropriate extension for the compression scheme used. |
[in] | level | The compression level, from 1 (faster) to 9 (better ratio). Use the value 0 to use an implementation-defined default value. Implementers will make their best to adapt the compression level as appropriate for the used compression scheme. |
- Returns:
- true if successful, false otherwise. An error message should then be available through a call to the error() function in the latter case.
- See also:
- error()
|
virtual char const* filecomp::Compressor::extension |
( |
|
) |
const [pure virtual] |
|
|
Returns the extension for compressed files appended to the original file by the compress() function.
- Returns:
- The appended extension.
- See also:
- compress()
|
The documentation for this class was generated from the following file:
Generated on Sun May 20 21:32:20 2007 for Epona API by
1.4.6