LeviLamina
Loading...
Searching...
No Matches
DynamicProperties.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class CompoundTag;
8class Vec3;
9namespace cereal { struct ReflectionCtx; }
10// clang-format on
11
13public:
14 // DynamicProperties inner types declare
15 // clang-format off
16 struct PropertyCollection;
17 // clang-format on
18
19 // DynamicProperties inner types define
21 public:
22 // member variables
23 // NOLINTBEGIN
26 // NOLINTEND
27
28 public:
29 // prevent constructor by default
30 PropertyCollection& operator=(PropertyCollection const&);
33
34 public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI ::DynamicProperties::PropertyCollection& operator=(::DynamicProperties::PropertyCollection&&);
38 // NOLINTEND
39
40 public:
41 // static functions
42 // NOLINTBEGIN
43 MCAPI static void fromVariantMap(
45 ::std::unordered_map<::std::string, ::std::variant<double, float, bool, ::std::string, ::Vec3>> const&
46 properties
47 );
48
49 MCAPI static ::std::unordered_map<::std::string, ::std::variant<double, float, bool, ::std::string, ::Vec3>>
50 toVariantMap(::DynamicProperties::PropertyCollection const& collection);
51 // NOLINTEND
52 };
53
54public:
55 // member variables
56 // NOLINTBEGIN
58 // NOLINTEND
59
60public:
61 // prevent constructor by default
62 DynamicProperties& operator=(DynamicProperties const&);
65
66public:
67 // member functions
68 // NOLINTBEGIN
70
71 MCAPI void deserialize(::CompoundTag const& root, ::cereal::ReflectionCtx const& ctx);
72
73 MCAPI ::std::vector<::std::string> getDynamicPropertyIds(::std::string const& collectionName) const;
74
75 MCAPI bool removeDynamicProperty(::std::string const& key, ::std::string const& collectionName);
76
77 MCAPI ::std::unique_ptr<::CompoundTag> serialize(::cereal::ReflectionCtx const& ctx) const;
78
79 MCAPI void setDynamicProperty(
80 ::std::string const& key,
81 ::std::variant<double, float, bool, ::std::string, ::Vec3> const& value,
82 ::std::string const& collectionName
83 );
84
85 MCAPI void updateCollectionName(::std::string const& from, ::std::string const& to);
86
87 MCAPI ~DynamicProperties();
88 // NOLINTEND
89
90public:
91 // static functions
92 // NOLINTBEGIN
93 MCAPI static ::std::optional<::std::string> validateDynamicProperty(
94 ::std::string const& key,
95 ::std::variant<double, float, bool, ::std::string, ::Vec3> const* value
96 );
97 // NOLINTEND
98
99public:
100 // static variables
101 // NOLINTBEGIN
102 MCAPI static ::std::string const& STORAGE_TAG();
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108 MCAPI void* $ctor(::DynamicProperties&&);
109 // NOLINTEND
110
111public:
112 // destructor thunk
113 // NOLINTBEGIN
114 MCAPI void $dtor();
115 // NOLINTEND
116};
Definition CompoundTag.h:13
Definition DynamicProperties.h:12
Definition Vec3.h:10
Definition DynamicProperties.h:20
Definition ReflectionCtx.h:11
Definition ctx.h:5
Definition Alias.h:14
Definition serialize.h:11