add EventAdder interface
All checks were successful
continuous-integration/drone/push Build is passing

will be used as a base implementations of sources of random events
This commit is contained in:
surtur 2021-12-06 01:02:43 +01:00
parent 5557f0d9e6
commit bc5bb6e700
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 17 additions and 1 deletions

View File

@ -181,7 +181,7 @@ add_subdirectory(lib/fmt EXCLUDE_FROM_ALL)
endif(NOT CMAKE_EXE_LINKER_FLAGS MATCHES "-fuse-ld=lld")
endif()
add_executable(fortuna main.cpp generator.cpp generator.h fortuna.cpp fortuna.h accumulator.cpp accumulator.h pool.cpp pool.h)
add_executable(fortuna main.cpp generator.cpp generator.h fortuna.cpp fortuna.h accumulator.cpp accumulator.h pool.cpp pool.h event_adder.h)
# ref: https://cmake.org/pipermail/cmake/2016-May/063400.html
target_link_libraries(fortuna
PRIVATE cryptopp

16
event_adder.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef FORTUNA_EVENT_ADDER_H
#define FORTUNA_EVENT_ADDER_H
#include <vector>
namespace fortuna {
namespace accumulator {
class EventAdder {
public:
virtual void add(std::vector<char> e) = 0;
};
} //namespace accumulator
} //namespace fortuna
#endif//FORTUNA_EVENT_ADDER_H