Represents a collection of objects.
Classes | |
| class | value_type |
| Represents the value type of the collection. More... | |
Alias | |
| using | allocator_type = std::allocator< value_type > |
| Represents the allocator type of the collection. More... | |
| using | size_type = std::size_t |
| Represents the size type of the collection. More... | |
| using | difference_type = std::ptrdiff_t |
| Represents the pointer difference type of the collection. More... | |
| using | reference = value_type & |
| Represents the value type reference of the collection. More... | |
| using | const_reference = const value_type & |
| Represents the value type const reference the collection. More... | |
| using | pointer = typename std::allocator_traits< allocator_type >::pointer |
| Represents the value type pointer of the collection. More... | |
| using | const_pointer = typename std::allocator_traits< allocator_type >::const_pointer |
| Represents the value type const pointer of the collection. More... | |
| using | iterator = typename std::vector< value_type >::iterator |
| Represents the iterator type of the collection. More... | |
| using | const_iterator = typename std::vector< value_type >::const_iterator |
| Represents the const iterator type of the collection. More... | |
| using | reverse_iterator = typename std::vector< value_type >::reverse_iterator |
| Represents the reverse iterator type of the collection. More... | |
| using | const_reverse_iterator = typename std::vector< value_type >::const_reverse_iterator |
| Represents the const reverse iterator type of the collection. More... | |
Fields | |
| static const size_t | npos = std::numeric_limits<size_t>::max() |
| This is a special value equal to the maximum value representable by the type size_t. More... | |
Constructors | |
| arranged_element_collection (const allocator_type &allocator=allocator_type()) | |
| Creates a new object xtd::forms::layout::arranged_element_collection with specified allocator (optional). More... | |
| arranged_element_collection (const std::initializer_list< type_t > &il) | |
| Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list. More... | |
Methods | |
| allocator_type | get_allocator () const noexcept |
| Returns the associated allocator. More... | |
| reference | at (size_type pos) |
| Access specified element with bounds checking. More... | |
| const_reference | at (size_type pos) const |
| Access specified element with bounds checking. More... | |
| reference | front () |
| Access the first element. More... | |
| const_reference | front () const |
| Access the first element. More... | |
| reference | back () |
| Access the last element. More... | |
| const_reference | back () const |
| Access the last element. More... | |
| pointer | data () |
| Direct access to the underlying array. More... | |
| const_pointer | data () const |
| Direct access to the underlying array. More... | |
| iterator | begin () noexcept |
| Returns an iterator to the beginning. More... | |
| const_iterator | begin () const noexcept |
| Returns an iterator to the beginning. More... | |
| const_iterator | cbegin () const noexcept |
| Returns an iterator to the beginning. More... | |
| iterator | end () noexcept |
| Returns an iterator to the end. More... | |
| const_iterator | end () const noexcept |
| Returns an iterator to the end. More... | |
| const_iterator | cend () const noexcept |
| Returns an iterator to the end. More... | |
| reverse_iterator | rbegin () noexcept |
| Returns a reverse iterator to the end. More... | |
| const_reverse_iterator | rbegin () const noexcept |
| Returns a reverse iterator to the end. More... | |
| const_reverse_iterator | crbegin () const noexcept |
| Returns a reverse iterator to the end. More... | |
| reverse_iterator | rend () noexcept |
| Returns a reverse iterator to the end. More... | |
| const_reverse_iterator | rend () const noexcept |
| Returns a reverse iterator to the end. More... | |
| const_reverse_iterator | crend () const noexcept |
| Returns a reverse iterator to the end. More... | |
| bool | empty () const noexcept |
| Checks whether the container is empty. More... | |
| size_type | size () const noexcept |
| Returns the number of elements. More... | |
| size_type | max_size () const noexcept |
| Returns the maximum possible number of elements. More... | |
| void | reserve (size_type size) |
| Reserves storage. More... | |
| size_type | capacity () const noexcept |
| Returns the number of elements that can be held in currently allocated storage. More... | |
| void | shrink_to_fit () |
| Reduces memory usage by freeing unused memory. More... | |
| bool | sorted () const noexcept |
| Checks whether the container is sorted. More... | |
| void | sorted (bool value) |
| Sets the container is sorted. More... | |
| void | clear () noexcept |
| clears the contents. More... | |
| iterator | insert (const_iterator pos, const value_type &value) |
| Inserts specified element at specified position. More... | |
| iterator | insert (const_iterator pos, const value_type &&value) |
| Inserts specified element at specified position. More... | |
| void | insert_at (size_t index, const value_type &value) |
| Inserts specified element at specified index. More... | |
| template<typename ... args_t> | |
| void | emplace (const_iterator pos, args_t &&... args) |
| Inserts specified element at specified position. More... | |
| template<typename ... args_t> | |
| void | emplace_back (args_t &&... args) |
| Adds an element to the end. More... | |
| iterator | erase (iterator pos) |
| Erases element at specified position. More... | |
| iterator | erase (const_iterator pos) |
| Erases element at specified position. More... | |
| iterator | erase (iterator first, iterator last) |
| Erases elements at specified range. More... | |
| iterator | erase (const_iterator first, const_iterator last) |
| Erases elements at specified range. More... | |
| void | erase_at (size_t index) |
| Erases element at specified index. More... | |
| void | pop_back () |
| Removes the last element of the container. More... | |
| void | push_back (const value_type &item) |
| Adds an element to the end. More... | |
| void | push_back (value_type &&item) |
| Adds an element to the end. More... | |
| void | push_back_range (const arranged_element_collection &collection) |
| Adds elements to the end. More... | |
| void | push_back_range (const std::vector< value_type > &collection) |
| Adds elements to the end. More... | |
| void | push_back_range (const std::initializer_list< value_type > &collection) |
| Adds elements to the end. More... | |
| template<typename collection_t > | |
| void | push_back_range (collection_t &&collection) |
| Adds elements to the end. More... | |
| template<typename iterator_t > | |
| void | push_back_range (iterator_t begin, iterator_t end) |
| Adds elements to the end. More... | |
| void | sort () |
| Sorts the content. More... | |
| std::vector< type_t > | to_array () const noexcept |
| Gets an array with the elements of the container. More... | |
| std::vector< type_t > | to_vector () const noexcept |
| Gets an array with the elements of the container. More... | |
Operators | |
| reference | operator[] (size_type pos) |
| Access specified element. More... | |
| const_reference | operator[] (size_type pos) const |
| Access specified element. More... | |
Events | |
| event< arranged_element_collection, delegate< void(size_t, type_t &item)> > | item_added |
| Occurs when an item is added to the collection. More... | |
| event< arranged_element_collection, delegate< void(size_t, type_t &item)> > | item_updated |
| Occurs when an item is updated in the collection. More... | |
| event< arranged_element_collection, delegate< void(size_t, type_t &item)> > | item_removed |
| Occurs when an item is removed from the collection. More... | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::object | |
| object ()=default | |
| Create a new instance of the ultimate base class object. More... | |
| bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More... | |
| virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More... | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. More... | |
| template<typename object_t > | |
| std::unique_ptr< object_t > | memberwise_clone () const noexcept |
| Creates a shallow copy of the current object. More... | |
| virtual xtd::ustring | to_string () const noexcept |
| Returns a sxd::ustring that represents the current object. More... | |
Static Public Member Functions inherited from xtd::object | |
| static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More... | |
| static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More... | |
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::allocator_type = std::allocator<value_type> |
Represents the allocator type of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_iterator = typename std::vector<value_type>::const_iterator |
Represents the const iterator type of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_pointer = typename std::allocator_traits<allocator_type>::const_pointer |
Represents the value type const pointer of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_reference = const value_type& |
Represents the value type const reference the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_reverse_iterator = typename std::vector<value_type>::const_reverse_iterator |
Represents the const reverse iterator type of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::difference_type = std::ptrdiff_t |
Represents the pointer difference type of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::iterator = typename std::vector<value_type>::iterator |
Represents the iterator type of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::pointer = typename std::allocator_traits<allocator_type>::pointer |
Represents the value type pointer of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::reference = value_type& |
Represents the value type reference of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::reverse_iterator = typename std::vector<value_type>::reverse_iterator |
Represents the reverse iterator type of the collection.
| using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::size_type = std::size_t |
Represents the size type of the collection.
|
inlineexplicit |
Creates a new object xtd::forms::layout::arranged_element_collection with specified allocator (optional).
| allocator | The allocator associate to the collection (optional). |
|
inline |
Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list.
| il | The initializer list that contains items to fill the collection. |
|
inline |
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. |
|
inline |
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. |
|
inline |
Access the last element.
|
inline |
Access the last element.
|
inlinenoexcept |
Returns an iterator to the beginning.
|
inlinenoexcept |
Returns an iterator to the beginning.
|
inlinenoexcept |
Returns the number of elements that can be held in currently allocated storage.
|
inlinenoexcept |
Returns an iterator to the beginning.
|
inlinenoexcept |
Returns an iterator to the end.
|
inlinenoexcept |
clears the contents.
|
inlinenoexcept |
Returns a reverse iterator to the end.
|
inlinenoexcept |
Returns a reverse iterator to the end.
|
inline |
Direct access to the underlying array.
|
inline |
Direct access to the underlying array.
|
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 |
|
inlinenoexcept |
Checks whether the container is empty.
|
inlinenoexcept |
Returns an iterator to the end.
|
inlinenoexcept |
Returns an iterator to the end.
|
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 |
Access the first element.
|
inline |
Access the first element.
|
inlinenoexcept |
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. |
| 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.
| pos | The index before which the content will be inserted. |
| value | The element to insert. |
|
inlinenoexcept |
Returns the maximum possible number of elements.
|
inline |
Access specified element.
|
inline |
Access specified element.
|
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 |
|
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. |
|
inlinenoexcept |
Returns a reverse iterator to the end.
|
inlinenoexcept |
Returns a reverse iterator to the end.
|
inlinenoexcept |
Returns a reverse iterator to the end.
|
inlinenoexcept |
Returns a reverse iterator to the end.
|
inline |
Reserves storage.
|
inline |
Reduces memory usage by freeing unused memory.
|
inlinenoexcept |
Returns the number of elements.
|
inline |
Sorts the content.
|
inlinenoexcept |
Checks whether the container is sorted.
|
inline |
Sets the container is sorted.
| value | true if container is sorted; otherwise false. |
|
inlinenoexcept |
Gets an array with the elements of the container.
|
inlinenoexcept |
Gets an array with the elements of the container.
| event<arranged_element_collection, delegate<void(size_t, 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(size_t, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_removed |
Occurs when an item is removed from the collection.
| event<arranged_element_collection, delegate<void(size_t, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_updated |
Occurs when an item is updated in the collection.
|
inlinestatic |
This is a special value equal to the maximum value representable by the type size_t.