LeviLamina
Loading...
Searching...
No Matches
ScriptDebugger.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/debug/log/LogLevel.h"
7#include "mc/scripting/debugger/IScriptDebugger.h"
8#include "mc/scripting/diagnostics/IScriptStatPublisher.h"
9
10// auto generated forward declare list
11// clang-format off
16class ScriptStat;
17class ServerLevel;
19namespace Core { class Path; }
20namespace ScriptDebuggerMessages { struct CommandMessage; }
21namespace Scripting { class ScriptEngine; }
22namespace cereal { struct ReflectionCtx; }
23// clang-format on
24
26public:
27 // ScriptDebugger inner types declare
28 // clang-format off
29 struct AutoAttachTelem;
30 // clang-format on
31
32 // ScriptDebugger inner types define
33 enum class DebuggerMode : int {
34 Stopped = 0,
35 Connect = 1,
36 Listen = 2,
37 };
38
40 public:
41 // member variables
42 // NOLINTBEGIN
45 // NOLINTEND
46
47 public:
48 // prevent constructor by default
49 AutoAttachTelem& operator=(AutoAttachTelem const&);
52 };
53
54public:
55 // member variables
56 // NOLINTBEGIN
73 // NOLINTEND
74
75public:
76 // prevent constructor by default
77 ScriptDebugger& operator=(ScriptDebugger const&);
80
81public:
82 // virtual functions
83 // NOLINTBEGIN
84 // vIndex: 0
85 virtual ~ScriptDebugger() /*override*/;
86
87 // vIndex: 3
88 virtual ::ScriptDebuggerSettings const& getSettings() const /*override*/;
89
90 // vIndex: 0
91 virtual bool connect(::std::string const& host, ushort port) /*override*/;
92
93 // vIndex: 1
94 virtual bool listen(ushort port) /*override*/;
95
96 // vIndex: 2
97 virtual void stop() /*override*/;
98
99 // vIndex: 4
100 virtual void startProfiler() /*override*/;
101
102 // vIndex: 5
103 virtual ::std::vector<::Core::Path> stopProfiler() /*override*/;
104
105 // vIndex: 1
106 virtual bool isStatPublisherEnabled() const /*override*/;
107
108 // vIndex: 2
109 virtual void publishStats(uint64 collectedTick, ::std::vector<::ScriptStat> const& stats) /*override*/;
110 // NOLINTEND
111
112public:
113 // member functions
114 // NOLINTBEGIN
116 ::ScriptDebuggerSettings settings,
117 ::ServerLevel& serverLevel,
118 ::MinecraftCommands& commands,
119 ::cereal::ReflectionCtx& ctx,
120 ::Scripting::ScriptEngine& scriptEngine,
121 ::ScriptPluginManager& pluginManager,
122 ::IScriptDebuggerWatchdog& watchdog,
123 ::IScriptTelemetryLogger& telemetry
124 );
125
126 MCNAPI void _debuggerMessageHandler(::std::string_view message);
127
128 MCNAPI void _handleCommandMessage(::ScriptDebuggerMessages::CommandMessage const& commandMessage);
129
130 MCNAPI ::std::string _sanitizeHostName(::std::string const& host) const;
131
132 MCNAPI void _sendNotification(::LogLevel logLevel, ::std::string_view message);
133
134 MCNAPI bool _tryAttachRuntime(bool expectRuntime);
135
136 MCNAPI bool _trySelectTarget();
137
138 MCNAPI void sendLog(::LogLevel logLevel, ::std::string_view message);
139
140 MCNAPI void update();
141
142 MCNAPI void waitAutoAttach(::std::chrono::seconds waitDuration);
143 // NOLINTEND
144
145public:
146 // constructor thunks
147 // NOLINTBEGIN
148 MCNAPI void* $ctor(
149 ::ScriptDebuggerSettings settings,
150 ::ServerLevel& serverLevel,
151 ::MinecraftCommands& commands,
152 ::cereal::ReflectionCtx& ctx,
153 ::Scripting::ScriptEngine& scriptEngine,
154 ::ScriptPluginManager& pluginManager,
155 ::IScriptDebuggerWatchdog& watchdog,
156 ::IScriptTelemetryLogger& telemetry
157 );
158 // NOLINTEND
159
160public:
161 // destructor thunk
162 // NOLINTBEGIN
163 MCNAPI void $dtor();
164 // NOLINTEND
165
166public:
167 // virtual function thunks
168 // NOLINTBEGIN
169 MCNAPI ::ScriptDebuggerSettings const& $getSettings() const;
170
171 MCNAPI bool $connect(::std::string const& host, ushort port);
172
173 MCNAPI bool $listen(ushort port);
174
175 MCNAPI void $stop();
176
177 MCNAPI void $startProfiler();
178
179 MCNAPI ::std::vector<::Core::Path> $stopProfiler();
180
181 MCNAPI bool $isStatPublisherEnabled() const;
182
183 MCNAPI void $publishStats(uint64 collectedTick, ::std::vector<::ScriptStat> const& stats);
184 // NOLINTEND
185
186public:
187 // vftables
188 // NOLINTBEGIN
189 MCNAPI static void** $vftableForIScriptDebugger();
190
191 MCNAPI static void** $vftableForIScriptStatPublisher();
192 // NOLINTEND
193};
Definition CommandMessage.h:16
Definition IScriptDebuggerWatchdog.h:5
Definition IScriptDebugger.h:11
Definition IScriptStatPublisher.h:10
Definition IScriptTelemetryLogger.h:10
Definition MinecraftCommands.h:33
Definition Path.h:16
Definition ScriptDebugger.h:25
MCAPI void _handleCommandMessage(::ScriptDebuggerMessages::CommandMessage const &commandMessage)
MCAPI::ScriptDebuggerSettings const & $getSettings() const
MCAPI void _sendNotification(::LogLevel logLevel, ::std::string_view message)
MCAPI void $dtor()
MCAPI bool $listen(ushort port)
MCAPI bool $connect(::std::string const &host, ushort port)
MCAPI void * $ctor(::ScriptDebuggerSettings settings, ::ServerLevel &serverLevel, ::MinecraftCommands &commands, ::cereal::ReflectionCtx &ctx, ::Scripting::ScriptEngine &scriptEngine, ::ScriptPluginManager &pluginManager, ::IScriptDebuggerWatchdog &watchdog, ::IScriptTelemetryLogger &telemetry)
static MCAPI void ** $vftableForIScriptStatPublisher()
MCAPI::std::string _sanitizeHostName(::std::string const &host) const
MCAPI bool $isStatPublisherEnabled() const
static MCAPI void ** $vftableForIScriptDebugger()
MCAPI void $startProfiler()
MCAPI void update()
MCAPI bool _trySelectTarget()
MCAPI void _debuggerMessageHandler(::std::string_view message)
MCAPI ::std::vector<::Core::Path > $stopProfiler()
MCAPI void $publishStats(uint64 collectedTick, ::std::vector<::ScriptStat > const &stats)
MCAPI void $stop()
MCAPI void sendLog(::LogLevel logLevel, ::std::string_view message)
MCAPI void waitAutoAttach(::std::chrono::seconds waitDuration)
MCAPI bool _tryAttachRuntime(bool expectRuntime)
Definition ScriptPluginManager.h:27
Definition ScriptStat.h:10
Definition ServerLevel.h:61
STL namespace.
Definition ScriptDebuggerSettings.h:8
Definition ScriptDebugger.h:39
Definition ctx.h:5
Definition Alias.h:14