LeviLamina
Loading...
Searching...
No Matches
CommandParameterData.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/typeid_t.h"
7#include "mc/server/commands/CommandParameterDataType.h"
8#include "mc/server/commands/CommandParameterOption.h"
9#include "mc/server/commands/CommandRegistry.h"
10
11// auto generated forward declare list
12// clang-format off
13class Command;
14class CommandOrigin;
15class CommandRegistry;
16// clang-format on
17
19public:
20 // CommandParameterData inner types define
21 using ParseFunction = bool (::CommandRegistry::*)(
22 void*,
24 ::CommandOrigin const&,
25 int,
26 ::std::string&,
27 ::std::vector<::std::string>&
28 ) const;
29
30 using CustomStorageGetFn = void* (*)(::Command*, int);
31
32 using CustomStorageIsSetFn = bool* (*)(::Command*, int);
33
34public:
35 // member variables
36 // NOLINTBEGIN
38 ParseFunction mParse;
39 ::std::string mName;
40 char const* mEnumNameOrPostfix;
41 CommandRegistry::Symbol mEnumOrPostfixSymbol;
42 char const* mChainedSubcommand;
43 CommandRegistry::Symbol mChainedSubcommandSymbol;
44 ::CommandParameterDataType mParamType;
45 int mOffset;
46 int mSetOffset;
47 bool mIsOptional;
48 ::CommandParameterOption mOptions;
49 ::ll::TypedStorage<8, 8, void* (*)(::Command*, int)> mValueGetFn{};
50 ::ll::TypedStorage<8, 8, bool* (*)(::Command*, int)> mValueIsSetFn{};
51 // NOLINTEND
52
53
54public:
55 void addOptions(::CommandParameterOption option) {
56 using T = std::underlying_type_t<::CommandParameterOption>;
57 mOptions = static_cast<::CommandParameterOption>((T)option | (T)mOptions);
58 }
59
60 CommandParameterData() = default;
61
64 ParseFunction parser,
65 std::string name,
66 ::CommandParameterDataType type,
67 char const* enumNameOrPostfix,
68 char const* subChain,
69 int offset,
70 bool optional,
71 int flagOffset,
72 CommandParameterOption options
73 );
74
75 LLNDAPI bool operator==(CommandParameterData const& other) const;
76
78 CommandParameterData& operator=(CommandParameterData const&) = default;
79
80public:
81 // destructor thunk
82 // NOLINTBEGIN
83 MCNAPI void $dtor();
84 // NOLINTEND
85};
Definition typeid_t.h:25
Definition CommandOrigin.h:32
Definition CommandParameterData.h:18
MCAPI void $dtor()
Definition CommandRegistry.h:196
Definition CommandRegistry.h:45
Definition Command.h:17
Definition CommandRegistry.h:336