LeviLamina
Loading...
Searching...
No Matches
ExprToken.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/ExprTokenType.h"
7#include "mc/client/gui/LiteralType.h"
8#include "mc/client/gui/OperatorType.h"
9#include "mc/client/gui/UiExpression.h"
10#include "mc/deps/json/Value.h"
11
12class ExprToken {
13public:
14 // ExprToken inner types define
15 enum class StringOption : int {
16 EvaluateAsExpression = 0,
17 KeepAsString = 1,
18 };
19
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<1, 1, ::OperatorType> mOperatorType;
24 ::ll::TypedStorage<1, 1, ::LiteralType> mLiteralType;
25 ::ll::TypedStorage<1, 1, ::ExprTokenType> mTokenType;
26 ::ll::TypedStorage<8, 40, ::std::variant<::Json::Value, ::UiExpression>> mValue;
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
31 ExprToken(ExprToken const&);
32 ExprToken();
33
34public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI void _parseToken(::std::string_view str);
38
39 MCAPI bool asBool() const;
40
41 MCAPI float asFloat() const;
42
43 MCAPI int asInt() const;
44
45 MCAPI ::std::string_view asString() const;
46
47 MCAPI ::ExprToken& operator=(::ExprToken const&);
48
49 MCAPI ::ExprToken& operator=(::ExprToken&&);
50
51 MCAPI ~ExprToken();
52 // NOLINTEND
53
54public:
55 // static functions
56 // NOLINTBEGIN
57 MCAPI static ::ExprToken createBoolToken(bool fromBool);
58
59 MCAPI static ::ExprToken createFloatToken(float fromFloat);
60
61 MCAPI static ::ExprToken createIntToken(int fromInt);
62
63 MCAPI static ::ExprToken createStringToken(::std::string_view fromStr, ::ExprToken::StringOption evalString);
64 // NOLINTEND
65
66public:
67 // destructor thunk
68 // NOLINTBEGIN
69 MCAPI void $dtor();
70 // NOLINTEND
71};
Definition ExprToken.h:5