qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::compression::compress_factory Class Referenceabstract

Factory interface for creating compression providers. More...

#include <compression.h>

Public Member Functions

virtual const std::string & algorithm () const =0
 Get the name of the compression algorithm.
virtual std::unique_ptr< compress_providermake_compressor () const =0
 Create a new compressor instance.
virtual ~compress_factory ()=default
 Virtual destructor.

Detailed Description

Factory interface for creating compression providers.

This class defines the interface for factories that create compressor instances. It allows the creation of compressors to be abstracted from their implementation and configuration.

Member Function Documentation

◆ algorithm()

virtual const std::string & qb::compression::compress_factory::algorithm ( ) const
pure virtual

Get the name of the compression algorithm.

Returns
Reference to a string containing the algorithm name

◆ make_compressor()

virtual std::unique_ptr< compress_provider > qb::compression::compress_factory::make_compressor ( ) const
pure virtual

Create a new compressor instance.

Returns
Unique pointer to a newly created compressor