System::Collections::Generic::SortedList 类

SortedList class

封装 FlatMap 结构的有序列表。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针在函数参数中传递。

template<typename TKey,typename TValue>class SortedList : public System::Collections::Generic::SortedListHelper<TKey, TValue>,
                                                          public System::Collections::Generic::BaseDictionary<Detail::FlatMap<TKey, TValue, ComparerAdapter<TKey>>>
参数描述
TKey密钥类型。
TValue值类型。

Nested classes

方法

方法描述
crbegin() const获取指向集合中最后一个 const 限定元素的逆向迭代器(逆向的第一个)。
crend() const获取指向集合起始之前的不存在的 const 限定元素的逆向迭代器。
get_Capacity() const获取当前列表的容量。
virtual get_Keys() const访问键集合。
virtual get_Values() const访问值集合。
GetEnumerator() override获取遍历当前列表的枚举器。
IndexOfKey(TKey) const查找特定键。
IndexOfValue(TValue) const查找特定值。
rbegin()获取指向集合中最后一个元素的逆向迭代器(逆向的第一个)。
rbegin() const获取指向 const 限定集合中最后一个元素的逆向迭代器(逆向的第一个)。
RemoveAt(int)移除指定位置的项。
rend()获取指向集合起始之前的不存在的元素的逆向迭代器。
rend() const获取指向 const 限定集合起始之前的不存在的元素的逆向迭代器。
set_Capacity(int)设置当前列表的容量。
SortedList()构造空列表。
SortedList(const SharedPtr<IComparer<TKey>>&)构造空列表。
SortedList(const SharedPtr<IDictionary<TKey, TValue>>&)拷贝构造函数。
SortedList(const map_t&)拷贝构造函数。
SortedList(int)构造空列表。

Typedefs

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

另见