LeviLamina
Loading...
Searching...
No Matches
Watchdog.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/runtime/watchdog/IWatchdog.h"
7
8// auto generated forward declare list
9// clang-format off
10struct JSContext;
11struct JSRuntime;
12namespace Scripting { struct ContextId; }
13namespace Scripting { struct WatchdogEvent; }
14namespace Scripting { struct WatchdogSettings; }
15namespace Scripting::QuickJS { class ContextTimings; }
16// clang-format on
17
18namespace Scripting::QuickJS {
19
21public:
22 // member variables
23 // NOLINTBEGIN
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 Watchdog& operator=(Watchdog const&);
40 Watchdog(Watchdog const&);
41 Watchdog();
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 // vIndex: 0
47 virtual ~Watchdog() /*override*/;
48
49 // vIndex: 1
50 virtual void setWatchdogEventHandler(::std::function<void(::Scripting::WatchdogEvent)> watchdogEventHandler
51 ) /*override*/;
52
53 // vIndex: 2
54 virtual void beginTiming(::Scripting::ContextId contextId) /*override*/;
55
56 // vIndex: 3
57 virtual void endTiming(::Scripting::ContextId contextId) /*override*/;
58
59 // vIndex: 4
60 virtual void pushPhase(::std::string const& namedPhase, ::std::chrono::microseconds frameBaseLine) /*override*/;
61
62 // vIndex: 5
63 virtual void popPhase() /*override*/;
64
65 // vIndex: 6
66 virtual void endFrame() /*override*/;
67
68 // vIndex: 7
69 virtual void resetTimings() /*override*/;
70 // NOLINTEND
71
72public:
73 // member functions
74 // NOLINTBEGIN
76
77 MCAPI void _endContextTiming(::Scripting::ContextId contextId);
78
79 MCAPI ::Scripting::QuickJS::ContextTimings& _getOrCreateContextTime(::Scripting::ContextId contextId);
80
81 MCAPI void _sendWatchdogEvent(::Scripting::WatchdogEvent watchdogEvent);
82 // NOLINTEND
83
84public:
85 // static functions
86 // NOLINTBEGIN
87 MCAPI static void _outOfMemoryHandler(::JSContext* ctx, void* runtimeOpaque);
88
89 MCAPI static int _stackOverflowHandler(::JSContext* ctx, void* runtimeOpaque);
90
91 MCAPI static int _timeoutHandler(::JSContext* ctx, void* runtimeOpaque);
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97 MCAPI void* $ctor(::JSRuntime* rt, ::Scripting::WatchdogSettings settings);
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI void $setWatchdogEventHandler(::std::function<void(::Scripting::WatchdogEvent)> watchdogEventHandler);
110
111 MCAPI void $beginTiming(::Scripting::ContextId contextId);
112
113 MCAPI void $endTiming(::Scripting::ContextId contextId);
114
115 MCAPI void $pushPhase(::std::string const& namedPhase, ::std::chrono::microseconds frameBaseLine);
116
117 MCAPI void $popPhase();
118
119 MCAPI void $endFrame();
120
121 MCAPI void $resetTimings();
122 // NOLINTEND
123
124public:
125 // vftables
126 // NOLINTBEGIN
127 MCAPI static void** $vftable();
128 // NOLINTEND
129};
130
131} // namespace Scripting::QuickJS
Definition IWatchdog.h:13
Definition Watchdog.h:20
Definition JSContext.h:5
Definition JSRuntime.h:8
Definition ContextId.h:7
Definition WatchdogEvent.h:15
Definition WatchdogSettings.h:7
Definition ctx.h:5
Definition Alias.h:14