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();
41
42 public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI RouteEntry(
46 ::std::string const& baseScreenId,
47 ::std::string const& pattern,
48 ::OreUI::RouteType type,
49 ::OreUI::RouteMode mode,
50 ::OreUI::RoutePrerequisite prerequisite,
51 ::std::function<bool()> isActiveCallback,
52 ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)> matchCallback
53 );
54
55 MCAPI ~RouteEntry();
56 // NOLINTEND
57
58 public:
59 // constructor thunks
60 // NOLINTBEGIN
61 MCAPI void* $ctor(
62 ::std::string const& baseScreenId,
63 ::std::string const& pattern,
64 ::OreUI::RouteType type,
65 ::OreUI::RouteMode mode,
66 ::OreUI::RoutePrerequisite prerequisite,
67 ::std::function<bool()> isActiveCallback,
68 ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)> matchCallback
69 );
70 // NOLINTEND
71
72 public:
73 // destructor thunk
74 // NOLINTBEGIN
75 MCAPI void $dtor();
76 // NOLINTEND
77 };
78
79 struct DefaultRouteEntry {
80 public:
81 // member variables
82 // NOLINTBEGIN
83 ::ll::TypedStorage<8, 32, ::std::string const> baseScreenId;
84 ::ll::TypedStorage<8, 32, ::std::string const> route;
85 // NOLINTEND
86 };
87
88 struct RedirectEntry {
89 public:
90 // member variables
91 // NOLINTBEGIN
92 ::ll::TypedStorage<8, 32, ::std::string const> pattern;
93 ::ll::TypedStorage<8, 64, ::std::function<bool()>> isActiveCallback;
94 ::ll::TypedStorage<8, 64, ::std::function<::std::string(::std::string const&)>> composer;
95 // NOLINTEND
96
97 public:
98 // prevent constructor by default
99 RedirectEntry();
100
101 public:
102 // member functions
103 // NOLINTBEGIN
104 MCAPI RedirectEntry(
105 ::std::string const& pattern,
106 ::std::function<bool()> isActiveCallback,
107 ::std::function<::std::string(::std::string const&)> composer
108 );
109
110 MCAPI ~RedirectEntry();
111 // NOLINTEND
112
113 public:
114 // constructor thunks
115 // NOLINTBEGIN
116 MCAPI void* $ctor(
117 ::std::string const& pattern,
118 ::std::function<bool()> isActiveCallback,
119 ::std::function<::std::string(::std::string const&)> composer
120 );
121 // NOLINTEND
122
123 public:
124 // destructor thunk
125 // NOLINTBEGIN
126 MCFOLD void $dtor();
127 // NOLINTEND
128 };
129
130 using IsActiveCallback = ::std::function<bool()>;
131
132 using OnMatchCallback = ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)>;
133
134 using RouteRedirectComposer = ::std::function<::std::string(::std::string const&)>;
135
136public:
137 // member variables
138 // NOLINTBEGIN
139 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::RouteMatcher::RouteEntry>> mRoutes;
140 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::RouteMatcher::DefaultRouteEntry>> mDefaultRoutes;
141 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::RouteMatcher::RedirectEntry>> mRedirects;
142 // NOLINTEND
143
144public:
145 // virtual functions
146 // NOLINTBEGIN
147 virtual void navigateTo(::std::string const& route, ::OreUI::RouteHistoryAction action) const /*override*/;
148
149 virtual ::std::string redirectIfNeeded(::std::string const& route) const /*override*/;
150
151 virtual bool isSupported(::std::string const& route) const /*override*/;
152
153 virtual bool areCompatible(::std::string const& routeA, ::std::string const& routeB) const /*override*/;
154
155 virtual bool isRouteInDirectory(::std::string const& directory, ::std::string const& route) const /*override*/;
156
157 virtual ::std::optional<::std::string> getDefaultRouteForFile(::std::string const& file) const /*override*/;
158
159 virtual ::OreUI::RouteType getRouteType(::std::string const& route) const /*override*/;
160
161 virtual ::OreUI::RouteMode getRouteMode(::std::string const& route) const /*override*/;
162
163 virtual ::OreUI::RoutePrerequisite getRoutePrerequisite(::std::string const& route) const /*override*/;
164
165 virtual ~RouteMatcher() /*override*/;
166 // NOLINTEND
167
168public:
169 // member functions
170 // NOLINTBEGIN
171 MCAPI RouteMatcher();
172
173 MCAPI ::std::optional<::OreUI::RouteMatcher::RedirectEntry> _matchRedirect(::std::string const& route) const;
174
175 MCAPI ::std::optional<::OreUI::RouteMatcher::RouteEntry> _matchRoute(::std::string const& route) const;
176
177 MCAPI void addRedirect(
178 ::std::string const& path,
179 ::std::function<bool()> isActiveCallback,
180 ::std::function<::std::string(::std::string const&)> composer
181 );
182
183 MCAPI void addRoute(
184 ::std::string const& baseScreenId,
185 ::std::string const& pattern,
186 ::OreUI::RouteType type,
187 ::OreUI::RouteMode mode,
188 ::OreUI::RoutePrerequisite prerequisite,
189 ::std::function<bool()> isActiveCallback,
190 ::std::function<void(::std::string const&, ::OreUI::RouteHistoryAction)> matchCallback
191 );
192 // NOLINTEND
193
194public:
195 // constructor thunks
196 // NOLINTBEGIN
197 MCAPI void* $ctor();
198 // NOLINTEND
199
200public:
201 // destructor thunk
202 // NOLINTBEGIN
203 MCAPI void $dtor();
204 // NOLINTEND
205
206public:
207 // virtual function thunks
208 // NOLINTBEGIN
209 MCAPI void $navigateTo(::std::string const& route, ::OreUI::RouteHistoryAction action) const;
210
211 MCAPI ::std::string $redirectIfNeeded(::std::string const& route) const;
212
213 MCAPI bool $isSupported(::std::string const& route) const;
214
215 MCAPI bool $areCompatible(::std::string const& routeA, ::std::string const& routeB) const;
216
217 MCAPI bool $isRouteInDirectory(::std::string const& directory, ::std::string const& route) const;
218
219 MCAPI ::std::optional<::std::string> $getDefaultRouteForFile(::std::string const& file) const;
220
221 MCAPI ::OreUI::RouteType $getRouteType(::std::string const& route) const;
222
223 MCAPI ::OreUI::RouteMode $getRouteMode(::std::string const& route) const;
224
225 MCAPI ::OreUI::RoutePrerequisite $getRoutePrerequisite(::std::string const& route) const;
226 // NOLINTEND
227
228public:
229 // vftables
230 // NOLINTBEGIN
231 MCNAPI static void** $vftable();
232 // NOLINTEND
233};
234
235} // namespace OreUI
Definition RouteMatcher.h:7
static MCAPI void ** $vftable()
Definition RouteMatcher.h:19
Definition RouteMatcher.h:21
Definition RouteMatcher.h:17