System::Collections::ObjectModel::ReadOnlyCollection class
ReadOnlyCollection class
Wraps specific container to access it in read-only mode. 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<typename T>class ReadOnlyCollection : public virtual System::Object,
public System::Collections::Generic::IList<T>
| Parameter | Description |
|---|
| T | Element type. |
Methods
| Method | Description |
|---|
| Contains(const T&) const override | Checks if container contains specific item. |
| CopyTo(System::ArrayPtr<T>, int) override | Copies container elements to existing array elements. |
| get_Count() const override | Gets count of container elements. |
| get_IsReadOnly() const override | Checks if collection is read only. |
| GetEnumerator() override | Gets collection enumerator. |
| idx_get(int) const override | Gets item at specific position. |
| IndexOf(const T&) const override | Looks for specific item in collection. |
| ReadOnlyCollection(const SharedPtr<Generic::IList<T>>&) | Wraps read-only collection around specific collection. |
| SetTemplateWeakPtr(uint32_t) override | Does nothing as read-only collection only wraps data and stores nothing. |
| virtualizeBeginConstIterator() const override | Gets the implementation of begin const iterator for the current container. |
| virtualizeBeginIterator() override | Gets the implementation of begin iterator for the current container. |
| virtualizeEndConstIterator() const override | Gets the implementation of end const iterator for the current container. |
| virtualizeEndIterator() override | Gets the implementation of end iterator for the current container. |
Typedefs
See Also