2#ifndef _aspose_system_colllections_base_kv_collection_h_
3#define _aspose_system_colllections_base_kv_collection_h_
5#include <system/collections/ikvcollection.h>
6#include <system/diagnostics/debug.h>
8namespace System {
namespace Collections {
namespace Generic {
16template <
typename Dict,
typename KV>
29 return m_dict->get_Count();
37 throw ArgumentNullException();
40 throw ArgumentOutOfRangeException();
42 if (index + get_Count() > arr->get_Length())
43 throw ArgumentException();
47 (*arr)[index++] = e->get_Current();
56 ASPOSE_UNUSED(argument);
57 CODEPORTING_DEBUG_ASSERT(!
"BaseKVCollection doesn't own data structures so it can't be used to store Weak pointers");
Holds common code for collections of keys or values. Objects of this class should only be allocated u...
Definition: base_kv_collection.h:18
void SetTemplateWeakPtr(uint32_t argument) override
Enables compilation, but doesn't actually do anything as this structure doesn't own data.
Definition: base_kv_collection.h:54
BaseKVCollection(const typename Dict::Ptr &dict)
Creates collection.
Definition: base_kv_collection.h:22
virtual int get_Count() const override
Gets number of elements.
Definition: base_kv_collection.h:27
Dict::Ptr m_dict
Dictionary to wrap.
Definition: base_kv_collection.h:65
~BaseKVCollection() override
Destructor.
Definition: base_kv_collection.h:62
virtual void CopyTo(ArrayPtr< KV > arr, int index) override
Copies data to existing array elements.
Definition: base_kv_collection.h:34
Interface of collection of elements. Objects of this class should only be allocated using System::Mak...
Definition: icollection.h:20
Interface of container containing keys or values of the dictionary-like container....
Definition: ikvcollection.h:17
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: db_command.h:9