LeviLamina
Loading...
Searching...
No Matches
TickingQueue.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/BasicTimer.h"
7#include "mc/util/Signal.h"
8
10public:
11 // TickingQueue inner types declare
12 // clang-format off
13 class Stage;
14 class OneshotStage;
15 class PollingStage;
16 class SleepStage;
19 // clang-format on
20
21 // TickingQueue inner types define
22 class Stage {
23 public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<1, 1, bool> mInitRan;
27 // NOLINTEND
28
29 public:
30 // virtual functions
31 // NOLINTBEGIN
32 virtual ~Stage() = default;
33
34 virtual void init() = 0;
35
36 virtual bool tick() = 0;
37 // NOLINTEND
38 };
39
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<8, 64, ::std::function<void()>> mInitFn;
45 // NOLINTEND
46
47 public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual void init() /*override*/;
51
52 virtual bool tick() /*override*/;
53 // NOLINTEND
54 };
55
57 public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<8, 64, ::std::function<void()>> mInitFn;
61 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mTickFn;
62 // NOLINTEND
63
64 public:
65 // virtual functions
66 // NOLINTBEGIN
67 virtual void init() /*override*/;
68
69 virtual bool tick() /*override*/;
70 // NOLINTEND
71 };
72
74 public:
75 // member variables
76 // NOLINTBEGIN
77 ::ll::TypedStorage<8, 80, ::BasicTimer> mBasicTimer;
78 // NOLINTEND
79
80 public:
81 // virtual functions
82 // NOLINTBEGIN
83 virtual void init() /*override*/;
84
85 virtual bool tick() /*override*/;
86 // NOLINTEND
87 };
88
90 public:
91 // WaitForCallbackStage inner types define
92 using Callback = ::std::function<void()>;
93
94 using InitFunction = ::std::function<void(::std::function<void()>)>;
95
96 public:
97 // member variables
98 // NOLINTBEGIN
99 ::ll::TypedStorage<8, 64, ::std::function<void(::std::function<void()>)>> mInitFn;
100 ::ll::TypedStorage<1, 1, ::Signal> mSignal;
101 // NOLINTEND
102
103 public:
104 // virtual functions
105 // NOLINTBEGIN
106 virtual void init() /*override*/;
107
108 virtual bool tick() /*override*/;
109 // NOLINTEND
110 };
111
112 class WaitForSignalStage : public ::TickingQueue::Stage {
113 public:
114 // member variables
115 // NOLINTBEGIN
116 ::ll::TypedStorage<8, 8, ::Signal&> mSignal;
117 // NOLINTEND
118
119 public:
120 // prevent constructor by default
121 WaitForSignalStage& operator=(WaitForSignalStage const&);
122 WaitForSignalStage(WaitForSignalStage const&);
123 WaitForSignalStage();
124
125 public:
126 // virtual functions
127 // NOLINTBEGIN
128 virtual void init() /*override*/;
129
130 virtual bool tick() /*override*/;
131 // NOLINTEND
132 };
133
134public:
135 // member variables
136 // NOLINTBEGIN
137 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::TickingQueue::Stage>>> mStages;
138 ::ll::TypedStorage<4, 4, uint> mCurrentStage;
139 // NOLINTEND
140};
Definition TickingQueue.h:40
Definition TickingQueue.h:56
Definition TickingQueue.h:73
Definition TickingQueue.h:22
Definition TickingQueue.h:89
Definition TickingQueue.h:112
Definition TickingQueue.h:9