FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
factory_live.hpp
Go to the documentation of this file.
1#pragma once
2// Definition of fastmm::live_factory<S> (declared in strategies/module.hpp): builds
3// Engine<S, TscClock, LiveTransport, RingFeed> on the live::LiveBackend that RunnerDeps::backend
4// points at. Needs only fastmm::core (no networking).
7
8#include <memory>
9
10namespace fastmm {
11
12template <class S>
13std::unique_ptr<IEngineRunner> live_factory(TransportKind kind, RunnerDeps& deps) {
14 static_assert(StrategyLike<S>,
15 "fastmm: live_factory<S> needs a strategy: static name(), static schema() and a "
16 "default constructor");
17 return live::make_live_runner<S>(kind, deps);
18}
19
20} // namespace fastmm
LiveBackend: what RunnerDeps::backend points at for TransportKind::Live.
Strategy modules (ADR-0012, section 5): one registration function per strategy library.
Definition strategy.hpp:16
TransportKind
Definition registry.hpp:33
std::unique_ptr< IEngineRunner > live_factory(TransportKind kind, RunnerDeps &deps)
Definition factory_live.hpp:15