chenjunfu2-nbt-cpp v2.1.3
一个基于CPP20的NBT(Named Binary Tag)库
载入中...
搜索中...
未找到
NBT_Helper::DefaultCompoundSort< bAscending > 模板结构体 参考

默认排序策略,提供按键的字符串字典序升序或降序排列。 更多...

#include <NBT_Helper.hpp>

Public 成员函数

std::vector< NBT_Type::Compound::Const_Iteratoroperator() (const NBT_Type::Compound &cpdSort)
 对给定的 Compound 对象进行排序,返回指向其元素的迭代器向量。

详细描述

template<bool bAscending = true>
struct NBT_Helper::DefaultCompoundSort< bAscending >

默认排序策略,提供按键的字符串字典序升序或降序排列。

模板参数
bAscending是否升序排序。true表示升序(默认),false表示降序。

成员函数说明

◆ operator()()

template<bool bAscending = true>
std::vector< NBT_Type::Compound::Const_Iterator > NBT_Helper::DefaultCompoundSort< bAscending >::operator() ( const NBT_Type::Compound & cpdSort)
inline

对给定的 Compound 对象进行排序,返回指向其元素的迭代器向量。

参数
cpdSort需要排序的 Compound 对象。
返回
std::vector<NBT_Type::Compound::Const_Iterator>,其中迭代器按排序顺序排列。
注解
该函数通常由 NBT_Writer 内部调用,用户一般不直接使用。

该结构体的文档由以下文件生成: