Patch handler interface. More...
#include <kanzi/kza2kzb/patch_handler.hpp>
Public Member Functions | |
| IPatchHandler ()=default | |
| Default constructor. | |
| IPatchHandler (const IPatchHandler &)=delete | |
| Deleted copy constructor. | |
| IPatchHandler (IPatchHandler &&)=delete | |
| Deleted move constructor. | |
| IPatchHandler & | operator= (const IPatchHandler &)=delete |
| Deleted copy operator. | |
| IPatchHandler & | operator= (IPatchHandler &&)=delete |
| Deleted move operator. | |
| virtual | ~IPatchHandler ()=default |
| Virtual destructor. | |
Static Public Member Functions | |
| static void | handlePatch (span< const byte > data) |
| Applies an incoming patch. | |
| static void | handlePatch (vector< byte > &&data) |
| Applies an incoming patch. | |
Protected Member Functions | |
| virtual void | handlePatchOverride (span< const byte > data)=0 |
| Virtual patch handling function for copying the data. | |
| virtual void | handlePatchOverride (vector< byte > &&data)=0 |
| Virtual patch handling function for moving the data. | |
Static Protected Member Functions | |
| static void | setPatchHandler (IPatchHandler *patchHandler) |
| Sets the patch handler. | |
Static Protected Attributes | |
| static IPatchHandler * | s_patchHandler |
| Static singleton (non-owning). | |
Patch handler interface.
The static patch handler singleton is intentionally unsafe. Only declare one patch handler per application.
|
explicitdefault |
Default constructor.
|
virtualdefault |
Virtual destructor.
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
delete |
Deleted copy operator.
|
delete |
Deleted move operator.
Applies an incoming patch.
Copies the data.
| header | Header. |
| data | Patch data. |
Applies an incoming patch.
Moves the data.
| header | Header. |
| data | Patch data. |
|
protectedpure virtual |
Virtual patch handling function for copying the data.
| data | Patch data. |
Implemented in kanzi::PatchHandler.
|
protectedpure virtual |
Virtual patch handling function for moving the data.
| data | Patch data. |
Implemented in kanzi::PatchHandler.
|
staticprotected |
Sets the patch handler.
Since the singleton is non-owning, the patch handler must be a raw pointer.
| patchHandler | New patch handler. |
|
staticprotected |
Static singleton (non-owning).