3#include <system/object_ext.h>
4#include <system/exceptions.h>
5#include <system/details/pointer_collection_helpers.h>
6#include <system/details/patterns.h>
7#include <system/collections/list.h>
8#include <system/collections/ilist.h>
9#include <system/collections/ienumerator.h>
10#include <system/array.h>
19template <
typename>
class IEnumerable;
32template<
typename TItem>
38 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
39 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
59 typedef ConfigurationListDebugView
ThisType;
62 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
63 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
71 return pr_collection->_list->ToArray();
80 #ifdef ASPOSE_GET_SHARED_MEMBERS
81 void GetSharedMembers(System::Object::shared_members_type& result)
const override
83 Object::GetSharedMembers(result);
85 result.Add(
"System::Text::Json::Serialization::ConfigurationList::ConfigurationListDebugView::pr_collection", this->pr_collection);
100 return _list->get_Count();
113 void idx_set(int32_t index, TItem value)
override
115 if (System::IsNull(System::ExplicitCast<System::Object>(
value)))
117 throw System::ArgumentNullException(u
"value");
126 void Add(
const TItem& item)
override
128 if (System::IsNull(System::ExplicitCast<System::Object>(item)))
130 throw System::ArgumentNullException(u
"item");
148 return _list->Contains(item);
153 _list->CopyTo(array, arrayIndex);
158 return _list->GetEnumerator();
161 int32_t
IndexOf(
const TItem& item)
const override
163 return _list->IndexOf(item);
166 void Insert(int32_t index,
const TItem& item)
override
168 if (System::IsNull(System::ExplicitCast<System::Object>(item)))
170 throw System::ArgumentNullException(u
"item");
182 bool removed =
_list->Remove(item);
202 return _list->begin();
216 return _list->cbegin();
223 return _list->cend();
230 return _list->cbegin();
237 return _list->cend();
246 return _list->virtualizeBeginIterator();
255 return _list->virtualizeEndIterator();
264 return _list->virtualizeBeginConstIterator();
273 return _list->virtualizeEndConstIterator();
281 System::Details::CollectionHelpers::SetWeakPointer(0,
_list);
305 #ifdef ASPOSE_GET_SHARED_MEMBERS
306 void GetSharedMembers(System::Object::shared_members_type& result)
const override
308 Object::GetSharedMembers(result);
310 result.Add(
"System::Text::Json::Serialization::ConfigurationList::_list", this->_list);
316 String get_DebuggerDisplay()
Class that represents an array data structure. Objects of this class should only be allocated using S...
Definition: array.h:296
T virtualized_iterator_element
Inner iterator element type.
Definition: ienumerable.h:359
System::Details::VirtualizedIteratorBase< T > virtualized_iterator
Inner iterator base type.
Definition: ienumerable.h:357
Interface of indexed container of elements. Objects of this class should only be allocated using Syst...
Definition: ilist.h:20
List forward declaration.
Definition: list.h:129
vector_t::const_iterator const_iterator
Const iterator type.
Definition: list.h:149
vector_t::iterator iterator
Iterator type.
Definition: list.h:147
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
static String Format(const SharedPtr< IFormatProvider > &fp, const String &format, const Args &... args)
Formats string in C# style.
Definition: string.h:1449
Definition: configuration_list.h:34
TItem idx_get(int32_t index) const override
Definition: configuration_list.h:108
virtualized_iterator * virtualizeBeginIterator() override
Gets iterator pointing to the first element (if any) of the collection.
Definition: configuration_list.h:244
virtualized_iterator * virtualizeEndConstIterator() const override
Gets iterator pointing right after the last element (if any)of the const-qualified instance of the co...
Definition: configuration_list.h:271
const_iterator cbegin() const noexcept
Gets iterator pointing to the first const-qualified element (if any) of the collection.
Definition: configuration_list.h:228
typename iterator_holder_type::const_iterator const_iterator
Const iterator type.
Definition: configuration_list.h:49
int32_t IndexOf(const TItem &item) const override
Gets index of first appearance of item in container.
Definition: configuration_list.h:161
ConfigurationList(System::SharedPtr< Collections::Generic::IEnumerable< TItem > > source=nullptr)
Definition: configuration_list.h:103
virtual void OnCollectionModified()
Definition: configuration_list.h:292
void Clear() override
Deletes all elements from collection.
Definition: configuration_list.h:139
const_iterator cend() const noexcept
Gets iterator pointing right after the last const-qualified element (if any) of the collection.
Definition: configuration_list.h:235
virtual void ValidateAddedValue(TItem item)
Definition: configuration_list.h:296
void RemoveAt(int32_t index) override
Definition: configuration_list.h:191
void idx_set(int32_t index, TItem value) override
Definition: configuration_list.h:113
typename iterator_holder_type::virtualized_iterator_element virtualized_iterator_element
Virtualized element type.
Definition: configuration_list.h:51
const_iterator end() const noexcept
Gets iterator pointing right after the last element (if any) of the const-qualified instance of the c...
Definition: configuration_list.h:221
iterator begin() noexcept
Gets iterator pointing to the first element (if any) of the collection.
Definition: configuration_list.h:200
const_iterator begin() const noexcept
Gets iterator pointing to the first element (if any) of the const-qualified instance of the collectio...
Definition: configuration_list.h:214
bool get_IsReadOnly() const override=0
Checks if collection is read only.
virtual ~ConfigurationList()
Definition: configuration_list.h:301
virtualized_iterator * virtualizeBeginConstIterator() const override
Gets iterator pointing to the first element (if any)of the const-qualified instance of the collection...
Definition: configuration_list.h:262
virtualized_iterator * virtualizeEndIterator() override
Gets iterator pointing right after the last element (if any) of the collection.
Definition: configuration_list.h:253
void Add(const TItem &item) override
Adds element into collection.
Definition: configuration_list.h:126
int32_t get_Count() const override
Gets number of elements in collection.
Definition: configuration_list.h:98
System::SharedPtr< Collections::Generic::IEnumerator< TItem > > GetEnumerator() override
Gets enumerator.
Definition: configuration_list.h:156
typename iterator_holder_type::virtualized_iterator virtualized_iterator
Virtualized type.
Definition: configuration_list.h:53
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: configuration_list.h:276
void CopyTo(System::SharedPtr< Array< TItem > > array, int32_t arrayIndex) override
Definition: configuration_list.h:151
virtual void OnCollectionModifying()=0
bool Remove(const TItem &item) override
Deletes element from collection.
Definition: configuration_list.h:179
System::SharedPtr< Collections::Generic::List< TItem > > _list
Definition: configuration_list.h:289
iterator end() noexcept
Gets iterator pointing right after the last element (if any) of the collection.
Definition: configuration_list.h:207
void Insert(int32_t index, const TItem &item) override
Definition: configuration_list.h:166
bool Contains(const TItem &item) const override
Checks if element is present in collection.
Definition: configuration_list.h:146
typename iterator_holder_type::iterator iterator
Iterator type.
Definition: configuration_list.h:47
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9
std::enable_if<!IsSmartPtr< T >::value, SmartPtr< T > >::type MakeObject(Args &&... args)
Creates object on heap and returns shared pointer to it.
Definition: smart_ptr.h:1496