Skip to content

Commit 936e8f2

Browse files
committed
Revert generated files in codegen
1 parent 9ad53ea commit 936e8f2

8 files changed

+13028
-12486
lines changed

vnext/codegen/NativeCPUTimeSpec.g.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
/*
3+
* This file is auto-generated from a NativeModule spec file in js.
4+
*
5+
* This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules
6+
* in a way that also verifies at compile time that the native module matches the interface required
7+
* by the TurboModule JS spec.
8+
*/
9+
#pragma once
10+
// clang-format off
11+
12+
#include <NativeModules.h>
13+
#include <tuple>
14+
15+
namespace Microsoft::ReactNativeSpecs {
16+
17+
18+
struct CPUTimeSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
19+
static constexpr auto methods = std::tuple{
20+
SyncMethod<double() noexcept>{0, L"getCPUTimeNanos"},
21+
SyncMethod<bool() noexcept>{1, L"hasAccurateCPUTimeNanosForBenchmarks"},
22+
};
23+
24+
template <class TModule>
25+
static constexpr void ValidateModule() noexcept {
26+
constexpr auto methodCheckResults = CheckMethods<TModule, CPUTimeSpec>();
27+
28+
REACT_SHOW_METHOD_SPEC_ERRORS(
29+
0,
30+
"getCPUTimeNanos",
31+
" REACT_SYNC_METHOD(getCPUTimeNanos) double getCPUTimeNanos() noexcept { /* implementation */ }\n"
32+
" REACT_SYNC_METHOD(getCPUTimeNanos) static double getCPUTimeNanos() noexcept { /* implementation */ }\n");
33+
REACT_SHOW_METHOD_SPEC_ERRORS(
34+
1,
35+
"hasAccurateCPUTimeNanosForBenchmarks",
36+
" REACT_SYNC_METHOD(hasAccurateCPUTimeNanosForBenchmarks) bool hasAccurateCPUTimeNanosForBenchmarks() noexcept { /* implementation */ }\n"
37+
" REACT_SYNC_METHOD(hasAccurateCPUTimeNanosForBenchmarks) static bool hasAccurateCPUTimeNanosForBenchmarks() noexcept { /* implementation */ }\n");
38+
}
39+
};
40+
41+
} // namespace Microsoft::ReactNativeSpecs

vnext/codegen/NativeDOMSpec.g.h

Lines changed: 62 additions & 68 deletions
Large diffs are not rendered by default.

vnext/codegen/NativeDevMenuSpec.g.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ struct DevMenuSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
1919
static constexpr auto methods = std::tuple{
2020
Method<void() noexcept>{0, L"show"},
2121
Method<void() noexcept>{1, L"reload"},
22-
Method<void(bool) noexcept>{2, L"setProfilingEnabled"},
23-
Method<void(bool) noexcept>{3, L"setHotLoadingEnabled"},
22+
Method<void(bool) noexcept>{2, L"debugRemotely"},
23+
Method<void(bool) noexcept>{3, L"setProfilingEnabled"},
24+
Method<void(bool) noexcept>{4, L"setHotLoadingEnabled"},
2425
};
2526

2627
template <class TModule>
@@ -39,15 +40,20 @@ struct DevMenuSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
3940
" REACT_METHOD(reload) static void reload() noexcept { /* implementation */ }\n");
4041
REACT_SHOW_METHOD_SPEC_ERRORS(
4142
2,
43+
"debugRemotely",
44+
" REACT_METHOD(debugRemotely) void debugRemotely(bool enableDebug) noexcept { /* implementation */ }\n"
45+
" REACT_METHOD(debugRemotely) static void debugRemotely(bool enableDebug) noexcept { /* implementation */ }\n");
46+
REACT_SHOW_METHOD_SPEC_ERRORS(
47+
3,
4248
"setProfilingEnabled",
4349
" REACT_METHOD(setProfilingEnabled) void setProfilingEnabled(bool enabled) noexcept { /* implementation */ }\n"
4450
" REACT_METHOD(setProfilingEnabled) static void setProfilingEnabled(bool enabled) noexcept { /* implementation */ }\n");
4551
REACT_SHOW_METHOD_SPEC_ERRORS(
46-
3,
52+
4,
4753
"setHotLoadingEnabled",
4854
" REACT_METHOD(setHotLoadingEnabled) void setHotLoadingEnabled(bool enabled) noexcept { /* implementation */ }\n"
4955
" REACT_METHOD(setHotLoadingEnabled) static void setHotLoadingEnabled(bool enabled) noexcept { /* implementation */ }\n");
5056
}
5157
};
5258

