Represents a collection of objects.
Classes | |
| class | value_type |
| Represents the value type of the collection. More... | |
Public Aliases | |
| using | base_type |
| Represents the list base type. | |
| using | const_base_type |
| Represents the list base type. | |
| using | size_type |
| Represents the list size type (usually xtd::usize). | |
| using | reference |
| Represents the reference of list value type. | |
| using | const_reference |
| Represents the const reference of list value type. | |
| using | pointer |
| Represents the pointer of list value type. | |
| using | const_pointer |
| Represents the const pointer of list value type. | |
| using | read_only_collection |
| Represents the read only collection of of list. | |
Public Deprecatd Aliases | |
| using | reverse_iterator |
| Represents the reverse iterator type of the collection. | |
| using | const_reverse_iterator |
| Represents the const reverse iterator type of the collection. | |
Public Fields | |
| static constexpr xtd::usize | npos |
| Represents a value that is not a valid position in a collection. | |
| static constexpr xtd::usize | bpos |
| Represents the index of the first valid element in a collection. | |
| static constexpr xtd::usize | epos |
| Represents the index of the last valid element in a collection. | |
Public Events | |
| event< arranged_element_collection, delegate< void(xtd::usize, type_t &item)> > | item_added |
| Occurs when an item is added to the collection. | |
| event< arranged_element_collection, delegate< void(xtd::usize, type_t &item)> > | item_updated |
| Occurs when an item is updated in the collection. | |
| event< arranged_element_collection, delegate< void(xtd::usize, type_t &item)> > | item_removed |
| Occurs when an item is removed from the collection. | |
Public Constructors | |
| arranged_element_collection ()=default | |
| Initializes a new instance of the xtd::forms::layout::arranged_element_collection class that is empty. | |
| arranged_element_collection (size_type capacity) | |
| Constructs the container with specified count default-inserted instances of type_t. No copies are made. | |
| arranged_element_collection (const xtd::collections::generic::ienumerable< type_t > &collection) | |
| Initializes a new instance of the xtd::forms::layout::arranged_element_collection <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied. | |
| arranged_element_collection (const arranged_element_collection &collection) | |
| Default copy constructor with specified list. | |
| arranged_element_collection (arranged_element_collection &&collection) | |
| Move constructor with specified list. | |
| arranged_element_collection (const base_type &collection) | |
| Copy constructor with specified base type list. | |
| arranged_element_collection (base_type &&collection) | |
| Move constructor with specified base type list. | |
| arranged_element_collection (std::initializer_list< type_t > items) | |
| Constructs the container with the contents of the specified initializer list, and allocator. | |
| template<std::input_iterator input_iterator_t> | |
| arranged_element_collection (input_iterator_t first, input_iterator_t last) | |
| Constructs the container with the contents of the range [first, last). | |
Public Properties | |
| auto | capacity () const noexcept -> size_type |
| Gets the total number of elements the internal data structure can hold without resizing. | |
| auto | capacity (size_type value) -> void |
| Sets the total number of elements the internal data structure can hold without resizing. | |
| auto | count () const noexcept -> size_type override |
| Gets the number of elements contained in the xtd::forms::layout::arranged_element_collection <type_t>. | |
| auto | data () -> pointer |
| Direct access to the underlying array. | |
| auto | data () const -> const_pointer |
| Direct access to the underlying array. | |
| const auto & | items () const |
| Returns the underlying base type items. | |
| auto & | items () |
| Returns the underlying base type items. | |
| virtual auto | sorted () const noexcept -> bool |
| Checks whether the container is sorted. | |
| virtual auto | sorted (bool value) -> arranged_element_collection & |
| Sets the container is sorted. | |
Public Methods | |
| auto | add (const type_t &item) -> void override |
| Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>. | |
| virtual auto | add (type_t &&item) -> void |
| Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>. | |
| virtual auto | add_range (const arranged_element_collection &collection) -> void |
| Adds elements to the end. | |
| virtual auto | add_range (const std::vector< type_t > &collection) -> void |
| Adds elements to the end. | |
| virtual auto | add_range (const std::initializer_list< type_t > &collection) -> void |
| Adds elements to the end. | |
| template<typename collection_t> | |
| auto | add_range (collection_t &&collection) -> void |
| Adds elements to the end. | |
| template<typename collection_t> | |
| auto | add_range (const collection_t &collection) -> void |
| Adds elements to the end. | |
| auto | clear () -> void override |
| Removes all items from the xtd::forms::layout::arranged_element_collection <type_t>. | |
| auto | contains (const type_t &item) const noexcept -> bool override |
| Determines whether the xtd::forms::layout::arranged_element_collection <type_t> contains a specific value. | |
| auto | copy_to (xtd::array< type_t > &array, xtd::usize array_index) const -> void override |
| Copies the elements of the xtd::forms::layout::arranged_element_collection <type_t> to an xtd::array, starting at a particular xtd::array index. | |
| auto | get_enumerator () const noexcept -> xtd::collections::generic::enumerator< type_t > override |
| Returns an enumerator that iterates through the xtd::forms::layout::arranged_element_collection <type_t>. | |
| virtual auto | insert (xtd::usize index, const type_t &value) -> void |
| Inserts specified element at specified index. | |
| virtual auto | sort () -> arranged_element_collection & |
| Sorts the content. | |
| auto | remove (const type_t &item) -> bool override |
| Removes the first occurrence of a specific object from the xtd::forms::layout::arranged_element_collection <type_t>. | |
| virtual auto | remove_at (xtd::usize index) -> void |
| Erases element at specified index. | |
| auto | reverse () -> arranged_element_collection & |
| Reverses the order of the elements in the entire xtd::collections::generic::list <type_t>. | |
| auto | reverse (size_type index, size_type count) -> arranged_element_collection & |
| Reverses the order of the elements in the specified range. | |
| auto | to_array () const noexcept -> xtd::array< type_t > |
| Gets an array with the elements of the container. | |
Public Operators | |
| auto | operator= (const arranged_element_collection &other) -> arranged_element_collection & |
| Copy assignment operator. Replaces the contents with a copy of the contents of other. | |
| auto | operator= (arranged_element_collection &&other) noexcept -> arranged_element_collection & |
| Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards. | |
| auto | operator= (const std::initializer_list< type_t > &items) -> arranged_element_collection & |
| Replaces the contents with those identified by initializer list ilist. | |
| auto | operator[] (size_type index) -> value_type & |
| Access specified element. | |
| auto | operator[] (size_type index) const -> const value_type & |
| Access specified element. | |
| operator const_base_type & () const noexcept | |
| Returns a reference to the underlying base type. | |
| operator base_type & () noexcept | |
| Returns a reference to the underlying base type. | |
| auto | operator== (const arranged_element_collection &value) const -> bool |
| auto | operator!= (const arranged_element_collection &value) const -> bool |
Public Deprecatd Properties | |
| auto | max_size () const noexcept -> size_type |
| Returns the maximum possible number of elements. | |
Public Deprecated Methods | |
| auto | at (size_type pos) -> reference |
| Access specified element with bounds checking. | |
| auto | at (size_type pos) const -> const_reference |
| Access specified element with bounds checking. | |
| auto | back () -> reference |
| Access the last element. | |
| auto | back () const -> const_reference |
| Access the last element. | |
| auto | crbegin () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the end. | |
| auto | crend () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the end. | |
| auto | front () -> reference |
| Access the first element. | |
| auto | front () const -> const_reference |
| Access the first element. | |
| auto | get_allocator () const noexcept |
| Returns the associated allocator. | |
| template<typename ... args_t> | |
| auto | emplace (xtd::collections::generic::list< value_type >::const_iterator pos, args_t &&... args) -> void |
| Inserts specified element at specified position. | |
| template<typename ... args_t> | |
| auto | emplace_back (args_t &&... args) -> void |
| Adds an element to the end. | |
| auto | erase (xtd::collections::generic::list< value_type >::iterator pos) |
| Erases element at specified position. | |
| auto | erase (xtd::collections::generic::list< value_type >::const_iterator pos) |
| Erases element at specified position. | |
| auto | erase (xtd::collections::generic::list< value_type >::iterator first, xtd::collections::generic::list< value_type >::iterator last) |
| Erases elements at specified range. | |
| auto | erase (xtd::collections::generic::list< value_type >::const_iterator first, xtd::collections::generic::list< value_type >::const_iterator last) |
| Erases elements at specified range. | |
| auto | erase_at (xtd::usize index) -> void |
| Erases element at specified index. | |
| auto | insert (xtd::collections::generic::list< value_type >::const_iterator pos, const type_t &value) |
| Inserts specified element at specified position. | |
| auto | insert (xtd::collections::generic::list< value_type >::const_iterator pos, type_t &&value) |
| Inserts specified element at specified position. | |
| auto | insert_at (xtd::usize index, const type_t &value) -> void |
| Inserts specified element at specified index. | |
| auto | pop_back () -> void |
| Removes the last element of the container. | |
| auto | push_back (const type_t &item) -> void |
| Adds an element to the end. | |
| auto | push_back (type_t &&item) -> void |
| Adds an element to the end. | |
| auto | push_back_range (const arranged_element_collection &collection) -> void |
| Adds elements to the end. | |
| auto | push_back_range (const std::vector< type_t > &collection) -> void |
| Adds elements to the end. | |
| auto | push_back_range (const std::initializer_list< type_t > &collection) -> void |
| Adds elements to the end. | |
| template<typename collection_t> | |
| auto | push_back_range (collection_t &&collection) -> void |
| Adds elements to the end. | |
| template<typename iterator_t> | |
| auto | push_back_range (iterator_t begin, iterator_t end) -> void |
| Adds elements to the end. | |
| auto | to_vector () const noexcept -> std::vector< type_t > |
| Gets an array with the elements of the container. | |
| auto | rbegin () noexcept |
| Returns a reverse iterator to the end. | |
| auto | rbegin () const noexcept |
| Returns a reverse iterator to the end. | |
| auto | rend () noexcept |
| Returns a reverse iterator to the end. | |
| auto | rend () const noexcept |
| Returns a reverse iterator to the end. | |
| auto | reserve (size_type size) -> void |
| Reserves storage. | |
| auto | shrink_to_fit () -> void |
| Reduces memory usage by freeing unused memory. | |
Protected Methods | |
| virtual auto | on_item_added (xtd::usize index, type_t &item) -> void |
| Raises the xtd::forms::layout::arranged_element_collection::item_added event. | |
| virtual auto | on_item_updated (xtd::usize index, type_t &item) -> void |
| Raises the xtd::forms::layout::arranged_element_collection::item_updated event. | |
| virtual auto | on_item_removed (xtd::usize index, type_t &item) -> void |
| Raises the xtd::forms::layout::arranged_element_collection::item_removed event. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | equals (const object &obj) const noexcept -> bool |
| Determines whether the specified object is equal to the current object. | |
| virtual auto | get_hash_code () const noexcept -> xtd::usize |
| Serves as a hash function for a particular type. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::base_type |
Represents the list base type.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_base_type |
Represents the list base type.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::size_type |
Represents the list size type (usually xtd::usize).
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::reference |
Represents the reference of list value type.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_reference |
Represents the const reference of list value type.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::pointer |
Represents the pointer of list value type.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_pointer |
Represents the const pointer of list value type.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::read_only_collection |
Represents the read only collection of of list.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::reverse_iterator |
Represents the reverse iterator type of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_reverse_iterator |
Represents the const reverse iterator type of the collection.
|
default |
Initializes a new instance of the xtd::forms::layout::arranged_element_collection class that is empty.
|
inlineexplicit |
Constructs the container with specified count default-inserted instances of type_t. No copies are made.
| capacity | The number of elements that the new list can initially store. |
| xtd::out_of_memory | There is not enough memory available on the system. |
|
inline |
Initializes a new instance of the xtd::forms::layout::arranged_element_collection <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
| collection | The collection whose elements are copied to the new list. |
|
inline |
Default copy constructor with specified list.
| collection | The xtd::forms::layout::arranged_element_collection which elements will be inserted from. |
|
inline |
Move constructor with specified list.
| list | The xtd::forms::layout::arranged_element_collection which elements will be moved from. |
|
inline |
Copy constructor with specified base type list.
| list | The xtd::forms::layout::arranged_element_collection::base_type which elements will be inserted from. |
|
inline |
Move constructor with specified base type list.
| list | The xtd::forms::layout::arranged_element_collection::base_type which elements will be moved from. |
|
inline |
Constructs the container with the contents of the specified initializer list, and allocator.
| items | The initializer list to initialize the elements of the container with. |
|
inline |
Constructs the container with the contents of the range [first, last).
| first | The first iterator the range to copy the elements from. |
| last | The last iterator the range to copy the elements from. |
| alloc | The allocator to use for all memory allocations of this container. |
|
inlinenodiscardnoexcept |
Gets the total number of elements the internal data structure can hold without resizing.
| xtd::argument_out_of_range_exception | xtd::collections::generic::list::capacity is set to a value that is less than xtd::collections::generic::list::count. |
|
inline |
Sets the total number of elements the internal data structure can hold without resizing.
| xtd::out_of_memory | There is not enough memory available on the system. |
| xtd::argument_out_of_range_exception | xtd::collections::generic::list::capacity is set to a value that is less than xtd::collections::generic::list::count. |
|
inlinenodiscardoverridenoexcept |
Gets the number of elements contained in the xtd::forms::layout::arranged_element_collection <type_t>.
|
inlinenodiscard |
Direct access to the underlying array.
|
inlinenodiscard |
Direct access to the underlying array.
|
inlinenodiscard |
Returns the underlying base type items.
|
inlinenodiscard |
Returns the underlying base type items.
|
inlinenodiscardvirtualnoexcept |
Checks whether the container is sorted.
|
inlinevirtual |
Sets the container is sorted.
| value | true if container is sorted; otherwise false. |
|
inlineoverride |
Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
| item | The object to add to the xtd::forms::layout::arranged_element_collection <type_t>. |
|
inlinevirtual |
Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
| item | The object to add to the xtd::forms::layout::arranged_element_collection <type_t>. |
|
inlinevirtual |
Adds elements to the end.
| collection | The elements to add. |
|
inlinevirtual |
Adds elements to the end.
| collection | The elements to add. |
|
inlinevirtual |
Adds elements to the end.
| collection | The elements to add. |
|
inline |
Adds elements to the end.
| collection | The elements to add. |
|
inline |
Adds elements to the end.
| collection | The elements to add. |
|
inlineoverride |
Removes all items from the xtd::forms::layout::arranged_element_collection <type_t>.
|
inlinenodiscardoverridenoexcept |
Determines whether the xtd::forms::layout::arranged_element_collection <type_t> contains a specific value.
| item | The object to locate in the xtd::forms::layout::arranged_element_collection <type_t>. |
|
inlineoverride |
Copies the elements of the xtd::forms::layout::arranged_element_collection <type_t> to an xtd::array, starting at a particular xtd::array index.
| array | The one-dimensional xtd::array that is the destination of the elements copied from xtd::forms::layout::arranged_element_collection <type_t>. The xtd::array must have zero-based indexing. |
| array_index | The zero-based index in array at which copying begins. |
| xtd::argument_exception | The number of elements in the source xtd::forms::layout::arranged_element_collection <type_t> is greater than the available space from `array_index` to the end of the destination `array`. |
|
inlinenodiscardoverridenoexcept |
Returns an enumerator that iterates through the xtd::forms::layout::arranged_element_collection <type_t>.
|
inlinevirtual |
Inserts specified element at specified index.
| index | The index before which the content will be inserted. |
| value | The element to insert. |
Reimplemented in xtd::forms::control::control_collection.
|
inlinevirtual |
Sorts the content.
|
inlineoverride |
Removes the first occurrence of a specific object from the xtd::forms::layout::arranged_element_collection <type_t>.
| item | The object to remove from the xtd::forms::layout::arranged_element_collection <type_t>. |
|
inlinevirtual |
Erases element at specified index.
| pos | The index which the content will be erased. |
|
inline |
Reverses the order of the elements in the entire xtd::collections::generic::list <type_t>.
|
inline |
Reverses the order of the elements in the specified range.
| index | The zero-based starting index of the range to reverse. |
| count | The number of elements in the range to reverse. |
| xtd::argument_out_of_range_exception | `index` and `count` do not denote a valid range of elements in the xtd::collections::generic::list <type_t>. |
|
inlinenodiscardnoexcept |
Gets an array with the elements of the container.
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of other.
| other | Another container to use as data source. |
|
inlinenoexcept |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards.
| other | Another base type container to use as data source. |
|
inline |
Replaces the contents with those identified by initializer list ilist.
| items | Initializer list to use as data source |
|
inlinenodiscard |
Access specified element.
| index | The position of the element to return. |
|
inlinenodiscard |
Access specified element.
| index | The position of the element to return. |
|
inlinenodiscardnoexcept |
Returns a reference to the underlying base type.
|
inlinenodiscardnoexcept |
Returns a reference to the underlying base type.
|
inlinenodiscardnoexcept |
Returns the maximum possible number of elements.
|
inlinenodiscard |
Access specified element with bounds checking.
| pos | The position of the element to return. |
| std::out_of_range | pos is greater than arranged_element_collection::size. |
|
inlinenodiscard |
Access specified element with bounds checking.
| pos | The position of the element to return. |
| std::out_of_range | pos is greater than arranged_element_collection::size. |
|
inlinenodiscard |
Access the last element.
|
inlinenodiscard |
Access the last element.
|
inlinenodiscardnoexcept |
Returns a reverse iterator to the end.
|
inlinenodiscardnoexcept |
Returns a reverse iterator to the end.
|
inlinenodiscard |
Access the first element.
|
inlinenodiscard |
Access the first element.
|
inlinenodiscardnoexcept |
Returns the associated allocator.
|
inline |
Inserts specified element at specified position.
| pos | The iterator before which the content will be inserted. pos may be the arranged_element_collection::end iterator. |
| args | The arguments to forward to the constructor of the element |
|
inline |
Adds an element to the end.
| args | The arguments to forward to the constructor of the element |
|
inline |
Erases element at specified position.
| pos | The iterator which the content will be erased. |
|
inline |
Erases element at specified position.
| pos | The iterator which the content will be erased. |
|
inline |
Erases elements at specified range.
| first | The first iterator range which the content will be erased. |
| first | The last iterator range which the content will be erased. |
|
inline |
Erases elements at specified range.
| first | The first iterator range which the content will be erased. |
| first | The last iterator range which the content will be erased. |
|
inline |
Erases element at specified index.
| pos | The index which the content will be erased. |
|
inline |
Inserts specified element at specified position.
| pos | The iterator before which the content will be inserted. pos may be the arranged_element_collection::end iterator. |
| value | The element to insert. |
|
inline |
Inserts specified element at specified position.
| pos | The iterator before which the content will be inserted. pos may be the arranged_element_collection::end iterator. |
| value | The element to insert. |
|
inline |
Inserts specified element at specified index.
| index | The index before which the content will be inserted. |
| value | The element to insert. |
|
inline |
Removes the last element of the container.
|
inline |
Adds an element to the end.
| item | The element to add. |
|
inline |
Adds an element to the end.
| item | The element to add. |
|
inline |
Adds elements to the end.
| collection | The elements to add. |
|
inline |
Adds elements to the end.
| collection | The elements to add. |
|
inline |
Adds elements to the end.
| collection | The elements to add. |
|
inline |
Adds elements to the end.
| collection | The elements to add. |
|
inline |
Adds elements to the end.
| collection | The elements to add. |
|
inlinenodiscardnoexcept |
Gets an array with the elements of the container.
|
inlinenodiscardnoexcept |
Returns a reverse iterator to the end.
|
inlinenodiscardnoexcept |
Returns a reverse iterator to the end.
|
inlinenodiscardnoexcept |
Returns a reverse iterator to the end.
|
inlinenodiscardnoexcept |
Returns a reverse iterator to the end.
|
inline |
Reserves storage.
|
inline |
Reduces memory usage by freeing unused memory.
|
inlineprotectedvirtual |
Raises the xtd::forms::layout::arranged_element_collection::item_added event.
| index | The index of the item. |
| item | The item added. |
|
inlineprotectedvirtual |
Raises the xtd::forms::layout::arranged_element_collection::item_updated event.
| index | The index of the item. |
| item | The item updated. |
|
inlineprotectedvirtual |
Raises the xtd::forms::layout::arranged_element_collection::item_removed event.
| index | The index of the item. |
| item | The item removed. |
Reimplemented in xtd::forms::control::control_collection.
|
inlinestaticconstexpr |
Represents a value that is not a valid position in a collection.
|
inlinestaticconstexpr |
Represents the index of the first valid element in a collection.
|
inlinestaticconstexpr |
Represents the index of the last valid element in a collection.
| event<arranged_element_collection, delegate<void(xtd::usize, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_added |
Occurs when an item is added to the collection.
| event<arranged_element_collection, delegate<void(xtd::usize, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_updated |
Occurs when an item is updated in the collection.
| event<arranged_element_collection, delegate<void(xtd::usize, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_removed |
Occurs when an item is removed from the collection.