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
- Class Enumerator
方法
| 方法 | 描述 |
|---|---|
| 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 | 相同元素的集合。 |
| IEnumeratorPtr | Enumerator 类型。 |
| iterator | 迭代器类型。 |
| KeyCollection | 键集合类型。 |
| KVPair | 键值对类型。 |
| map_t | 底层数据类型。 |
| Ptr | 指针类型。 |
| reverse_iterator | 反向迭代器类型。 |
| this_t | 自身类型。 |
| ValueCollection | 值集合类型。 |
备注
包装 STL map 的已排序字典类。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言失败。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。
另见
- Class BaseDictionary
- Namespace System::Collections::Generic
- Library Aspose.Font for C++