LeviLamina
Loading...
Searching...
No Matches
RouteMatcher.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/oreui/interface/IRouteMatcher.h"
7#include "mc/client/gui/oreui/interface/RouteMode.h"
8#include "mc/client/gui/oreui/interface/RoutePrerequisite.h"
9#include "mc/client/gui/oreui/interface/RouteType.h"
10#include "mc/client/gui/oreui/routing/RouteHistoryAction.h"
11
12namespace OreUI {
13
14class RouteMatcher : public ::OreUI::IRouteMatcher {
15public:
16 // RouteMatcher inner types declare
17 // clang-format off
18 struct RouteEntry;
19 struct DefaultRouteEntry;
20 struct RedirectEntry;
21 // clang-format on
22
23 // RouteMatcher inner types define
24 struct RouteEntry {
25 public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 32, ::std::string const> baseScreenId;
29 ::ll::TypedStorage<8, 32, ::std::string const> pattern;
30 ::ll::TypedStorage<4, 4, ::OreUI::RouteType> type;
31 ::ll::TypedStorage<4, 4, ::OreUI::RouteMode> mode;
32 ::ll::TypedStorage<4, 4, ::OreUI::RoutePrerequisite> prerequisite;
33 ::ll::TypedStorage<8, 64, ::std::function<bool()>> isActiveCallback;
34 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)>>
35 matchCallback;
36 // NOLINTEND
37
38 public:
39 // prevent constructor by default
40 RouteEntry& operator=(RouteEntry const&);
41 RouteEntry();
42
43 public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI RouteEntry(::OreUI::RouteMatcher::RouteEntry const&);
47
48 MCAPI RouteEntry(::OreUI::RouteMatcher::RouteEntry&&);
49
50 MCAPI RouteEntry(
51 ::std::string const& baseScreenId,
52 ::std::string const& pattern,
53 ::OreUI::RouteType type,
54 ::OreUI::RouteMode mode,
55 ::OreUI::RoutePrerequisite prerequisite,
56 ::std::function<bool()> isActiveCallback,
57 ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)> matchCallback
58 );
59
60 MCAPI ~RouteEntry();
61 // NOLINTEND
62
63 public:
64 // constructor thunks
65 // NOLINTBEGIN
66 MCAPI void* $ctor(::OreUI::RouteMatcher::RouteEntry const&);
67
68 MCAPI void* $ctor(::OreUI::RouteMatcher::RouteEntry&&);
69
70 MCAPI void* $ctor(
71 ::std::string const& baseScreenId,
72 ::std::string const& pattern,
73 ::OreUI::RouteType type,
74 ::OreUI::RouteMode mode,
75 ::OreUI::RoutePrerequisite prerequisite,
76 ::std::function<bool()> isActiveCallback,
77 ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)> matchCallback
78 );
79 // NOLINTEND
80
81 public:
82 // destructor thunk
83 // NOLINTBEGIN
84 MCAPI void $dtor();
85 // NOLINTEND
86 };
87
88 struct DefaultRouteEntry {
89 public:
90 // member variables
91 // NOLINTBEGIN
92 ::ll::TypedStorage<8, 32, ::std::string const> baseScreenId;
93 ::ll::TypedStorage<8, 32, ::std::string const> route;
94 // NOLINTEND
95
96 public:
97 // prevent constructor by default
98 DefaultRouteEntry& operator=(DefaultRouteEntry const&);
99 DefaultRouteEntry();
100
101 public:
102 // member functions
103 // NOLINTBEGIN
104 MCAPI DefaultRouteEntry(::OreUI::RouteMatcher::DefaultRouteEntry const&);
105
106 MCAPI DefaultRouteEntry(::OreUI::RouteMatcher::DefaultRouteEntry&&);
107
108 MCAPI DefaultRouteEntry(::std::string const& baseScreenId, ::std::string const& route);
109 // NOLINTEND
110
111 public:
112 // constructor thunks
113 // NOLINTBEGIN
114 MCFOLD void* $ctor(::OreUI::RouteMatcher::DefaultRouteEntry const&);
115
116 MCFOLD void* $ctor(::OreUI::RouteMatcher::DefaultRouteEntry&&);
117
118 MCFOLD void* $ctor(::std::string const& baseScreenId, ::std::string const& route);
119 // NOLINTEND
120 };
121
122 struct RedirectEntry {
123 public:
124 // member variables
125 // NOLINTBEGIN
126 ::ll::TypedStorage<8, 32, ::std::string const> pattern;
127 ::ll::TypedStorage<8, 64, ::std::function<bool()>> isActiveCallback;
128 ::ll::TypedStorage<8, 64, ::std::function<::std::string(::std::string const&)>> composer;
129 // NOLINTEND
130
131 public:
132 // prevent constructor by default
133 RedirectEntry& operator=(RedirectEntry const&);
134 RedirectEntry();
135
136 public:
137 // member functions
138 // NOLINTBEGIN
139 MCAPI RedirectEntry(::OreUI::RouteMatcher::RedirectEntry const&);
140
141 MCAPI RedirectEntry(::OreUI::RouteMatcher::RedirectEntry&&);
142
143 MCAPI RedirectEntry(
144 ::std::string const& pattern,
145 ::std::function<bool()> isActiveCallback,
146 ::std::function<::std::string(::std::string const&)> composer
147 );
148 // NOLINTEND
149
150 public:
151 // constructor thunks
152 // NOLINTBEGIN
153 MCFOLD void* $ctor(::OreUI::RouteMatcher::RedirectEntry const&);
154
155 MCAPI void* $ctor(::OreUI::RouteMatcher::RedirectEntry&&);
156
157 MCFOLD void* $ctor(
158 ::std::string const& pattern,
159 ::std::function<bool()> isActiveCallback,
160 ::std::function<::std::string(::std::string const&)> composer
161 );
162 // NOLINTEND
163 };
164
165 using IsActiveCallback = ::std::function<bool()>;
166
167 using OnMatchCallback = ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)>;
168
169 using RouteRedirectComposer = ::std::function<::std::string(::std::string const&)>;
170
171public:
172 // member variables
173 // NOLINTBEGIN
174 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::RouteMatcher::RouteEntry>> mRoutes;
175 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::RouteMatcher::DefaultRouteEntry>> mDefaultRoutes;
176 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::RouteMatcher::RedirectEntry>> mRedirects;
177 // NOLINTEND
178
179public:
180 // virtual functions
181 // NOLINTBEGIN
182 virtual void navigateTo(::std::string const& route, ::OreUI::RouteHistoryAction action) const /*override*/;
183
184 virtual ::std::string redirectIfNeeded(::std::string const& route) const /*override*/;
185
186 virtual bool isSupported(::std::string const& route) const /*override*/;
187
188 virtual bool areCompatible(::std::string const& routeA, ::std::string const& routeB) const /*override*/;
189
190 virtual bool isRouteInDirectory(::std::string const& directory, ::std::string const& route) const /*override*/;
191
192 virtual ::std::optional<::std::string> getDefaultRouteForFile(::std::string const& file) const /*override*/;
193
194 virtual ::OreUI::RouteType getRouteType(::std::string const& route) const /*override*/;
195
196 virtual ::OreUI::RouteMode getRouteMode(::std::string const& route) const /*override*/;
197
198 virtual ::OreUI::RoutePrerequisite getRoutePrerequisite(::std::string const& route) const /*override*/;
199 // NOLINTEND
200
201public:
202 // member functions
203 // NOLINTBEGIN
204 MCAPI ::std::optional<::OreUI::RouteMatcher::RedirectEntry> _matchRedirect(::std::string const& route) const;
205
206 MCAPI ::std::optional<::OreUI::RouteMatcher::RouteEntry> _matchRoute(::std::string const& route) const;
207
208 MCAPI void addRedirect(
209 ::std::string const& path,
210 ::std::function<bool()> isActiveCallback,
211 ::std::function<::std::string(::std::string const&)> composer
212 );
213
214 MCAPI void addRoute(
215 ::std::string const& baseScreenId,
216 ::std::string const& pattern,
217 ::OreUI::RouteType type,
218 ::OreUI::RouteMode mode,
219 ::OreUI::RoutePrerequisite prerequisite,
220 ::std::function<bool()> isActiveCallback,
221 ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)> matchCallback
222 );
223 // NOLINTEND
224
225public:
226 // virtual function thunks
227 // NOLINTBEGIN
228 MCAPI void $navigateTo(::std::string const& route, ::OreUI::RouteHistoryAction action) const;
229
230 MCAPI ::std::string $redirectIfNeeded(::std::string const& route) const;
231
232 MCAPI bool $isSupported(::std::string const& route) const;
233
234 MCAPI bool $areCompatible(::std::string const& routeA, ::std::string const& routeB) const;
235
236 MCAPI bool $isRouteInDirectory(::std::string const& directory, ::std::string const& route) const;
237
238 MCAPI ::std::optional<::std::string> $getDefaultRouteForFile(::std::string const& file) const;
239
240 MCAPI ::OreUI::RouteType $getRouteType(::std::string const& route) const;
241
242 MCAPI ::OreUI::RouteMode $getRouteMode(::std::string const& route) const;
243
244 MCAPI ::OreUI::RoutePrerequisite $getRoutePrerequisite(::std::string const& route) const;
245 // NOLINTEND
246
247public:
248 // vftables
249 // NOLINTBEGIN
250 MCNAPI static void** $vftable();
251 // NOLINTEND
252};
253
254} // namespace OreUI
Definition RouteMatcher.h:7
static MCAPI void ** $vftable()
Definition RouteMatcher.h:19
Definition RouteMatcher.h:21
Definition RouteMatcher.h:17