C++ Server-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::server_side::EventScope Class Reference

#include <event_scope.hpp>

Public Member Functions

 EventScope (events::IEventProcessor *processor, EventFactory factory)
 
 EventScope ()
 
template<typename Callable >
void Send (Callable &&callable) const
 

Detailed Description

EventScope is responsible for forwarding events to an IEventProcessor. If the given interface is nullptr, then events will not be forwarded at all.

Constructor & Destructor Documentation

◆ EventScope() [1/2]

launchdarkly::server_side::EventScope::EventScope ( events::IEventProcessor *  processor,
EventFactory  factory 
)
inline

Constructs an EventScope with a non-owned IEventProcessor and factory. When Send is called, the factory will be passed to the caller, which must return a constructed event.

Parameters
processorThe event processor to forward events to.
factoryThe factory used for generating events.

◆ EventScope() [2/2]

launchdarkly::server_side::EventScope::EventScope ( )
inline

Default constructs an EventScope which will not forward events.

Member Function Documentation

◆ Send()

template<typename Callable >
void launchdarkly::server_side::EventScope::Send ( Callable &&  callable) const
inline

Sends an event created by the given callable. The callable will be passed an EventFactory.

Parameters
callableReturns an InputEvent.

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