53-
} // namespace Microsoft::ReactNativeSpecs
59+
} // namespace Microsoft::ReactNativeSpecs

vnext/codegen/NativeDevSettingsSpec.g.h

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ struct DevSettingsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
2121
Method<void(std::string) noexcept>{1, L"reloadWithReason"},
2222
Method<void() noexcept>{2, L"onFastRefresh"},
2323
Method<void(bool) noexcept>{3, L"setHotLoadingEnabled"},
24-
Method<void(bool) noexcept>{4, L"setProfilingEnabled"},
25-
Method<void() noexcept>{5, L"toggleElementInspector"},
26-
Method<void(std::string) noexcept>{6, L"addMenuItem"},
27-
Method<void() noexcept>{7, L"openDebugger"},
28-
Method<void(std::string) noexcept>{8, L"addListener"},
29-
Method<void(double) noexcept>{9, L"removeListeners"},
30-
Method<void(bool) noexcept>{10, L"setIsShakeToShowDevMenuEnabled"},
24+
Method<void(bool) noexcept>{4, L"setIsDebuggingRemotely"},
25+
Method<void(bool) noexcept>{5, L"setProfilingEnabled"},
26+
Method<void() noexcept>{6, L"toggleElementInspector"},
27+
Method<void(std::string) noexcept>{7, L"addMenuItem"},
28+
Method<void() noexcept>{8, L"openDebugger"},
29+
Method<void(std::string) noexcept>{9, L"addListener"},
30+
Method<void(double) noexcept>{10, L"removeListeners"},
31+
Method<void(bool) noexcept>{11, L"setIsShakeToShowDevMenuEnabled"},
3132
};
3233

