CppBenchmark  1.0.4.0
C++ Benchmark Library
launcher_handler.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_LAUNCHER_HANDLER_H
10 #define CPPBENCHMARK_LAUNCHER_HANDLER_H
11 
14 
15 namespace CppBenchmark {
16 
18 
22 {
23  friend class Benchmark;
24  friend class BenchmarkPC;
25  friend class BenchmarkThreads;
26 
27 public:
28  LauncherHandler() = default;
29  LauncherHandler(const LauncherHandler&) = default;
30  LauncherHandler(LauncherHandler&&) noexcept = default;
31  virtual ~LauncherHandler() = default;
32 
33  LauncherHandler& operator=(const LauncherHandler&) = default;
34  LauncherHandler& operator=(LauncherHandler&&) noexcept = default;
35 
36 protected:
38 
47  virtual void onLaunching(int current, int total, const BenchmarkBase& benchmark, const Context& context, int attempt) {}
49 
58  virtual void onLaunched(int current, int total, const BenchmarkBase& benchmark, const Context& context, int attempt) {}
59 };
60 
61 } // namespace CppBenchmark
62 
63 #endif // CPPBENCHMARK_LAUNCHER_HANDLER_H
Benchmark base definition.
Threads benchmark base definition.
Benchmark base class.
Benchmark class.
Definition: benchmark.h:22
Producers/Consumers benchmark base class.
Definition: benchmark_pc.h:26
Threads benchmark base class.
Benchmark running context.
Definition: context.h:27
virtual void onLaunching(int current, int total, const BenchmarkBase &benchmark, const Context &context, int attempt)
Handle benchmark launching notification.
LauncherHandler(LauncherHandler &&) noexcept=default
LauncherHandler(const LauncherHandler &)=default
virtual void onLaunched(int current, int total, const BenchmarkBase &benchmark, const Context &context, int attempt)
Handle benchmark launched notification.
C++ Benchmark project definitions.
Definition: barrier.h:15