LeviLamina
Loading...
Searching...
No Matches
CompoundTag Class Reference
+ Inheritance diagram for CompoundTag:

Public Types

using TagMap = std::map<std::string, CompoundTagVariant, std::less<void>>
 
using iterator = TagMap::iterator
 
using const_iterator = TagMap::const_iterator
 
using reverse_iterator = TagMap::reverse_iterator
 
using const_reverse_iterator = TagMap::const_reverse_iterator
 
enum class  Type : uchar {
  End = 0x0 , Byte = 0x1 , Short = 0x2 , Int = 0x3 ,
  Int64 = 0x4 , Float = 0x5 , Double = 0x6 , ByteArray = 0x7 ,
  String = 0x8 , List = 0x9 , Compound = 0xA , IntArray = 0xB
}
 

Public Member Functions

 CompoundTag (TagMap tags)
 
 CompoundTag (std::initializer_list< TagMap::value_type > tagPairs)
 
 CompoundTag (CompoundTag const &)=default
 
CompoundTagoperator= (CompoundTag const &)=default
 
 CompoundTag (CompoundTag &&)=default
 
CompoundTagoperator= (CompoundTag &&)=default
 
CompoundTagVariantoperator[] (std::string_view index)
 
CompoundTagVariant const & operator[] (std::string_view index) const
 
CompoundTagVariantat (std::string_view index)
 
CompoundTagVariant const & at (std::string_view index) const
 
LLNDAPI std::string toBinaryNbt (bool isLittleEndian=true) const
 
LLNDAPI std::string toNetworkNbt () const
 
size_t size () const noexcept
 
bool empty () const noexcept
 
auto begin () noexcept
 
auto begin () const noexcept
 
auto end () noexcept
 
auto end () const noexcept
 
auto rbegin () noexcept
 
auto rbegin () const noexcept
 
auto rend () noexcept
 
auto rend () const noexcept
 
auto cbegin () const noexcept
 
auto cend () const noexcept
 
auto crbegin () const noexcept
 
auto crend () const noexcept
 
bool erase (std::string_view name)
 
void rename (std::string_view name, std::string_view newName)
 
virtual void write (::IDataOutput &dos) const
 
virtual ::Bedrock::Result< void > load (::IDataInput &dis)
 
virtual::Tag::Type getId () const
 
virtual::std::string toString () const
 
virtual void print (::std::string const &prefix, ::PrintStream &out) const
 
virtual ::std::unique_ptr<::Tagcopy () const
 
virtual uint64 hash () const
 
virtual bool equals (::Tag const &obj) const
 
MCAPI void append (::CompoundTag const &tag)
 
MCAPI ::std::unique_ptr<::CompoundTagclone () const
 
MCAPI bool contains (::std::string_view name) const
 
MCAPI bool contains (::std::string_view name, ::Tag::Type type) const
 
MCAPI void * $ctor ()
 
MCAPI void * $ctor (::CompoundTag &&rhs)
 
MCFOLD void $dtor ()
 
MCAPI void $write (::IDataOutput &dos) const
 
MCAPI ::Bedrock::Result< void > $load (::IDataInput &dis)
 
MCAPI::Tag::Type $getId () const
 
MCAPI::std::string $toString () const
 
MCAPI void $print (::std::string const &prefix, ::PrintStream &out) const
 
MCAPI ::std::unique_ptr<::Tag$copy () const
 
MCAPI uint64 $hash () const
 
MCAPI bool $equals (::Tag const &obj) const
 
template<std::derived_from< Tag > T>
T const * as_ptr () const
 
template<std::derived_from< Tag > T>
T * as_ptr ()
 
template<std::derived_from< Tag > T>
T const & as () const
 
template<std::derived_from< Tag > T>
T & as ()
 
bool operator== (Tag const &other) const
 
LLNDAPI std::string toSnbt (SnbtFormat snbtFormat=SnbtFormat::PrettyFilePrint, uchar indent=4) const noexcept
 
virtual void deleteChildren ()
 
virtual void print (::PrintStream &out) const
 
MCFOLD void $deleteChildren ()
 
MCAPI void $print (::PrintStream &out) const
 

Static Public Member Functions

static LLNDAPI ll::Expected< CompoundTagfromSnbt (std::string_view snbt, optional_ref< size_t > parsedLength=std::nullopt) noexcept
 
static LLNDAPI ll::Expected< CompoundTagfromBinaryNbt (std::string_view dataView, bool isLittleEndian=true) noexcept
 
static LLNDAPI ll::Expected< CompoundTagfromNetworkNbt (std::string const &data) noexcept
 
static MCAPI void ** $vftable ()
 
static MCAPI ::std::string getTagName (::Tag::Type type)
 
static MCAPI ::Bedrock::Result<::std::unique_ptr<::Tag > > newTag (::Tag::Type type)
 
static MCAPI ::std::string const & NullString ()
 

Public Attributes

TagMap mTags
 

Member Function Documentation

◆ write()

virtual void CompoundTag::write ( ::IDataOutput & dos) const
virtual

Implements Tag.

◆ load()

virtual ::Bedrock::Result< void > CompoundTag::load ( ::IDataInput & dis)
virtual

Implements Tag.

◆ getId()

virtual::Tag::Type CompoundTag::getId ( ) const
virtual

Implements Tag.

◆ toString()

virtual::std::string CompoundTag::toString ( ) const
virtual

Implements Tag.

◆ print()

virtual void CompoundTag::print ( ::std::string const & prefix,
::PrintStream & out ) const
virtual

Reimplemented from Tag.

◆ copy()

virtual ::std::unique_ptr<::Tag > CompoundTag::copy ( ) const
virtual

Implements Tag.

◆ hash()

virtual uint64 CompoundTag::hash ( ) const
virtual

Implements Tag.

◆ equals()

virtual bool CompoundTag::equals ( ::Tag const & obj) const
virtual

Reimplemented from Tag.


The documentation for this class was generated from the following files: