|
Botcraft 1.21.10
|
#include <Tag.hpp>
Public Member Functions | |
| const std::string & | GetName () const |
| template<typename T > | |
| bool | is () const |
| template<typename T , std::enable_if_t< std::is_convertible_v< std::vector< T >, Internal::TagListVariant >, bool > = true> | |
| bool | is_list_of () const |
| template<typename T , std::enable_if_t< std::is_same_v< T, TagByte >||std::is_same_v< T, TagShort >||std::is_same_v< T, TagInt >||std::is_same_v< T, TagLong >||std::is_same_v< T, TagFloat >||std::is_same_v< T, TagDouble >, bool > = true> | |
| T | get () const |
| template<typename T , std::enable_if_t< std::is_same_v< T, TagByteArray >||std::is_same_v< T, TagString >||std::is_same_v< T, TagList >||std::is_same_v< T, TagCompound >||std::is_same_v< T, TagIntArray >||std::is_same_v< T, TagLongArray >, bool > = true> | |
| const T & | get () const |
| template<typename T , std::enable_if_t< std::is_convertible_v< std::vector< T >, Internal::TagListVariant >, bool > = true> | |
| const std::vector< T > & | as_list_of () const |
| const Tag & | operator[] (const std::string &s) const |
| size_t | size () const |
| bool | contains (const std::string &s) const |
Public Member Functions inherited from ProtocolCraft::NetworkType | |
| virtual | ~NetworkType () |
| virtual void | Read (ReadIterator &iter, size_t &length) |
| virtual void | Write (WriteContainer &container) const |
| virtual Json::Value | Serialize () const |
Protected Member Functions | |
| void | ReadUnnamedImpl (ReadIterator &iter, size_t &length) |
| void | WriteUnnamedImpl (WriteContainer &container) const |
| virtual void | ReadImpl (ReadIterator &iter, size_t &length) override |
| virtual void | WriteImpl (WriteContainer &container) const override |
| virtual Json::Value | SerializeImpl () const override |
Private Attributes | |
| Internal::TagVariant | val |
| std::string | name |
| const std::vector< T > & ProtocolCraft::NBT::Tag::as_list_of | ( | ) | const |
Definition at line 264 of file Tag.hpp.
References val.
Referenced by Botcraft::Utilities::GetEnchantmentLvl().
| bool ProtocolCraft::NBT::Tag::contains | ( | const std::string & | s | ) | const |
Definition at line 404 of file Tag.cpp.
Referenced by Botcraft::Utilities::GetDamageCount(), and Botcraft::Utilities::GetEnchantmentLvl().
| T ProtocolCraft::NBT::Tag::get | ( | ) | const |
Definition at line 209 of file Tag.hpp.
References val.
Referenced by get(), Botcraft::Utilities::GetDamageCount(), and Botcraft::World::Handle().
| const T & ProtocolCraft::NBT::Tag::get | ( | ) | const |
| const std::string & ProtocolCraft::NBT::Tag::GetName | ( | ) | const |
Definition at line 89 of file Tag.cpp.
References name.
Referenced by ProtocolCraft::NBT::TagCompound::ReadImpl(), and SerializeImpl().
| bool ProtocolCraft::NBT::Tag::is | ( | ) | const |
Definition at line 173 of file Tag.hpp.
References val.
Referenced by Botcraft::Utilities::GetDamageCount(), and ProtocolCraft::NBT::TagCompound::ReadImpl().
| bool ProtocolCraft::NBT::Tag::is_list_of | ( | ) | const |
Definition at line 193 of file Tag.hpp.
Referenced by Botcraft::Utilities::GetEnchantmentLvl().
| const Tag & ProtocolCraft::NBT::Tag::operator[] | ( | const std::string & | s | ) | const |
|
overrideprotectedvirtual |
Implements ProtocolCraft::NetworkType.
Reimplemented in ProtocolCraft::Chat, ProtocolCraft::NBT::UnnamedValue, and ProtocolCraft::NBT::Value.
Definition at line 215 of file Tag.cpp.
References name, ProtocolCraft::NBT::ReadNBTString(), ProtocolCraft::NBT::TagByte, ProtocolCraft::NBT::TagByteArray, ProtocolCraft::NBT::TagCompound, ProtocolCraft::NBT::TagDouble, ProtocolCraft::NBT::TagEnd, ProtocolCraft::NBT::TagFloat, ProtocolCraft::NBT::TagInt, ProtocolCraft::NBT::TagIntArray, ProtocolCraft::NBT::TagList, ProtocolCraft::NBT::TagLong, ProtocolCraft::NBT::TagLongArray, ProtocolCraft::NBT::TagShort, ProtocolCraft::NBT::TagString, and val.
Referenced by ProtocolCraft::NBT::Value::ReadImpl().
|
protected |
Definition at line 94 of file Tag.cpp.
References name, ProtocolCraft::NBT::ReadNBTString(), ProtocolCraft::NBT::TagByte, ProtocolCraft::NBT::TagByteArray, ProtocolCraft::NBT::TagCompound, ProtocolCraft::NBT::TagDouble, ProtocolCraft::NBT::TagEnd, ProtocolCraft::NBT::TagFloat, ProtocolCraft::NBT::TagInt, ProtocolCraft::NBT::TagIntArray, ProtocolCraft::NBT::TagList, ProtocolCraft::NBT::TagLong, ProtocolCraft::NBT::TagLongArray, ProtocolCraft::NBT::TagShort, ProtocolCraft::NBT::TagString, and val.
Referenced by ProtocolCraft::Chat::ReadImpl(), and ProtocolCraft::NBT::UnnamedValue::ReadImpl().
|
overrideprotectedvirtual |
Implements ProtocolCraft::NetworkType.
Definition at line 329 of file Tag.cpp.
References ProtocolCraft::Json::Value::get(), GetName(), and val.
| size_t ProtocolCraft::NBT::Tag::size | ( | ) | const |
|
overrideprotectedvirtual |
Implements ProtocolCraft::NetworkType.
Reimplemented in ProtocolCraft::Chat, and ProtocolCraft::NBT::UnnamedValue.
Definition at line 276 of file Tag.cpp.
References name, val, and ProtocolCraft::NBT::WriteNBTString().
|
protected |
Definition at line 159 of file Tag.cpp.
References val, and ProtocolCraft::NBT::WriteNBTString().
Referenced by ProtocolCraft::Chat::WriteImpl(), and ProtocolCraft::NBT::UnnamedValue::WriteImpl().
|
private |
Definition at line 124 of file Tag.hpp.
Referenced by GetName(), ReadImpl(), ReadUnnamedImpl(), and WriteImpl().
|
private |
Definition at line 123 of file Tag.hpp.
Referenced by as_list_of(), get(), is(), operator[](), ReadImpl(), ReadUnnamedImpl(), SerializeImpl(), size(), WriteImpl(), and WriteUnnamedImpl().