C++ Server-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::server_side::bindings::CHookWrapper Class Referencefinal

Wrapper that adapts C hook callbacks to C++ Hook interface. More...

#include <hook_wrapper.hpp>

Inheritance diagram for launchdarkly::server_side::bindings::CHookWrapper:
Inheritance graph
[legend]
Collaboration diagram for launchdarkly::server_side::bindings::CHookWrapper:
Collaboration graph
[legend]

Public Member Functions

 CHookWrapper (struct LDServerSDKHook const &c_hook)
 Construct a hook wrapper from C hook struct. More...
 
hooks::HookMetadata const & Metadata () const override
 Get hook metadata.
 
hooks::EvaluationSeriesData BeforeEvaluation (hooks::EvaluationSeriesContext const &series_context, hooks::EvaluationSeriesData data) override
 Forward beforeEvaluation to C callback if set.
 
hooks::EvaluationSeriesData AfterEvaluation (hooks::EvaluationSeriesContext const &series_context, hooks::EvaluationSeriesData data, EvaluationDetail< Value > const &detail) override
 Forward afterEvaluation to C callback if set.
 
void AfterTrack (hooks::TrackSeriesContext const &series_context) override
 Forward afterTrack to C callback if set.
 

Detailed Description

Wrapper that adapts C hook callbacks to C++ Hook interface.

This class implements the C++ Hook interface and forwards all calls to the C callback functions provided by the application.

Constructor & Destructor Documentation

◆ CHookWrapper()

launchdarkly::server_side::bindings::CHookWrapper::CHookWrapper ( struct LDServerSDKHook const &  c_hook)
explicit

Construct a hook wrapper from C hook struct.

Parameters
c_hookC hook structure containing callbacks and metadata. The Name string is copied. UserData pointer and function pointers are copied but the pointed-to data lifetime is managed by the caller.

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