Brunot
Loading...
Searching...
No Matches
TestRunner.h
Go to the documentation of this file.
1
12// ____ __ __ __
13// /\__ _\/\ \ /\ \/\ \
14// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
15// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
16// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
17// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
18// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
19
20#pragma once
21
22#include "Framework/System.h"
23
24struct Message;
25
26namespace sys
27{
28class TestRunner : public System
29{
30public:
31#pragma region static_functions
32
36 static auto getEnum() -> Type
37 {
38 return Type::TestRunner;
39 }
40
41#pragma endregion
42
43 TestRunner();
44 ~TestRunner() override;
45 TestRunner(const TestRunner& other) = default;
46 TestRunner(TestRunner&& other) noexcept;
47 auto operator=(const TestRunner& other) -> TestRunner&;
48 auto operator=(TestRunner&& other) noexcept -> TestRunner& = default;
49
50
51#pragma region overridden_functions
52
53 auto clone() const -> std::unique_ptr<GameObject> override
54 {
55 return std::make_unique<TestRunner>(*this);
56 }
57
58 auto onEnterEngine() -> void override;
59
60 auto onUpdate(float dt) -> void override;
61
62 auto endWindow() -> void override
63 {
64 }; // for debug ImGUI
65protected:
66 auto systemShowMenu() -> void override;
67
68public:
69 auto onRender() -> void override;
70 auto load(const Stream& stream) -> void override;
71 auto save(Stream& stream) const -> void override;
72
73#pragma endregion
74
75#pragma region TestRunner_Functions
76
77 auto receiveResetKeyPressed(const Message* message) -> Message;
78
79#pragma endregion
80
81private:
82#pragma region member_variables
83
84#pragma endregion
85
86#pragma region helper_functions
87
88#pragma endregion
89
90#pragma region static_variables
91
92#pragma endregion
93
94
95};
96}
sys::Json Stream
Definition AudioObject.h:20
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:24
Type
Definition System.h:20
@ TestRunner
Definition System.h:44
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
static auto getEnum() -> Type
function required by all systems
Definition TestRunner.h:36
auto operator=(TestRunner &&other) noexcept -> TestRunner &=default
auto onUpdate(float dt) -> void override
called once every frame.
Definition TestRunner.cpp:516
~TestRunner() override
Definition TestRunner.cpp:480
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition TestRunner.h:53
auto onRender() -> void override
called every frame after update has been called for every object.
Definition TestRunner.cpp:588
auto operator=(const TestRunner &other) -> TestRunner &
Definition TestRunner.cpp:491
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition TestRunner.cpp:505
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition TestRunner.cpp:568
TestRunner()
Definition TestRunner.cpp:415
TestRunner(const TestRunner &other)=default
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition TestRunner.cpp:599
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition TestRunner.h:62
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition TestRunner.cpp:604
auto receiveResetKeyPressed(const Message *message) -> Message
Definition TestRunner.cpp:609
the type of elements in a basic_json container
Definition GameObject.h:37
Definition Message.h:35