chenjunfu2-nbt-cpp v2.1.0
一个基于CPP20的NBT(Named Binary Tag)库
载入中...
搜索中...
未找到
NBT_Compound< Compound > 模板类 参考

继承自标准库std::unordered_map的代理类,用于存储和管理NBT键值对 更多...

#include <NBT_Compound.hpp>

类 NBT_Compound< Compound > 继承关系图:

Public 成员函数

template<typename... Args>
 NBT_Compound (Args &&... args)
 完美转发构造函数
 NBT_Compound (std::initializer_list< typename Compound::value_type > init)
 初始化列表构造函数
 NBT_Compound (void)=default
 默认构造函数
 ~NBT_Compound (void)=default
 默认析构函数
 NBT_Compound (NBT_Compound &&_Move) noexcept
 移动构造函数
 NBT_Compound (const NBT_Compound &_Copy) noexcept
 拷贝构造函数
NBT_Compoundoperator= (NBT_Compound &&_Move) noexcept
 移动赋值运算符
NBT_Compoundoperator= (const NBT_Compound &_Copy)
 拷贝赋值运算符
const Compound & GetData (void) const noexcept
 获取底层容器数据的常量引用
bool operator== (const NBT_Compound &_Right) const noexcept
 相等比较运算符
bool operator!= (const NBT_Compound &_Right) const noexcept
 不等比较运算符
std::partial_ordering operator<=> (const NBT_Compound &_Right) const noexcept
 三路比较运算符
std::vector< typename Compound::iterator > KeySortIt (void)
 获取按键名排序的迭代器向量(非常量版本)
std::vector< typename Compound::const_iterator > KeySortIt (void) const
 获取按键名排序的常量迭代器向量(常量版本)
Compound::mapped_type & Get (const typename Compound::key_type &sTagName)
 根据标签名获取对应的NBT值
const Compound::mapped_type & Get (const typename Compound::key_type &sTagName) const
 根据标签名获取对应的NBT值(常量版本)
Compound::mapped_type * Has (const typename Compound::key_type &sTagName) noexcept
 搜索标签是否存在
const Compound::mapped_type * Has (const typename Compound::key_type &sTagName) const noexcept
 搜索标签是否存在(常量版本)
template<typename K, typename V>
requires std::constructible_from<typename Compound::key_type, K &&> &&std::constructible_from<typename Compound::mapped_type, V &&>
std::pair< typename Compound::iterator, bool > Put (K &&sTagName, V &&vTagVal)
 插入或替换键值对
template<typename K, typename V>
requires std::constructible_from<typename Compound::key_type, K &&> &&std::constructible_from<typename Compound::mapped_type, V &&>
std::pair< typename Compound::iterator, bool > TryPut (K &&sTagName, V &&vTagVal)
 原位构造键值对
bool Remove (const typename Compound::key_type &sTagName)
 删除指定标签
void Clear (void)
 清空所有标签
bool Empty (void) const noexcept
 检查容器是否为空
Compound::size_type Size (void) const noexcept
 获取容器中元素的数量
void Merge (const NBT_Compound &_Copy)
 合并另一个NBT_Compound的内容(拷贝)
void Merge (NBT_Compound &&_Move)
 合并另一个NBT_Compound的内容(移动)
bool Contains (const typename Compound::key_type &sTagName) const noexcept
 检查是否包含指定标签
template<typename Predicate>
bool ContainsIf (Predicate pred) const noexcept
 使用谓词检查是否存在满足条件的元素
针对每种类型提供一个方便使用的函数,由宏批量生成

具体作用说明:

  • Get开头+类型名的函数:直接获取指定标签名且对应类型的引用,异常由std::unordered_map的at与std::get具体实现决定
  • Has开头 + 类型名的函数:判断指定标签名是否存在,且标签名对应的类型是否是指定类型,都符合则返回对应指针,否则返回NULL指针
bool ContainsEnd (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 End 类型数据
const NBT_Type::EndGetEnd (const typename Compound::key_type &sTagName) const
 获取指定标签名的 End 类型数据(常量版本)
NBT_Type::EndGetEnd (const typename Compound::key_type &sTagName)
 获取指定标签名的 End 类型数据
const NBT_Type::EndHasEnd (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 End 类型数据(常量版本)
NBT_Type::EndHasEnd (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 End 类型数据
bool ContainsByte (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 Byte 类型数据
const NBT_Type::ByteGetByte (const typename Compound::key_type &sTagName) const
 获取指定标签名的 Byte 类型数据(常量版本)
NBT_Type::ByteGetByte (const typename Compound::key_type &sTagName)
 获取指定标签名的 Byte 类型数据
const NBT_Type::ByteHasByte (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 Byte 类型数据(常量版本)
NBT_Type::ByteHasByte (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 Byte 类型数据
bool ContainsShort (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 Short 类型数据
const NBT_Type::ShortGetShort (const typename Compound::key_type &sTagName) const
 获取指定标签名的 Short 类型数据(常量版本)
NBT_Type::ShortGetShort (const typename Compound::key_type &sTagName)
 获取指定标签名的 Short 类型数据
const NBT_Type::ShortHasShort (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 Short 类型数据(常量版本)
NBT_Type::ShortHasShort (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 Short 类型数据
bool ContainsInt (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 Int 类型数据
const NBT_Type::IntGetInt (const typename Compound::key_type &sTagName) const
 获取指定标签名的 Int 类型数据(常量版本)
NBT_Type::IntGetInt (const typename Compound::key_type &sTagName)
 获取指定标签名的 Int 类型数据
const NBT_Type::IntHasInt (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 Int 类型数据(常量版本)
NBT_Type::IntHasInt (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 Int 类型数据
bool ContainsLong (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 Long 类型数据
const NBT_Type::LongGetLong (const typename Compound::key_type &sTagName) const
 获取指定标签名的 Long 类型数据(常量版本)
NBT_Type::LongGetLong (const typename Compound::key_type &sTagName)
 获取指定标签名的 Long 类型数据
const NBT_Type::LongHasLong (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 Long 类型数据(常量版本)
NBT_Type::LongHasLong (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 Long 类型数据
bool ContainsFloat (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 Float 类型数据
const NBT_Type::FloatGetFloat (const typename Compound::key_type &sTagName) const
 获取指定标签名的 Float 类型数据(常量版本)
NBT_Type::FloatGetFloat (const typename Compound::key_type &sTagName)
 获取指定标签名的 Float 类型数据
const NBT_Type::FloatHasFloat (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 Float 类型数据(常量版本)
NBT_Type::FloatHasFloat (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 Float 类型数据
bool ContainsDouble (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 Double 类型数据
const NBT_Type::DoubleGetDouble (const typename Compound::key_type &sTagName) const
 获取指定标签名的 Double 类型数据(常量版本)
NBT_Type::DoubleGetDouble (const typename Compound::key_type &sTagName)
 获取指定标签名的 Double 类型数据
const NBT_Type::DoubleHasDouble (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 Double 类型数据(常量版本)
NBT_Type::DoubleHasDouble (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 Double 类型数据
bool ContainsByteArray (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 ByteArray 类型数据
const NBT_Type::ByteArrayGetByteArray (const typename Compound::key_type &sTagName) const
 获取指定标签名的 ByteArray 类型数据(常量版本)
NBT_Type::ByteArrayGetByteArray (const typename Compound::key_type &sTagName)
 获取指定标签名的 ByteArray 类型数据
const NBT_Type::ByteArrayHasByteArray (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 ByteArray 类型数据(常量版本)
NBT_Type::ByteArrayHasByteArray (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 ByteArray 类型数据
bool ContainsIntArray (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 IntArray 类型数据
const NBT_Type::IntArrayGetIntArray (const typename Compound::key_type &sTagName) const
 获取指定标签名的 IntArray 类型数据(常量版本)
NBT_Type::IntArrayGetIntArray (const typename Compound::key_type &sTagName)
 获取指定标签名的 IntArray 类型数据
const NBT_Type::IntArrayHasIntArray (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 IntArray 类型数据(常量版本)
NBT_Type::IntArrayHasIntArray (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 IntArray 类型数据
bool ContainsLongArray (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 LongArray 类型数据
const NBT_Type::LongArrayGetLongArray (const typename Compound::key_type &sTagName) const
 获取指定标签名的 LongArray 类型数据(常量版本)
NBT_Type::LongArrayGetLongArray (const typename Compound::key_type &sTagName)
 获取指定标签名的 LongArray 类型数据
const NBT_Type::LongArrayHasLongArray (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 LongArray 类型数据(常量版本)
NBT_Type::LongArrayHasLongArray (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 LongArray 类型数据
bool ContainsString (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 String 类型数据
const NBT_Type::StringGetString (const typename Compound::key_type &sTagName) const
 获取指定标签名的 String 类型数据(常量版本)
NBT_Type::StringGetString (const typename Compound::key_type &sTagName)
 获取指定标签名的 String 类型数据
const NBT_Type::StringHasString (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 String 类型数据(常量版本)
NBT_Type::StringHasString (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 String 类型数据
bool ContainsList (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 List 类型数据
const NBT_Type::ListGetList (const typename Compound::key_type &sTagName) const
 获取指定标签名的 List 类型数据(常量版本)
NBT_Type::ListGetList (const typename Compound::key_type &sTagName)
 获取指定标签名的 List 类型数据
const NBT_Type::ListHasList (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 List 类型数据(常量版本)
NBT_Type::ListHasList (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 List 类型数据
bool ContainsCompound (const typename Compound::key_type &sTagName) const
 检查是否包含指定标签名的 Compound 类型数据
const NBT_Type::CompoundGetCompound (const typename Compound::key_type &sTagName) const
 获取指定标签名的 Compound 类型数据(常量版本)
NBT_Type::CompoundGetCompound (const typename Compound::key_type &sTagName)
 获取指定标签名的 Compound 类型数据
const NBT_Type::CompoundHasCompound (const typename Compound::key_type &sTagName) const noexcept
 安全检查并获取指定标签名的 Compound 类型数据(常量版本)
NBT_Type::CompoundHasCompound (const typename Compound::key_type &sTagName) noexcept
 安全检查并获取指定标签名的 Compound 类型数据
针对每种类型提供插入函数,由宏批量生成

具体作用说明:

  • Put开头+类型名的函数:插入指定类型的数据到指定标签名
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutEnd (K &&sTagName, const typename NBT_Type::End &vTagVal)
 插入或替换 End 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutEnd (K &&sTagName, typename NBT_Type::End &&vTagVal)
 插入或替换 End 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutEnd (K &&sTagName, const typename NBT_Type::End &vTagVal)
 尝试插入 End 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutEnd (K &&sTagName, typename NBT_Type::End &&vTagVal)
 尝试插入 End 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutByte (K &&sTagName, const typename NBT_Type::Byte &vTagVal)
 插入或替换 Byte 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutByte (K &&sTagName, typename NBT_Type::Byte &&vTagVal)
 插入或替换 Byte 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutByte (K &&sTagName, const typename NBT_Type::Byte &vTagVal)
 尝试插入 Byte 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutByte (K &&sTagName, typename NBT_Type::Byte &&vTagVal)
 尝试插入 Byte 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutShort (K &&sTagName, const typename NBT_Type::Short &vTagVal)
 插入或替换 Short 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutShort (K &&sTagName, typename NBT_Type::Short &&vTagVal)
 插入或替换 Short 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutShort (K &&sTagName, const typename NBT_Type::Short &vTagVal)
 尝试插入 Short 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutShort (K &&sTagName, typename NBT_Type::Short &&vTagVal)
 尝试插入 Short 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutInt (K &&sTagName, const typename NBT_Type::Int &vTagVal)
 插入或替换 Int 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutInt (K &&sTagName, typename NBT_Type::Int &&vTagVal)
 插入或替换 Int 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutInt (K &&sTagName, const typename NBT_Type::Int &vTagVal)
 尝试插入 Int 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutInt (K &&sTagName, typename NBT_Type::Int &&vTagVal)
 尝试插入 Int 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutLong (K &&sTagName, const typename NBT_Type::Long &vTagVal)
 插入或替换 Long 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutLong (K &&sTagName, typename NBT_Type::Long &&vTagVal)
 插入或替换 Long 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutLong (K &&sTagName, const typename NBT_Type::Long &vTagVal)
 尝试插入 Long 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutLong (K &&sTagName, typename NBT_Type::Long &&vTagVal)
 尝试插入 Long 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutFloat (K &&sTagName, const typename NBT_Type::Float &vTagVal)
 插入或替换 Float 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutFloat (K &&sTagName, typename NBT_Type::Float &&vTagVal)
 插入或替换 Float 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutFloat (K &&sTagName, const typename NBT_Type::Float &vTagVal)
 尝试插入 Float 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutFloat (K &&sTagName, typename NBT_Type::Float &&vTagVal)
 尝试插入 Float 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutDouble (K &&sTagName, const typename NBT_Type::Double &vTagVal)
 插入或替换 Double 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutDouble (K &&sTagName, typename NBT_Type::Double &&vTagVal)
 插入或替换 Double 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutDouble (K &&sTagName, const typename NBT_Type::Double &vTagVal)
 尝试插入 Double 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutDouble (K &&sTagName, typename NBT_Type::Double &&vTagVal)
 尝试插入 Double 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutByteArray (K &&sTagName, const typename NBT_Type::ByteArray &vTagVal)
 插入或替换 ByteArray 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutByteArray (K &&sTagName, typename NBT_Type::ByteArray &&vTagVal)
 插入或替换 ByteArray 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutByteArray (K &&sTagName, const typename NBT_Type::ByteArray &vTagVal)
 尝试插入 ByteArray 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutByteArray (K &&sTagName, typename NBT_Type::ByteArray &&vTagVal)
 尝试插入 ByteArray 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutIntArray (K &&sTagName, const typename NBT_Type::IntArray &vTagVal)
 插入或替换 IntArray 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutIntArray (K &&sTagName, typename NBT_Type::IntArray &&vTagVal)
 插入或替换 IntArray 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutIntArray (K &&sTagName, const typename NBT_Type::IntArray &vTagVal)
 尝试插入 IntArray 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutIntArray (K &&sTagName, typename NBT_Type::IntArray &&vTagVal)
 尝试插入 IntArray 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutLongArray (K &&sTagName, const typename NBT_Type::LongArray &vTagVal)
 插入或替换 LongArray 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutLongArray (K &&sTagName, typename NBT_Type::LongArray &&vTagVal)
 插入或替换 LongArray 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutLongArray (K &&sTagName, const typename NBT_Type::LongArray &vTagVal)
 尝试插入 LongArray 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutLongArray (K &&sTagName, typename NBT_Type::LongArray &&vTagVal)
 尝试插入 LongArray 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutString (K &&sTagName, const typename NBT_Type::String &vTagVal)
 插入或替换 String 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutString (K &&sTagName, typename NBT_Type::String &&vTagVal)
 插入或替换 String 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutString (K &&sTagName, const typename NBT_Type::String &vTagVal)
 尝试插入 String 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutString (K &&sTagName, typename NBT_Type::String &&vTagVal)
 尝试插入 String 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutList (K &&sTagName, const typename NBT_Type::List &vTagVal)
 插入或替换 List 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutList (K &&sTagName, typename NBT_Type::List &&vTagVal)
 插入或替换 List 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutList (K &&sTagName, const typename NBT_Type::List &vTagVal)
 尝试插入 List 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutList (K &&sTagName, typename NBT_Type::List &&vTagVal)
 尝试插入 List 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutCompound (K &&sTagName, const typename NBT_Type::Compound &vTagVal)
 插入或替换 Compound 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > PutCompound (K &&sTagName, typename NBT_Type::Compound &&vTagVal)
 插入或替换 Compound 类型的键值对(移动)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutCompound (K &&sTagName, const typename NBT_Type::Compound &vTagVal)
 尝试插入 Compound 类型的键值对(拷贝)
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > TryPutCompound (K &&sTagName, typename NBT_Type::Compound &&vTagVal)
 尝试插入 Compound 类型的键值对(移动)

友元

class NBT_Reader
class NBT_Writer
class NBT_Helper

详细描述

template<typename Compound>
class NBT_Compound< Compound >

继承自标准库std::unordered_map的代理类,用于存储和管理NBT键值对

模板参数
Compound继承的父类,也就是std::unordered_map
注解
用户不应自行实例化此类,请使用NBT_Type::Compound来访问此类实例化类型

构造及析构函数说明

◆ NBT_Compound() [1/4]

template<typename Compound>
template<typename... Args>
NBT_Compound< Compound >::NBT_Compound ( Args &&... args)
inline

完美转发构造函数

模板参数
Args构造参数类型包
参数
args构造参数
注解
将参数完美转发给底层容器进行构造

◆ NBT_Compound() [2/4]

template<typename Compound>
NBT_Compound< Compound >::NBT_Compound ( std::initializer_list< typename Compound::value_type > init)
inline

初始化列表构造函数

参数
init初始化列表,包含要初始化的键值对
注解
使用初始化列表直接构造底层容器

◆ NBT_Compound() [3/4]

template<typename Compound>
NBT_Compound< Compound >::NBT_Compound ( NBT_Compound< Compound > && _Move)
inlinenoexcept

移动构造函数

参数
_Move要移动的源对象

◆ NBT_Compound() [4/4]

template<typename Compound>
NBT_Compound< Compound >::NBT_Compound ( const NBT_Compound< Compound > & _Copy)
inlinenoexcept

拷贝构造函数

参数
_Copy要拷贝的源对象

成员函数说明

◆ Clear()

template<typename Compound>
void NBT_Compound< Compound >::Clear ( void )
inline

清空所有标签

注解
移除容器中的所有键值对,容器大小变为0

◆ Contains()

template<typename Compound>
bool NBT_Compound< Compound >::Contains ( const typename Compound::key_type & sTagName) const
inlinenoexcept

检查是否包含指定标签

参数
sTagName要检查的标签名
返回
如果包含指定标签返回true,否则返回false

◆ ContainsByte()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsByte ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 Byte 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsByteArray()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsByteArray ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 ByteArray 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsCompound()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsCompound ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 Compound 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsDouble()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsDouble ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 Double 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsEnd()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsEnd ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 End 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsFloat()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsFloat ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 Float 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsIf()

template<typename Compound>
template<typename Predicate>
bool NBT_Compound< Compound >::ContainsIf ( Predicate pred) const
inlinenoexcept

使用谓词检查是否存在满足条件的元素

模板参数
Predicate谓词仿函数类型,需要接受value_type并返回bool
参数
pred谓词仿函数对象
返回
如果存在满足条件的元素返回true,否则返回false
注解
具体用法参见标准库针对std::find_if的说明

◆ ContainsInt()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsInt ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 Int 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsIntArray()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsIntArray ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 IntArray 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsList()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsList ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 List 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsLong()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsLong ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 Long 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsLongArray()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsLongArray ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 LongArray 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsShort()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsShort ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 Short 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ ContainsString()

template<typename Compound>
bool NBT_Compound< Compound >::ContainsString ( const typename Compound::key_type & sTagName) const
inline

检查是否包含指定标签名的 String 类型数据

参数
sTagName要检查的标签名
返回
如果包含指定标签名,且对应的值的类型匹配,则返回true,否则返回false
注解
同时检查标签存在性和值类型

◆ Empty()

template<typename Compound>
bool NBT_Compound< Compound >::Empty ( void ) const
inlinenoexcept

检查容器是否为空

返回
如果容器为空返回true,否则返回false

◆ Get() [1/2]

template<typename Compound>
Compound::mapped_type & NBT_Compound< Compound >::Get ( const typename Compound::key_type & sTagName)
inline

根据标签名获取对应的NBT值

参数
sTagName要查找的标签名
返回
标签名对应的值的引用
注解
如果标签不存在则抛出异常,具体请参考std::unordered_map关于at的说明

◆ Get() [2/2]

template<typename Compound>
const Compound::mapped_type & NBT_Compound< Compound >::Get ( const typename Compound::key_type & sTagName) const
inline

根据标签名获取对应的NBT值(常量版本)

参数
sTagName要查找的标签名
返回
标签名对应的值的常量引用
注解
如果标签不存在则抛出异常,具体请参考std::unordered_map关于at的说明

◆ GetByte() [1/2]

template<typename Compound>
NBT_Type::Byte & NBT_Compound< Compound >::GetByte ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 Byte 类型数据

参数
sTagName标签名
返回
Byte 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetByte() [2/2]

template<typename Compound>
const NBT_Type::Byte & NBT_Compound< Compound >::GetByte ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 Byte 类型数据(常量版本)

参数
sTagName标签名
返回
Byte 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetByteArray() [1/2]

template<typename Compound>
NBT_Type::ByteArray & NBT_Compound< Compound >::GetByteArray ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 ByteArray 类型数据

参数
sTagName标签名
返回
ByteArray 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetByteArray() [2/2]

template<typename Compound>
const NBT_Type::ByteArray & NBT_Compound< Compound >::GetByteArray ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 ByteArray 类型数据(常量版本)

参数
sTagName标签名
返回
ByteArray 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetCompound() [1/2]

template<typename Compound>
NBT_Type::Compound & NBT_Compound< Compound >::GetCompound ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 Compound 类型数据

参数
sTagName标签名
返回
Compound 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetCompound() [2/2]

template<typename Compound>
const NBT_Type::Compound & NBT_Compound< Compound >::GetCompound ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 Compound 类型数据(常量版本)

参数
sTagName标签名
返回
Compound 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetData()

template<typename Compound>
const Compound & NBT_Compound< Compound >::GetData ( void ) const
inlinenoexcept

获取底层容器数据的常量引用

返回
底层容器数据的常量引用

◆ GetDouble() [1/2]

template<typename Compound>
NBT_Type::Double & NBT_Compound< Compound >::GetDouble ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 Double 类型数据

参数
sTagName标签名
返回
Double 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetDouble() [2/2]

template<typename Compound>
const NBT_Type::Double & NBT_Compound< Compound >::GetDouble ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 Double 类型数据(常量版本)

参数
sTagName标签名
返回
Double 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetEnd() [1/2]

template<typename Compound>
NBT_Type::End & NBT_Compound< Compound >::GetEnd ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 End 类型数据

参数
sTagName标签名
返回
End 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetEnd() [2/2]

template<typename Compound>
const NBT_Type::End & NBT_Compound< Compound >::GetEnd ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 End 类型数据(常量版本)

参数
sTagName标签名
返回
End 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetFloat() [1/2]

template<typename Compound>
NBT_Type::Float & NBT_Compound< Compound >::GetFloat ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 Float 类型数据

参数
sTagName标签名
返回
Float 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetFloat() [2/2]

template<typename Compound>
const NBT_Type::Float & NBT_Compound< Compound >::GetFloat ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 Float 类型数据(常量版本)

参数
sTagName标签名
返回
Float 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetInt() [1/2]

template<typename Compound>
NBT_Type::Int & NBT_Compound< Compound >::GetInt ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 Int 类型数据

参数
sTagName标签名
返回
Int 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetInt() [2/2]

template<typename Compound>
const NBT_Type::Int & NBT_Compound< Compound >::GetInt ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 Int 类型数据(常量版本)

参数
sTagName标签名
返回
Int 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetIntArray() [1/2]

template<typename Compound>
NBT_Type::IntArray & NBT_Compound< Compound >::GetIntArray ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 IntArray 类型数据

参数
sTagName标签名
返回
IntArray 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetIntArray() [2/2]

template<typename Compound>
const NBT_Type::IntArray & NBT_Compound< Compound >::GetIntArray ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 IntArray 类型数据(常量版本)

参数
sTagName标签名
返回
IntArray 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetList() [1/2]

template<typename Compound>
NBT_Type::List & NBT_Compound< Compound >::GetList ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 List 类型数据

参数
sTagName标签名
返回
List 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetList() [2/2]

template<typename Compound>
const NBT_Type::List & NBT_Compound< Compound >::GetList ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 List 类型数据(常量版本)

参数
sTagName标签名
返回
List 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetLong() [1/2]

template<typename Compound>
NBT_Type::Long & NBT_Compound< Compound >::GetLong ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 Long 类型数据

参数
sTagName标签名
返回
Long 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetLong() [2/2]

template<typename Compound>
const NBT_Type::Long & NBT_Compound< Compound >::GetLong ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 Long 类型数据(常量版本)

参数
sTagName标签名
返回
Long 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetLongArray() [1/2]

template<typename Compound>
NBT_Type::LongArray & NBT_Compound< Compound >::GetLongArray ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 LongArray 类型数据

参数
sTagName标签名
返回
LongArray 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetLongArray() [2/2]

template<typename Compound>
const NBT_Type::LongArray & NBT_Compound< Compound >::GetLongArray ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 LongArray 类型数据(常量版本)

参数
sTagName标签名
返回
LongArray 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetShort() [1/2]

template<typename Compound>
NBT_Type::Short & NBT_Compound< Compound >::GetShort ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 Short 类型数据

参数
sTagName标签名
返回
Short 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetShort() [2/2]

template<typename Compound>
const NBT_Type::Short & NBT_Compound< Compound >::GetShort ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 Short 类型数据(常量版本)

参数
sTagName标签名
返回
Short 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetString() [1/2]

template<typename Compound>
NBT_Type::String & NBT_Compound< Compound >::GetString ( const typename Compound::key_type & sTagName)
inline

获取指定标签名的 String 类型数据

参数
sTagName标签名
返回
String 类型数据的引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ GetString() [2/2]

template<typename Compound>
const NBT_Type::String & NBT_Compound< Compound >::GetString ( const typename Compound::key_type & sTagName) const
inline

获取指定标签名的 String 类型数据(常量版本)

参数
sTagName标签名
返回
String 类型数据的常量引用
注解
如果标签不存在或类型不匹配则抛出异常, 具体请参考std::unordered_map关于at的说明与std::get的说明

◆ Has() [1/2]

template<typename Compound>
const Compound::mapped_type * NBT_Compound< Compound >::Has ( const typename Compound::key_type & sTagName) const
inlinenoexcept

搜索标签是否存在(常量版本)

参数
sTagName要搜索的标签名
返回
如果找到,则返回指向标签名对应的值的常量指针,否则返回NULL指针
注解
标签不存在时不会抛出异常,适用于检查性访问

◆ Has() [2/2]

template<typename Compound>
Compound::mapped_type * NBT_Compound< Compound >::Has ( const typename Compound::key_type & sTagName)
inlinenoexcept

搜索标签是否存在

参数
sTagName要搜索的标签名
返回
如果找到,则返回指向标签名对应的值的指针,否则返回NULL指针
注解
标签不存在时不会抛出异常,适用于检查性访问

◆ HasByte() [1/2]

template<typename Compound>
const NBT_Type::Byte * NBT_Compound< Compound >::HasByte ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 Byte 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 Byte 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 Byte 时不会抛出异常,适用于检查性访问

◆ HasByte() [2/2]

template<typename Compound>
NBT_Type::Byte * NBT_Compound< Compound >::HasByte ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 Byte 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 Byte 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 Byte 时不会抛出异常,适用于检查性访问

◆ HasByteArray() [1/2]

template<typename Compound>
const NBT_Type::ByteArray * NBT_Compound< Compound >::HasByteArray ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 ByteArray 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 ByteArray 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 ByteArray 时不会抛出异常,适用于检查性访问

◆ HasByteArray() [2/2]

template<typename Compound>
NBT_Type::ByteArray * NBT_Compound< Compound >::HasByteArray ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 ByteArray 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 ByteArray 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 ByteArray 时不会抛出异常,适用于检查性访问

◆ HasCompound() [1/2]

template<typename Compound>
const NBT_Type::Compound * NBT_Compound< Compound >::HasCompound ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 Compound 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 Compound 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 Compound 时不会抛出异常,适用于检查性访问

◆ HasCompound() [2/2]

template<typename Compound>
NBT_Type::Compound * NBT_Compound< Compound >::HasCompound ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 Compound 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 Compound 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 Compound 时不会抛出异常,适用于检查性访问

◆ HasDouble() [1/2]

template<typename Compound>
const NBT_Type::Double * NBT_Compound< Compound >::HasDouble ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 Double 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 Double 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 Double 时不会抛出异常,适用于检查性访问

◆ HasDouble() [2/2]

template<typename Compound>
NBT_Type::Double * NBT_Compound< Compound >::HasDouble ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 Double 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 Double 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 Double 时不会抛出异常,适用于检查性访问

◆ HasEnd() [1/2]

template<typename Compound>
const NBT_Type::End * NBT_Compound< Compound >::HasEnd ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 End 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 End 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 End 时不会抛出异常,适用于检查性访问

◆ HasEnd() [2/2]

template<typename Compound>
NBT_Type::End * NBT_Compound< Compound >::HasEnd ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 End 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 End 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 End 时不会抛出异常,适用于检查性访问

◆ HasFloat() [1/2]

template<typename Compound>
const NBT_Type::Float * NBT_Compound< Compound >::HasFloat ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 Float 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 Float 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 Float 时不会抛出异常,适用于检查性访问

◆ HasFloat() [2/2]

template<typename Compound>
NBT_Type::Float * NBT_Compound< Compound >::HasFloat ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 Float 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 Float 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 Float 时不会抛出异常,适用于检查性访问

◆ HasInt() [1/2]

template<typename Compound>
const NBT_Type::Int * NBT_Compound< Compound >::HasInt ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 Int 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 Int 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 Int 时不会抛出异常,适用于检查性访问

◆ HasInt() [2/2]

template<typename Compound>
NBT_Type::Int * NBT_Compound< Compound >::HasInt ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 Int 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 Int 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 Int 时不会抛出异常,适用于检查性访问

◆ HasIntArray() [1/2]

template<typename Compound>
const NBT_Type::IntArray * NBT_Compound< Compound >::HasIntArray ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 IntArray 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 IntArray 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 IntArray 时不会抛出异常,适用于检查性访问

◆ HasIntArray() [2/2]

template<typename Compound>
NBT_Type::IntArray * NBT_Compound< Compound >::HasIntArray ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 IntArray 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 IntArray 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 IntArray 时不会抛出异常,适用于检查性访问

◆ HasList() [1/2]

template<typename Compound>
const NBT_Type::List * NBT_Compound< Compound >::HasList ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 List 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 List 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 List 时不会抛出异常,适用于检查性访问

◆ HasList() [2/2]

template<typename Compound>
NBT_Type::List * NBT_Compound< Compound >::HasList ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 List 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 List 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 List 时不会抛出异常,适用于检查性访问

◆ HasLong() [1/2]

template<typename Compound>
const NBT_Type::Long * NBT_Compound< Compound >::HasLong ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 Long 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 Long 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 Long 时不会抛出异常,适用于检查性访问

◆ HasLong() [2/2]

template<typename Compound>
NBT_Type::Long * NBT_Compound< Compound >::HasLong ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 Long 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 Long 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 Long 时不会抛出异常,适用于检查性访问

◆ HasLongArray() [1/2]

template<typename Compound>
const NBT_Type::LongArray * NBT_Compound< Compound >::HasLongArray ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 LongArray 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 LongArray 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 LongArray 时不会抛出异常,适用于检查性访问

◆ HasLongArray() [2/2]

template<typename Compound>
NBT_Type::LongArray * NBT_Compound< Compound >::HasLongArray ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 LongArray 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 LongArray 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 LongArray 时不会抛出异常,适用于检查性访问

◆ HasShort() [1/2]

template<typename Compound>
const NBT_Type::Short * NBT_Compound< Compound >::HasShort ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 Short 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 Short 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 Short 时不会抛出异常,适用于检查性访问

◆ HasShort() [2/2]

template<typename Compound>
NBT_Type::Short * NBT_Compound< Compound >::HasShort ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 Short 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 Short 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 Short 时不会抛出异常,适用于检查性访问

◆ HasString() [1/2]

template<typename Compound>
const NBT_Type::String * NBT_Compound< Compound >::HasString ( const typename Compound::key_type & sTagName) const
inlinenoexcept

安全检查并获取指定标签名的 String 类型数据(常量版本)

参数
sTagName标签名
返回
如果存在且对应值的类型为 String 则返回指向数据的常量指针,否则返回NULL
注解
标签不存在或类型不为 String 时不会抛出异常,适用于检查性访问

◆ HasString() [2/2]

template<typename Compound>
NBT_Type::String * NBT_Compound< Compound >::HasString ( const typename Compound::key_type & sTagName)
inlinenoexcept

安全检查并获取指定标签名的 String 类型数据

参数
sTagName标签名
返回
如果存在且对应值的类型为 String 则返回指向数据的指针,否则返回NULL
注解
标签不存在或类型不为 String 时不会抛出异常,适用于检查性访问

◆ KeySortIt() [1/2]

template<typename Compound>
std::vector< typename Compound::iterator > NBT_Compound< Compound >::KeySortIt ( void )
inline

获取按键名排序的迭代器向量(非常量版本)

返回
包含所有元素迭代器的vector,这些迭代器按照键名升序排序
注解
返回的迭代器可用于遍历元素,并允许修改元素的值 排序仅影响返回的vector,不影响底层unordered_map的实际顺序
警告
因为返回值中存储迭代器,在对当前容器进行修改后默认迭代器失效, 请勿再次通过返回的std::vector中的迭代器访问容器成员

◆ KeySortIt() [2/2]

template<typename Compound>
std::vector< typename Compound::const_iterator > NBT_Compound< Compound >::KeySortIt ( void ) const
inline

获取按键名排序的常量迭代器向量(常量版本)

返回
包含所有元素常量迭代器的vector,这些迭代器按照键名升序排序
注解
返回的迭代器可用于遍历元素,但不允许修改元素的值 排序仅影响返回的std::vector,不影响底层unordered_map的实际顺序
警告
因为返回值中存储迭代器,在对当前容器进行修改后默认迭代器失效, 请勿再次通过返回的std::vector中的迭代器访问容器成员

◆ Merge() [1/2]

template<typename Compound>
void NBT_Compound< Compound >::Merge ( const NBT_Compound< Compound > & _Copy)
inline

合并另一个NBT_Compound的内容(拷贝)

参数
_Copy要合并的源对象
注解
将源对象的所有键值对合并到当前对象,重复的键不会被覆盖, 具体行为请参考std::unordered_map对于merge的说明

◆ Merge() [2/2]

template<typename Compound>
void NBT_Compound< Compound >::Merge ( NBT_Compound< Compound > && _Move)
inline

合并另一个NBT_Compound的内容(移动)

参数
_Move要合并的源对象
注解
将源对象的所有键值对合并到当前对象,重复的键不会被覆盖, 具体行为请参考std::unordered_map关于merge的说明

◆ operator!=()

template<typename Compound>
bool NBT_Compound< Compound >::operator!= ( const NBT_Compound< Compound > & _Right) const
inlinenoexcept

不等比较运算符

参数
_Right要比较的右操作数
返回
是否不相等
注解
转发底层容器的实现,具体信息请参考std::unordered_map的说明

◆ operator<=>()

template<typename Compound>
std::partial_ordering NBT_Compound< Compound >::operator<=> ( const NBT_Compound< Compound > & _Right) const
inlinenoexcept

三路比较运算符

参数
_Right要比较的右操作数
返回
比较结果,通过std::partial_ordering返回
注解
如果底层容器支持三路比较则转发其实现,否则:
  • 首先比较容器大小,如果不相等,那么返回比较结果
  • 接着使用容器Key进行排序比较
    • 如果key不相等,则返回比较结果
    • 如果val不相等,则返回比较结果
  • 如果都相同,返回相等
警告
此比较方法开销较大,且可能存在递归情况

◆ operator=() [1/2]

template<typename Compound>
NBT_Compound & NBT_Compound< Compound >::operator= ( const NBT_Compound< Compound > & _Copy)
inline

拷贝赋值运算符

参数
_Copy要拷贝的源对象
返回
当前对象的引用

◆ operator=() [2/2]

template<typename Compound>
NBT_Compound & NBT_Compound< Compound >::operator= ( NBT_Compound< Compound > && _Move)
inlinenoexcept

移动赋值运算符

参数
_Move要移动的源对象
返回
当前对象的引用

◆ operator==()

template<typename Compound>
bool NBT_Compound< Compound >::operator== ( const NBT_Compound< Compound > & _Right) const
inlinenoexcept

相等比较运算符

参数
_Right要比较的右操作数
返回
是否相等
注解
转发底层容器的实现,具体信息请参考std::unordered_map的说明

◆ Put()

template<typename Compound>
template<typename K, typename V>
requires std::constructible_from<typename Compound::key_type, K &&> &&std::constructible_from<typename Compound::mapped_type, V &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::Put ( K && sTagName,
V && vTagVal )
inline

插入或替换键值对

模板参数
K标签名类型,必须可构造为key_type
V标签值类型,必须可构造为mapped_type
参数
sTagName标签名
vTagVal标签名对应的值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutByte() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutByte ( K && sTagName,
const typename NBT_Type::Byte & vTagVal )
inline

插入或替换 Byte 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Byte 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutByte() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutByte ( K && sTagName,
typename NBT_Type::Byte && vTagVal )
inline

插入或替换 Byte 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Byte 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutByteArray() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutByteArray ( K && sTagName,
const typename NBT_Type::ByteArray & vTagVal )
inline

插入或替换 ByteArray 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 ByteArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutByteArray() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutByteArray ( K && sTagName,
typename NBT_Type::ByteArray && vTagVal )
inline

插入或替换 ByteArray 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 ByteArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutCompound() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutCompound ( K && sTagName,
const typename NBT_Type::Compound & vTagVal )
inline

插入或替换 Compound 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Compound 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutCompound() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutCompound ( K && sTagName,
typename NBT_Type::Compound && vTagVal )
inline

插入或替换 Compound 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Compound 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutDouble() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutDouble ( K && sTagName,
const typename NBT_Type::Double & vTagVal )
inline

插入或替换 Double 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Double 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutDouble() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutDouble ( K && sTagName,
typename NBT_Type::Double && vTagVal )
inline

插入或替换 Double 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Double 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutEnd() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutEnd ( K && sTagName,
const typename NBT_Type::End & vTagVal )
inline

插入或替换 End 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 End 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutEnd() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutEnd ( K && sTagName,
typename NBT_Type::End && vTagVal )
inline

插入或替换 End 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 End 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutFloat() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutFloat ( K && sTagName,
const typename NBT_Type::Float & vTagVal )
inline

插入或替换 Float 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Float 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutFloat() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutFloat ( K && sTagName,
typename NBT_Type::Float && vTagVal )
inline

插入或替换 Float 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Float 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutInt() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutInt ( K && sTagName,
const typename NBT_Type::Int & vTagVal )
inline

插入或替换 Int 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Int 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutInt() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutInt ( K && sTagName,
typename NBT_Type::Int && vTagVal )
inline

插入或替换 Int 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Int 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutIntArray() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutIntArray ( K && sTagName,
const typename NBT_Type::IntArray & vTagVal )
inline

插入或替换 IntArray 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 IntArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutIntArray() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutIntArray ( K && sTagName,
typename NBT_Type::IntArray && vTagVal )
inline

插入或替换 IntArray 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 IntArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutList() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutList ( K && sTagName,
const typename NBT_Type::List & vTagVal )
inline

插入或替换 List 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 List 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutList() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutList ( K && sTagName,
typename NBT_Type::List && vTagVal )
inline

插入或替换 List 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 List 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutLong() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutLong ( K && sTagName,
const typename NBT_Type::Long & vTagVal )
inline

插入或替换 Long 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Long 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutLong() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutLong ( K && sTagName,
typename NBT_Type::Long && vTagVal )
inline

插入或替换 Long 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Long 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutLongArray() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutLongArray ( K && sTagName,
const typename NBT_Type::LongArray & vTagVal )
inline

插入或替换 LongArray 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 LongArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutLongArray() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutLongArray ( K && sTagName,
typename NBT_Type::LongArray && vTagVal )
inline

插入或替换 LongArray 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 LongArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutShort() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutShort ( K && sTagName,
const typename NBT_Type::Short & vTagVal )
inline

插入或替换 Short 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Short 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutShort() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutShort ( K && sTagName,
typename NBT_Type::Short && vTagVal )
inline

插入或替换 Short 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Short 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutString() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutString ( K && sTagName,
const typename NBT_Type::String & vTagVal )
inline

插入或替换 String 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 String 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ PutString() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::PutString ( K && sTagName,
typename NBT_Type::String && vTagVal )
inline

插入或替换 String 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 String 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则执行了替换
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ Remove()

template<typename Compound>
bool NBT_Compound< Compound >::Remove ( const typename Compound::key_type & sTagName)
inline

删除指定标签

参数
sTagName要删除的标签名
返回
是否成功删除(标签存在且被删除返回true,否则返回false)

◆ Size()

template<typename Compound>
Compound::size_type NBT_Compound< Compound >::Size ( void ) const
inlinenoexcept

获取容器中元素的数量

返回
容器中键值对的数量

◆ TryPut()

template<typename Compound>
template<typename K, typename V>
requires std::constructible_from<typename Compound::key_type, K &&> &&std::constructible_from<typename Compound::mapped_type, V &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPut ( K && sTagName,
V && vTagVal )
inline

原位构造键值对

模板参数
K标签名类型,必须可构造为key_type
V标签值类型,必须可构造为mapped_type
参数
sTagName标签名
vTagVal标签名对应的值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutByte() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutByte ( K && sTagName,
const typename NBT_Type::Byte & vTagVal )
inline

尝试插入 Byte 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Byte 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutByte() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutByte ( K && sTagName,
typename NBT_Type::Byte && vTagVal )
inline

尝试插入 Byte 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Byte 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutByteArray() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutByteArray ( K && sTagName,
const typename NBT_Type::ByteArray & vTagVal )
inline

尝试插入 ByteArray 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 ByteArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutByteArray() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutByteArray ( K && sTagName,
typename NBT_Type::ByteArray && vTagVal )
inline

尝试插入 ByteArray 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 ByteArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutCompound() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutCompound ( K && sTagName,
const typename NBT_Type::Compound & vTagVal )
inline

尝试插入 Compound 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Compound 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutCompound() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutCompound ( K && sTagName,
typename NBT_Type::Compound && vTagVal )
inline

尝试插入 Compound 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Compound 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutDouble() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutDouble ( K && sTagName,
const typename NBT_Type::Double & vTagVal )
inline

尝试插入 Double 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Double 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutDouble() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutDouble ( K && sTagName,
typename NBT_Type::Double && vTagVal )
inline

尝试插入 Double 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Double 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutEnd() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutEnd ( K && sTagName,
const typename NBT_Type::End & vTagVal )
inline

尝试插入 End 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 End 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutEnd() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutEnd ( K && sTagName,
typename NBT_Type::End && vTagVal )
inline

尝试插入 End 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 End 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutFloat() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutFloat ( K && sTagName,
const typename NBT_Type::Float & vTagVal )
inline

尝试插入 Float 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Float 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutFloat() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutFloat ( K && sTagName,
typename NBT_Type::Float && vTagVal )
inline

尝试插入 Float 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Float 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutInt() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutInt ( K && sTagName,
const typename NBT_Type::Int & vTagVal )
inline

尝试插入 Int 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Int 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutInt() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutInt ( K && sTagName,
typename NBT_Type::Int && vTagVal )
inline

尝试插入 Int 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Int 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutIntArray() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutIntArray ( K && sTagName,
const typename NBT_Type::IntArray & vTagVal )
inline

尝试插入 IntArray 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 IntArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutIntArray() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutIntArray ( K && sTagName,
typename NBT_Type::IntArray && vTagVal )
inline

尝试插入 IntArray 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 IntArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutList() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutList ( K && sTagName,
const typename NBT_Type::List & vTagVal )
inline

尝试插入 List 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 List 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutList() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutList ( K && sTagName,
typename NBT_Type::List && vTagVal )
inline

尝试插入 List 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 List 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutLong() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutLong ( K && sTagName,
const typename NBT_Type::Long & vTagVal )
inline

尝试插入 Long 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Long 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutLong() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutLong ( K && sTagName,
typename NBT_Type::Long && vTagVal )
inline

尝试插入 Long 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Long 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutLongArray() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutLongArray ( K && sTagName,
const typename NBT_Type::LongArray & vTagVal )
inline

尝试插入 LongArray 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 LongArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutLongArray() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutLongArray ( K && sTagName,
typename NBT_Type::LongArray && vTagVal )
inline

尝试插入 LongArray 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 LongArray 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutShort() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutShort ( K && sTagName,
const typename NBT_Type::Short & vTagVal )
inline

尝试插入 Short 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Short 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutShort() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutShort ( K && sTagName,
typename NBT_Type::Short && vTagVal )
inline

尝试插入 Short 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 Short 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutString() [1/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutString ( K && sTagName,
const typename NBT_Type::String & vTagVal )
inline

尝试插入 String 类型的键值对(拷贝)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 String 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

◆ TryPutString() [2/2]

template<typename Compound>
template<typename K>
requires std::constructible_from<typename Compound::key_type, K &&>
std::pair< typename Compound::iterator, bool > NBT_Compound< Compound >::TryPutString ( K && sTagName,
typename NBT_Type::String && vTagVal )
inline

尝试插入 String 类型的键值对(移动)

模板参数
K标签名类型,必须可构造为key_type
参数
sTagName标签名
vTagVal要插入的 String 类型值
返回
包含迭代器和bool值的pair,迭代器指向插入或替换的元素,bool值为true则执行了插入,否则键已存在,不会进行拷贝或移动
注解
允许插入End类型的值,这样设计的目的在于允许处理过程出现特殊值, 请确保输出前处理完毕所有End类型,否则通过NBT_Write输出时会忽略这些值并生成警告

该类的文档由以下文件生成: