Default patch handler. More...
#include <kanzi/kza2kzb/patch_handler.hpp>
Classes | |
| struct | KzbPatch |
| Applied via patchProject(). More... | |
| struct | ProcessedState |
| Thread state for processed patches. More... | |
| struct | PropertyPatch |
| Applied via applyPropertyPatch(). More... | |
| struct | ThreadState |
| Thread state for handling incoming patches. More... | |
Public Types | |
| using | IncomingPatch |
| Incoming patch — raw KZA/property-patch bytes. | |
| using | ProcessedPatch |
| Processed patch ready to apply on the main loop. | |
Public Member Functions | |
| ~PatchHandler () override | |
| Destructor. | |
Public Member Functions inherited from kanzi::IPatchHandler | |
| 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 IPatchHandlerPtr | create (Application &application) |
| Creates a new patch handler of this type and assigns to the singleton. | |
Static Public Member Functions inherited from kanzi::IPatchHandler | |
| static void | handlePatch (span< const byte > data) |
| Applies an incoming patch. | |
| static void | handlePatch (vector< byte > &&data) |
| Applies an incoming patch. | |
Protected Member Functions | |
| void | handlePatchInternal (vector< byte > data) |
| Internal patch handling. | |
| void | handlePatchOverride (span< const byte > data) override |
| IPatchHandler::handlePatchOverride() implementation. | |
| void | handlePatchOverride (vector< byte > &&data) override |
| IPatchHandler::handlePatchOverride() implementation. | |
| void | mainLoopTask (chrono::nanoseconds diffTime) |
| Patch task for main loop scheduler. | |
| PatchHandler (Application &application) | |
| Constructor. | |
| void | threadFunction () |
| Thread function for generating the actual patches. | |
Protected Attributes | |
| Application & | m_application |
| Application attached to. | |
| condition_variable | m_cond |
| Conditional variable for sleeping on the conversion thread. | |
| detail::Synchronized< ProcessedState > | m_processedState |
| Synchronized processed patches state. | |
| string | m_startupPrefabUrl |
| Startup prefab URL. Set on the first patch. | |
| MainLoopTaskToken | m_taskToken |
| Token for the patch handling main loop task. | |
| thread | m_thread |
| Thread for processing the patches. | |
| detail::Synchronized< ThreadState > | m_threadState |
| Synchronized thread state. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from kanzi::IPatchHandler | |
| static void | setPatchHandler (IPatchHandler *patchHandler) |
| Sets the patch handler. | |
Static Protected Attributes inherited from kanzi::IPatchHandler | |
| static IPatchHandler * | s_patchHandler |
| Static singleton (non-owning). | |
Default patch handler.
Allows registration per header type. Supports both multi-threaded or single-threaded operation depending on feature flags.
Incoming patch — raw KZA/property-patch bytes.
Processed patch ready to apply on the main loop.
|
override |
Destructor.
|
explicitprotected |
Constructor.
| application | Application for the patch handling task. |
|
inlinestatic |
Creates a new patch handler of this type and assigns to the singleton.
Returns a reference to the handler created.
| application | Application for the patch handling task. |
IPatchHandler::handlePatchOverride() implementation.
Implements kanzi::IPatchHandler.
|
overrideprotectedvirtual |
IPatchHandler::handlePatchOverride() implementation.
Implements kanzi::IPatchHandler.
|
protected |
Internal patch handling.
| data | Movable data. |
|
protected |
Patch task for main loop scheduler.
| diffTime | Time since last iteration. |
|
protected |
Thread function for generating the actual patches.
|
protected |
Application attached to.
|
protected |
Token for the patch handling main loop task.
|
protected |
Thread for processing the patches.
|
protected |
Conditional variable for sleeping on the conversion thread.
|
protected |
Synchronized thread state.
|
protected |
Synchronized processed patches state.
|
protected |
Startup prefab URL. Set on the first patch.