CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace extensions {
28 template<
typename TFunc>
29 void SetOnce(TFunc& dest,
const TFunc& source) {
37 template<
typename TFunc>
46 template<
typename TConsumer>
48 return [consumers](
const auto& data) {
49 for (
const auto&
consumer : consumers)
const TFunc & Require(const TFunc &func)
Returns func if and only if it is set.
Definition: BasicServerHooks.h:38
void SetOnce(TFunc &dest, const TFunc &source)
Sets dest to source if and only if dest is unset.
Definition: BasicServerHooks.h:29
#define CATAPULT_THROW_INVALID_ARGUMENT(MESSAGE)
Macro used to throw a catapult invalid argument.
Definition: exceptions.h:179
Definition: AddressExtractionExtension.cpp:28
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
TConsumer AggregateConsumers(const std::vector< TConsumer > &consumers)
Aggregates multiple consumers into a single consumer.
Definition: BasicServerHooks.h:47