System::Collections::Generic::BaseKVCollection 类

BaseKVCollection class

保存键或值集合的通用代码。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

template<typename Dict,typename KV>class BaseKVCollection : public System::Collections::Generic::IKVCollection<KV>
参数描述
DictDictionary 类型。
KV键或值类型,取决于接口的使用方式。

方法

方法描述
BaseKVCollection(const typename Dict::Ptr&)创建集合。
CopyTo(ArrayPtr<KV>, int) override将数据复制到现有数组元素。
get_Count() const override获取元素数量。
SetTemplateWeakPtr(uint32_t) override启用编译,但实际上不执行任何操作,因为此结构不拥有数据。

另见