System::Collections::ObjectModel::Collection class

Collection class

Base type for generic collection. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

template<class T>class Collection : public System::Collections::Generic::IList<T>
ParameterDescription
TElement type.

Nested classes

Methods

MethodDescription
Add(const T&) overrideAdds value to container.
Clear() overrideDeletes all elements.
Collection()Creates empty collection.
Collection(SharedPtr<Generic::IList<T>>)
Contains(const T&) const overrideChecks if item is present in collection.
CopyTo(ArrayPtr<T>, int) overrideCopies collection elements into existing array elements.
crbegin() constGets a reverse iterator to the last const-qualified element of collection (first in reverse).
crend() constGets a reverse iterator for a non-existent const-qualified element before the start of the collection.
get_Count() const overrideGets number of elements.
get_Items()Internal data structure accessor.
get_Items() constInternal data structure accessor.
GetEnumerator() overrideGets enumerator to iterate through collection.
idx_get(int) const overrideGets value at specified index.
idx_set(int, T) overrideSets value at specified index.
IndexOf(const T&) const overrideLooks for element in collection.
Insert(int, const T&) overrideInserts item into specified position.
operator[](int)Gets value at specified index.
operator[](int) constGets value at specified index.
rbegin()Gets a reverse iterator to the last element of collection (first in reverse).
rbegin() constGets a reverse iterator to the last element of the const-qualified collection (first in reverse).
Remove(const T&) overrideRemoves specific item.
RemoveAt(int) overrideRemoves item at specific position.
rend()Gets a reverse iterator for a non-existent element before the start of the collection.
rend() constGets a reverse iterator for a non-existent element before the start of the const-qualified collection.
SetTemplateWeakPtr(uint32_t) overrideMakes stored pointers weak (if applicable).
virtualizeBeginConstIterator() const overrideGets the implementation of begin const iterator for the current container.
virtualizeBeginIterator() overrideGets the implementation of begin iterator for the current container.
virtualizeEndConstIterator() const overrideGets the implementation of end const iterator for the current container.
virtualizeEndIterator() overrideGets the implementation of end iterator for the current container.

Typedefs

TypedefDescription
const_reverse_iterator
reverse_iterator

See Also