accumulator: implement add_source()
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
234b87ff1f
commit
2086861776
|
@ -1,6 +1,7 @@
|
|||
#ifndef FORTUNA_ACCUMULATOR_H
|
||||
#define FORTUNA_ACCUMULATOR_H
|
||||
|
||||
#include "event_adder_impl.h"
|
||||
#include "generator.h"
|
||||
#include "pool.h"
|
||||
#include <algorithm>
|
||||
|
@ -14,10 +15,19 @@ class Accumulator {
|
|||
private:
|
||||
fortuna::generator::Generator *Gen;
|
||||
|
||||
protected:
|
||||
uint src_count{0};
|
||||
|
||||
public:
|
||||
constexpr static const unsigned int init_pool_num{0};
|
||||
|
||||
auto add_source() -> void;
|
||||
auto add_source() -> void {
|
||||
static uint src_id{this->src_count};
|
||||
++src_count;
|
||||
accumulator::Pool pools[32];
|
||||
EventAdderImpl event_adder(src_id, pools);
|
||||
[[maybe_unused]] bool scheduled;
|
||||
}
|
||||
|
||||
auto set_gen(fortuna::generator::Generator& Gen) -> void {
|
||||
this->Gen = std::move(&Gen);
|
||||
|
|
Reference in New Issue