System::Collections::Generic::SortedDictionary 类

SortedDictionary class

已排序字典类型前向声明。

template<typename TKey,typename TValue>class SortedDictionary : public System::Collections::Generic::BaseDictionary<std::map<TKey, TValue, ComparerAdapter<BasePointerType<TKey>::type>, ASPOSE_MAP_ALLOCATOR_TYPE(TKey, TValue)>>
参数描述
TKey密钥类型。
TValue值类型。

Nested classes

方法

方法描述
crbegin() const获取指向集合中最后一个 const 限定元素的逆向迭代器(逆向的第一个)。
crend() const获取指向集合起始之前的不存在的 const 限定元素的逆向迭代器。
get_Comparer() const获取用于对 SortedDictionary<TKey,TValue> 元素进行排序的 IComparer
static GetDefaultKeyComparer()单例访问器函数。
GetEnumerator() override获取枚举器以遍历当前字典。
rbegin()获取指向集合中最后一个元素的逆向迭代器(逆向的第一个)。
rbegin() const获取指向 const 限定集合中最后一个元素的逆向迭代器(逆向的第一个)。
rend()获取指向集合起始之前的不存在的元素的逆向迭代器。
rend() const获取指向 const 限定集合起始之前的不存在的元素的逆向迭代器。
SortedDictionary()构造空字典。
SortedDictionary(const SharedPtr<IComparer<typename BasePointerType<TKey>::type>>&)构造空字典。
SortedDictionary(const SharedPtr<IDictionary<TKey, TValue>>&)拷贝构造函数。
SortedDictionary(const SharedPtr<IDictionary<TKey, TValue>>&, const SharedPtr<IComparer<typename BasePointerType<TKey>::type>>&)拷贝构造函数。

Typedefs

类型定义描述
const_iterator常量迭代器类型。
const_reverse_iterator常量反向迭代器类型。
IEnumerablePtr相同元素的集合。
IEnumeratorPtrEnumerator 类型。
iterator迭代器类型。
KeyCollection键集合类型。
KVPair键值对类型。
map_t底层数据类型。
Ptr指针类型。
reverse_iterator反向迭代器类型。
this_t自身类型。
ValueCollection值集合类型。

备注

包装 STL map 的已排序字典类。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言失败。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

另见