3334
template <class TModule>
@@ -56,40 +57,45 @@ struct DevSettingsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
5657
" REACT_METHOD(setHotLoadingEnabled) static void setHotLoadingEnabled(bool isHotLoadingEnabled) noexcept { /* implementation */ }\n");
5758
REACT_SHOW_METHOD_SPEC_ERRORS(
5859
4,
60+
"setIsDebuggingRemotely",
61+
" REACT_METHOD(setIsDebuggingRemotely) void setIsDebuggingRemotely(bool isDebuggingRemotelyEnabled) noexcept { /* implementation */ }\n"
62+
" REACT_METHOD(setIsDebuggingRemotely) static void setIsDebuggingRemotely(bool isDebuggingRemotelyEnabled) noexcept { /* implementation */ }\n");
63+
REACT_SHOW_METHOD_SPEC_ERRORS(
64+
5,
5965
"setProfilingEnabled",
6066
" REACT_METHOD(setProfilingEnabled) void setProfilingEnabled(bool isProfilingEnabled) noexcept { /* implementation */ }\n"
6167
" REACT_METHOD(setProfilingEnabled) static void setProfilingEnabled(bool isProfilingEnabled) noexcept { /* implementation */ }\n");
6268
REACT_SHOW_METHOD_SPEC_ERRORS(
63-
5,
69+
6,
6470
"toggleElementInspector",
6571
" REACT_METHOD(toggleElementInspector) void toggleElementInspector() noexcept { /* implementation */ }\n"
6672
" REACT_METHOD(toggleElementInspector) static void toggleElementInspector() noexcept { /* implementation */ }\n");
6773
REACT_SHOW_METHOD_SPEC_ERRORS(
68-
6,
74+
7,
6975
"addMenuItem",
7076
" REACT_METHOD(addMenuItem) void addMenuItem(std::string title) noexcept { /* implementation */ }\n"
7177
" REACT_METHOD(addMenuItem) static void addMenuItem(std::string title) noexcept { /* implementation */ }\n");
7278
REACT_SHOW_METHOD_SPEC_ERRORS(
73-
7,
79+
8,
7480
"openDebugger",
7581
" REACT_METHOD(openDebugger) void openDebugger() noexcept { /* implementation */ }\n"
7682
" REACT_METHOD(openDebugger) static void openDebugger() noexcept { /* implementation */ }\n");
7783
REACT_SHOW_METHOD_SPEC_ERRORS(
78-
8,
84+
9,
7985
"addListener",
8086
" REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n"
8187
" REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n");
8288
REACT_SHOW_METHOD_SPEC_ERRORS(
83-
9,
89+
10,
8490
"removeListeners",
8591
" REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n"
8692
" REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n");
8793
REACT_SHOW_METHOD_SPEC_ERRORS(
88-
10,
94+
11,
8995
"setIsShakeToShowDevMenuEnabled",
9096
" REACT_METHOD(setIsShakeToShowDevMenuEnabled) void setIsShakeToShowDevMenuEnabled(bool enabled) noexcept { /* implementation */ }\n"
9197
" REACT_METHOD(setIsShakeToShowDevMenuEnabled) static void setIsShakeToShowDevMenuEnabled(bool enabled) noexcept { /* implementation */ }\n");
9298
}
9399
};
94100

95-
} // namespace Microsoft::ReactNativeSpecs
101+
} // namespace Microsoft::ReactNativeSpecs

vnext/codegen/NativeFantomSpec.g.h

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
2+
/*
3+
* This file is auto-generated from a NativeModule spec file in js.
4+
*
5+
* This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules
6+
* in a way that also verifies at compile time that the native module matches the interface required
7+
* by the TurboModule JS spec.
8+
*/
9+
#pragma once
10+
// clang-format off
11+
12+
#include <NativeModules.h>
13+
#include <tuple>
14+
15+
namespace Microsoft::ReactNativeSpecs {
16+
17+
struct FantomSpec_RenderFormatOptions {
18+
bool includeRoot;
19+
bool includeLayoutMetrics;
20+
};
21+
22+
23+
inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(FantomSpec_RenderFormatOptions*) noexcept {
24+
winrt::Microsoft::ReactNative::FieldMap fieldMap {
25+
{L"includeRoot", &FantomSpec_RenderFormatOptions::includeRoot},
26+
{L"includeLayoutMetrics", &FantomSpec_RenderFormatOptions::includeLayoutMetrics},
27+
};
28+
return fieldMap;
29+
}
30+
31+
struct FantomSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
32+
static constexpr auto methods = std::tuple{
33+
Method<void(double, double, double, double) noexcept>{0, L"startSurface"},
34+
Method<void(double) noexcept>{1, L"stopSurface"},
35+
Method<void(, std::string, ) noexcept>{2, L"dispatchNativeEvent"},
36+
SyncMethod<std::vector<std::string>(double) noexcept>{3, L"getMountingManagerLogs"},
37+
Method<void() noexcept>{4, L"flushMessageQueue"},
38+
Method<void() noexcept>{5, L"flushEventQueue"},
39+
SyncMethod<std::string(double, FantomSpec_RenderFormatOptions) noexcept>{6, L"getRenderedOutput"},
40+
Method<void(std::string) noexcept>{7, L"reportTestSuiteResultsJSON"},
41+
};
42+
43+
template <class TModule>
44+
static constexpr void ValidateModule() noexcept {
45+
constexpr auto methodCheckResults = CheckMethods<TModule, FantomSpec>();
46+
47+
REACT_SHOW_METHOD_SPEC_ERRORS(
48+
0,
49+
"startSurface",
50+
" REACT_METHOD(startSurface) void startSurface(double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) noexcept { /* implementation */ }\n"
51+
" REACT_METHOD(startSurface) static void startSurface(double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) noexcept { /* implementation */ }\n");
52+
REACT_SHOW_METHOD_SPEC_ERRORS(
53+
1,
54+
"stopSurface",
55+
" REACT_METHOD(stopSurface) void stopSurface(double surfaceId) noexcept { /* implementation */ }\n"
56+
" REACT_METHOD(stopSurface) static void stopSurface(double surfaceId) noexcept { /* implementation */ }\n");
57+
REACT_SHOW_METHOD_SPEC_ERRORS(
58+
2,
59+
"dispatchNativeEvent",
60+
" REACT_METHOD(dispatchNativeEvent) void dispatchNativeEvent( shadowNode, std::string type, payload) noexcept { /* implementation */ }\n"
61+
" REACT_METHOD(dispatchNativeEvent) static void dispatchNativeEvent( shadowNode, std::string type, payload) noexcept { /* implementation */ }\n");
62+
REACT_SHOW_METHOD_SPEC_ERRORS(
63+
3,
64+
"getMountingManagerLogs",
65+
" REACT_SYNC_METHOD(getMountingManagerLogs) std::vector<std::string> getMountingManagerLogs(double surfaceId) noexcept { /* implementation */ }\n"
66+
" REACT_SYNC_METHOD(getMountingManagerLogs) static std::vector<std::string> getMountingManagerLogs(double surfaceId) noexcept { /* implementation */ }\n");
67+
REACT_SHOW_METHOD_SPEC_ERRORS(
68+
4,
69+
"flushMessageQueue",
70+
" REACT_METHOD(flushMessageQueue) void flushMessageQueue() noexcept { /* implementation */ }\n"
71+
" REACT_METHOD(flushMessageQueue) static void flushMessageQueue() noexcept { /* implementation */ }\n");
72+
REACT_SHOW_METHOD_SPEC_ERRORS(
73+
5,
74+
"flushEventQueue",
75+
" REACT_METHOD(flushEventQueue) void flushEventQueue() noexcept { /* implementation */ }\n"
76+
" REACT_METHOD(flushEventQueue) static void flushEventQueue() noexcept { /* implementation */ }\n");
77+
REACT_SHOW_METHOD_SPEC_ERRORS(
78+
6,
79+
"getRenderedOutput",
80+
" REACT_SYNC_METHOD(getRenderedOutput) std::string getRenderedOutput(double surfaceId, FantomSpec_RenderFormatOptions && config) noexcept { /* implementation */ }\n"
81+
" REACT_SYNC_METHOD(getRenderedOutput) static std::string getRenderedOutput(double surfaceId, FantomSpec_RenderFormatOptions && config) noexcept { /* implementation */ }\n");
82+
REACT_SHOW_METHOD_SPEC_ERRORS(
83+
7,
84+
"reportTestSuiteResultsJSON",
85+
" REACT_METHOD(reportTestSuiteResultsJSON) void reportTestSuiteResultsJSON(std::string results) noexcept { /* implementation */ }\n"
86+
" REACT_METHOD(reportTestSuiteResultsJSON) static void reportTestSuiteResultsJSON(std::string results) noexcept { /* implementation */ }\n");
87+
}
88+
};
89+
90+
} // namespace Microsoft::ReactNativeSpecs

vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,4 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS
278278
}
279279
};
280280

281-
} // namespace Microsoft::ReactNativeSpecs
281+
} // namespace Microsoft::ReactNativeSpecs

0 commit comments

Comments
 (0)