LeviLamina
Loading...
Searching...
No Matches
ListTag.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/nbt/UniqueTagPtr.h"
5
6// auto generated inclusion list
7#include "mc/nbt/Tag.h"
8#include "mc/platform/Result.h"
9
11
12class ListTag : public ::Tag, public std::vector<UniqueTagPtr> {
13public:
14 using List = std::vector<UniqueTagPtr>;
15 Tag::Type mType{Tag::End};
16
17 using Tag::operator==;
18
19public:
20 [[nodiscard]] constexpr ListTag() = default;
21
22 [[nodiscard]] constexpr ListTag(List tags) : List(std::move(tags)) {
23 if (!empty()) mType = front().getId();
24 }
25 [[nodiscard]] constexpr ListTag(std::initializer_list<CompoundTagVariant> tags);
26 [[nodiscard]] constexpr ListTag(std::vector<CompoundTagVariant> tags);
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 // vIndex: 2
32 virtual void write(::IDataOutput& dos) const /*override*/;
33
34 // vIndex: 3
35 virtual ::Bedrock::Result<void> load(::IDataInput& dis) /*override*/;
36
37 // vIndex: 5
38 virtual ::Tag::Type getId() const /*override*/;
39
40 // vIndex: 4
41 virtual ::std::string toString() const /*override*/;
42
43 // vIndex: 7
44 virtual void print(::std::string const& prefix, ::PrintStream& out) const /*override*/;
45
46 // vIndex: 9
47 virtual ::std::unique_ptr<::Tag> copy() const /*override*/;
48
49 // vIndex: 10
50 virtual uint64 hash() const /*override*/;
51
52 // vIndex: 6
53 virtual bool equals(::Tag const& rhs) const /*override*/;
54
55 // vIndex: 1
56 virtual void deleteChildren() /*override*/;
57
58 // vIndex: 0
59 virtual ~ListTag() /*override*/ = default;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI void add(::std::unique_ptr<::Tag> tag);
66
67 MCAPI ::std::unique_ptr<::ListTag> copyList() const;
68
69 MCAPI void forEachCompoundTag(::std::function<void(::CompoundTag const&)> func) const;
70
71 MCAPI ::Tag* get(int index) const;
72
73 MCAPI ::CompoundTag* getCompound(uint64 index);
74
75 MCAPI float getFloat(int index) const;
76
77 MCFOLD int size() const;
78 // NOLINTEND
79
80public:
81 // destructor thunk
82 // NOLINTBEGIN
83 MCAPI void $dtor();
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI void $write(::IDataOutput& dos) const;
90
91 MCAPI ::Bedrock::Result<void> $load(::IDataInput& dis);
92
93 MCFOLD ::Tag::Type $getId() const;
94
95 MCAPI ::std::string $toString() const;
96
97 MCAPI void $print(::std::string const& prefix, ::PrintStream& out) const;
98
99 MCAPI ::std::unique_ptr<::Tag> $copy() const;
100
101 MCAPI uint64 $hash() const;
102
103 MCAPI bool $equals(::Tag const& rhs) const;
104
105 MCAPI void $deleteChildren();
106 // NOLINTEND
107
108public:
109 // vftables
110 // NOLINTBEGIN
111 MCAPI static void** $vftable();
112 // NOLINTEND
113};
Definition CompoundTagVariant.h:38
Definition CompoundTag.h:13
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition ListTag.h:12
Definition PrintStream.h:5
Definition Tag.h:39