gloox  1.0.1
Public Member Functions | Protected Attributes | List of all members
CompressionBase Class Reference

#include <compressionbase.h>

Inheritance diagram for CompressionBase:
Inheritance graph
[legend]

Public Member Functions

 CompressionBase (CompressionDataHandler *cdh)
virtual ~CompressionBase ()
virtual bool init ()=0
virtual void compress (const std::string &data)=0
virtual void decompress (const std::string &data)=0
virtual void cleanup ()=0

Protected Attributes

CompressionDataHandlerm_handler
bool m_valid

Detailed Description

This is an abstract base class for stream compression implementations.

You should not need to use this class directly.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
0.9

Definition at line 34 of file compressionbase.h.

Constructor & Destructor Documentation

Contructor.

Parameters
cdhA CompressionDataHandler-derived object that will be notified about finished de/compression.

Definition at line 42 of file compressionbase.h.

virtual ~CompressionBase ( )
inlinevirtual

Virtual Destructor.

Definition at line 47 of file compressionbase.h.

Member Function Documentation

virtual void cleanup ( )
pure virtual

Performs internal cleanup.

Since
1.0

Implemented in CompressionDefault, and CompressionZlib.

virtual void compress ( const std::string &  data)
pure virtual

Compresses the given chunk of data.

Parameters
dataThe original (uncompressed) data.

Implemented in CompressionDefault, and CompressionZlib.

virtual void decompress ( const std::string &  data)
pure virtual

Decompresses the given chunk of data.

Parameters
dataThe compressed data.

Implemented in CompressionDefault, and CompressionZlib.

virtual bool init ( )
pure virtual

This function initializes the compression module. it is mandatory to be called.

Returns
True if the module was initialized successfully, false otherwise.

Implemented in CompressionDefault, and CompressionZlib.

Member Data Documentation

CompressionDataHandler* m_handler
protected

A handler for compressed/uncompressed data.

Definition at line 76 of file compressionbase.h.

bool m_valid
protected

Whether the compression module can be used.

Definition at line 79 of file compressionbase.h.


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