gloox  1.0.28
Public Member Functions | Protected Attributes | List of all members
CompressionBase Class Referenceabstract

#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 Schröter js@ca.nosp@m.maya.nosp@m..net
Since
0.9

Definition at line 34 of file compressionbase.h.

Constructor & Destructor Documentation

◆ CompressionBase()

Contructor.

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

Definition at line 42 of file compressionbase.h.

◆ ~CompressionBase()

virtual ~CompressionBase ( )
inlinevirtual

Virtual Destructor.

Definition at line 47 of file compressionbase.h.

Member Function Documentation

◆ cleanup()

virtual void cleanup ( )
pure virtual

Performs internal cleanup.

Since
1.0

Implemented in CompressionZlib, and CompressionDefault.

◆ compress()

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

Compresses the given chunk of data.

Parameters
dataThe original (uncompressed) data.

Implemented in CompressionZlib, and CompressionDefault.

◆ decompress()

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

Decompresses the given chunk of data.

Parameters
dataThe compressed data.

Implemented in CompressionZlib, and CompressionDefault.

◆ init()

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 CompressionZlib, and CompressionDefault.

Member Data Documentation

◆ m_handler

CompressionDataHandler* m_handler
protected

A handler for compressed/uncompressed data.

Definition at line 76 of file compressionbase.h.

◆ m_valid

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: