MADARA
3.4.1
|
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 (char *source, int size, int max_size) const =0 |
Decodes the buffer in place. More... | |
virtual int | encode (char *source, int size, int max_size) const =0 |
Encodes the buffer in place. More... | |
virtual std::string | get_id (void)=0 |
Gets the id of the filter. More... | |
virtual uint32_t | get_version (void)=0 |
Gets the version of the filter. More... | |
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.
|
inlinevirtual |
Destructor.
Definition at line 32 of file BufferFilter.h.
|
pure virtual |
Decodes the buffer in place.
source | the source and destination buffer |
size | the amount of data in the buffer in bytes |
max_size | the amount of bytes the buffer can hold |
Implemented in madara::filters::AESBufferFilter, madara::filters::LZ4BufferFilter, and madara::filters::JavaBufferFilter.
|
pure virtual |
Encodes the buffer in place.
source | the source and destination buffer |
size | the amount of data in the buffer in bytes |
max_size | the amount of bytes the buffer can hold |
Implemented in madara::filters::AESBufferFilter, madara::filters::LZ4BufferFilter, and madara::filters::JavaBufferFilter.
|
pure virtual |
Gets the id of the filter.
This is used in the serialization process for transports and checkpoints to identify which filter is used.
Implemented in madara::filters::AESBufferFilter, madara::filters::LZ4BufferFilter, and madara::filters::JavaBufferFilter.
|
pure virtual |
Gets the version of the filter.
Implemented in madara::filters::AESBufferFilter, madara::filters::LZ4BufferFilter, and madara::filters::JavaBufferFilter.