LeviLamina
Loading...
Searching...
No Matches
ProjectCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/server/commands/ServerCommand.h"
8
9// auto generated forward declare list
10// clang-format off
11class CommandOrigin;
12class CommandOutput;
13class CommandRegistry;
14class Level;
15struct ActorUniqueID;
16// clang-format on
17
18class ProjectCommand : public ::ServerCommand {
19public:
20 // ProjectCommand inner types define
21 enum class ExportSubcommandTypes : int {
22 None = 0,
23 Project = 1,
24 World = 2,
25 Template = 3,
26 };
27
28 enum class Subcommand : int {
29 None = 0,
30 Export = 1,
31 };
32
33 enum class TaskState : int {
34 Running = 0,
35 Complete = 1,
36 Error = 2,
37 };
38
39public:
40 // member variables
41 // NOLINTBEGIN
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 ProjectCommand& operator=(ProjectCommand const&);
49 ProjectCommand(ProjectCommand const&);
50 ProjectCommand();
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
56
57 virtual ~ProjectCommand() /*override*/ = default;
58 // NOLINTEND
59
60public:
61 // static functions
62 // NOLINTBEGIN
63 MCAPI static void _cleanupOutputDirOnExportFailure(::Core::PathBuffer<::std::string> const& pathToOutputDir);
64
65 MCAPI static void _exportSubcommand(
66 ::CommandOrigin const&,
67 ::CommandOutput& output,
68 ::ProjectCommand::ExportSubcommandTypes commandExportType,
69 ::ActorUniqueID callingPlayerUniqueId
70 );
71
72 MCAPI static ::Core::PathBuffer<::std::string> _getLevelExportPath(
73 ::ActorUniqueID callingPlayerUniqueId,
74 ::Level* level,
75 ::std::string const& exportFileExtension
76 );
77
78 MCAPI static void _outputFormattedCommand(
79 ::ActorUniqueID callingPlayerUniqueId,
80 ::Level* level,
81 ::std::string const& prefix,
82 ::std::string const& commandType,
83 ::std::string const& msg,
84 ::std::vector<::std::string> const& args
85 );
86
87 MCAPI static void _reportErrorToUser(
88 ::ActorUniqueID callingPlayerUniqueId,
89 ::Level* level,
90 ::std::string const& commandType,
91 ::std::string const& msg,
92 ::std::vector<::std::string> const& args
93 );
94
95 MCAPI static void _reportToUser(
96 ::ActorUniqueID callingPlayerUniqueId,
97 ::Level* level,
98 ::std::string const& commandType,
99 ::std::string const& msg,
100 ::std::vector<::std::string> const& args
101 );
102
103 MCAPI static void setup(::CommandRegistry& registry);
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
110
111
112 // NOLINTEND
113
114public:
115 // vftables
116 // NOLINTBEGIN
117 MCNAPI static void** $vftable();
118 // NOLINTEND
119};
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:47
Definition PathBuffer.h:8
Definition Level.h:249
static MCAPI void ** $vftable()
Definition ServerCommand.h:22
Definition ActorUniqueID.h:5
Definition Alias.h:14