openPSTD  2.0
Open source simulation for sound propagation in urban environments
MockKernel.h
1 //
2 // Created by michiel on 24-1-2016.
3 //
4 
5 #ifndef OPENPSTD_MOCKKERNEL_H
6 #define OPENPSTD_MOCKKERNEL_H
7 
8 #include "KernelInterface.h"
9 
10 namespace OpenPSTD
11 {
12  namespace Kernel
13  {
17  class MockKernel : public KernelInterface
18  {
19  private:
20  std::shared_ptr<PSTDConfiguration> _conf;
21 
22  PSTD_FRAME_PTR CreateRandomFrame(int x, int y);
23 
24  PSTD_FRAME_PTR CreateHorizontalLines(int x, int y);
25 
26  PSTD_FRAME_PTR CreateVerticalLines(int x, int y);
27 
28  PSTD_FRAME_PTR CreateHorizontalGradient(int x, int y);
29 
30  PSTD_FRAME_PTR CreateVerticalGradient(int x, int y);
31 
32  PSTD_FRAME_PTR CreateVerticalGradientNeg(int x, int y);
33 
34 
35  public:
39  virtual void initialize_kernel(std::shared_ptr<PSTDConfiguration> config) override;
40 
46  virtual void run(KernelCallback *callback) override;
47 
51  virtual SimulationMetadata get_metadata() override;
52  };
53 
54  }
55 }
56 
57 #endif //OPENPSTD_MOCKKERNEL_H
This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
The kernel API.
Definition: KernelInterface.h:265
virtual void run(KernelCallback *callback) override
Runs the kernel.
Definition: MockKernel.cpp:17
Fake kernel useful for testing the interaction between kernel and CLI or GUI.
Definition: MockKernel.h:17
virtual void initialize_kernel(std::shared_ptr< PSTDConfiguration > config) override
Sets the configuration.
Definition: MockKernel.cpp:12
virtual SimulationMetadata get_metadata() override
Query the kernel for metadata about the simulation that is configured.
Definition: MockKernel.cpp:61
Data not obtained in running openPSTD but necessary for representing the information.
Definition: KernelInterface.h:242
Callback interface for communication with the CLI or the GUI.
Definition: KernelInterface.h:212