MADARA  3.1.8
madara::filters::BufferFilter Class Referenceabstract

Abstract base class for implementing buffer filters via a functor interface. More...

#include <BufferFilter.h>

Public Member Functions

virtual ~BufferFilter ()
 Destructor. More...
 
virtual int decode (unsigned char *source, int size, int max_size) const =0
 Decodes the buffer in place. More...
 
virtual int encode (unsigned char *source, int size, int max_size) const =0
 Encodes the buffer in place. More...
 

Detailed Description

Abstract base class for implementing buffer filters via a functor interface.

When subclassing this class, create a new instance with the new operator, and the pointer will be managed by the underlying MADARA infrastructure.

Definition at line 26 of file BufferFilter.h.

Constructor & Destructor Documentation

virtual madara::filters::BufferFilter::~BufferFilter ( )
inlinevirtual

Destructor.

Definition at line 32 of file BufferFilter.h.

Member Function Documentation

virtual int madara::filters::BufferFilter::decode ( unsigned char *  source,
int  size,
int  max_size 
) const
pure virtual

Decodes the buffer in place.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after decoding
virtual int madara::filters::BufferFilter::encode ( unsigned char *  source,
int  size,
int  max_size 
) const
pure virtual

Encodes the buffer in place.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after encoding

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