![]() |
xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <arranged_element_collection.h>
Represents a collection of objects.
Classes | |
| class | value_type |
| Represents the value type of the collection. More... | |
Public Types | |
| using | allocator_type = std::allocator< value_type > |
| Represents the allocator type of the collection. | |
| using | const_iterator = typename std::vector< value_type >::const_iterator |
| Represents the const iterator type of the collection. | |
| using | const_pointer = typename std::allocator_traits< allocator_type >::const_pointer |
| Represents the value type const pointer of the collection. | |
| using | const_reference = const value_type & |
| Represents the value type const reference the collection. | |
| using | const_reverse_iterator = typename std::vector< value_type >::const_reverse_iterator |
| Represents the const reverse iterator type of the collection. | |
| using | difference_type = std::ptrdiff_t |
| Represents the pointer difference type of the collection. | |
| using | iterator = typename std::vector< value_type >::iterator |
| Represents the iterator type of the collection. | |
| using | pointer = typename std::allocator_traits< allocator_type >::pointer |
| Represents the value type pointer of the collection. | |
| using | reference = value_type & |
| Represents the value type reference of the collection. | |
| using | reverse_iterator = typename std::vector< value_type >::reverse_iterator |
| Represents the reverse iterator type of the collection. | |
| using | size_type = std::size_t |
| Represents the size type of the collection. | |
Public Attributes | |
| event< arranged_element_collection, delegate< void(size_t, type_t &item)> > | item_added |
| Occurs when an item is added to the collection. | |
| event< arranged_element_collection, delegate< void(size_t, type_t &item)> > | item_erased |
| Occurs when an item is erased from the collection. | |
| event< arranged_element_collection, delegate< void(size_t, type_t &item)> > | item_updated |
| Occurs when an item is updated in the collection. | |
Static Public Attributes | |
| static const size_type | npos |
| This is a special value equal to the maximum value representable by the type size_t. | |
Public Member Functions | |
| arranged_element_collection (const allocator_type &allocator=allocator_type()) | |
| Creates a new object xtd::forms::layout::arranged_element_collection with specified allocator (optional). | |
| arranged_element_collection (const std::initializer_list< type_t > &il) | |
| Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list. | |
| reference | at (size_type pos) |
| Access specified element with bounds checking. | |
| const_reference | at (size_type pos) const |
| Access specified element with bounds checking. | |
| reference | back () |
| Access the last element. | |
| const_reference | back () const |
| Access the last element. | |
| iterator | begin () |
| Returns an iterator to the beginning. | |
| const_iterator | begin () const |
| Returns an iterator to the beginning. | |
| size_type | capacity () const |
| Returns the number of elements that can be held in currently allocated storage. | |
| const_iterator | cbegin () const |
| Returns an iterator to the beginning. | |
| const_iterator | cend () const |
| Returns an iterator to the end. | |
| void | clear () |
| clears the contents. | |
| const_reverse_iterator | crbegin () const |
| Returns a reverse iterator to the end. | |
| const_reverse_iterator | crend () const |
| Returns a reverse iterator to the end. | |
| pointer | data () |
| Direct access to the underlying array. | |
| const_pointer | data () const |
| Direct access to the underlying array. | |
| bool | empty () const |
| Checks whether the container is empty. | |
| iterator | end () |
| Returns an iterator to the end. | |
| const_iterator | end () const |
| Returns an iterator to the end. | |
| iterator | erase (const_iterator first, const_iterator last) |
| Erases elements at specified range. | |
| iterator | erase (const_iterator pos) |
| Erases element at specified position. | |
| iterator | erase (iterator first, iterator last) |
| Erases elements at specified range. | |
| iterator | erase (iterator pos) |
| Erases element at specified position. | |
| void | erase_at (size_t index) |
| Erases element at specified index. | |
| reference | front () |
| Access the first element. | |
| const_reference | front () const |
| Access the first element. | |
| allocator_type | get_allocator () const |
| Returns the associated allocator. | |
| iterator | insert (const_iterator pos, const value_type &&value) |
| Inserts specified element at specified position. | |
| iterator | insert (const_iterator pos, const value_type &value) |
| Inserts specified element at specified position. | |
| iterator | insert (iterator pos, const value_type &value) |
| Inserts specified element at specified position. | |
| void | insert_at (size_t index, const value_type &value) |
| Inserts specified element at specified index. | |
| size_type | max_size () const |
| Returns the maximum possible number of elements. | |
| reference | operator[] (size_type pos) |
| Access specified element. | |
| const_reference | operator[] (size_type pos) const |
| Access specified element. | |
| void | push_back (const value_type &item) |
| Adds an element to the end. | |
| void | push_back (value_type &&item) |
| Adds an element to the end. | |
| template<typename collection_t > | |
| void | push_back_range (collection_t collection) |
| Adds elements to the end. | |
| void | push_back_range (const arranged_element_collection &collection) |
| Adds elements to the end. | |
| void | push_back_range (const std::initializer_list< value_type > &collection) |
| Adds elements to the end. | |
| void | push_back_range (const std::vector< value_type > &collection) |
| Adds elements to the end. | |
| reverse_iterator | rbegin () |
| Returns a reverse iterator to the end. | |
| const_reverse_iterator | rbegin () const |
| Returns a reverse iterator to the end. | |
| reverse_iterator | rend () |
| Returns a reverse iterator to the end. | |
| const_reverse_iterator | rend () const |
| Returns a reverse iterator to the end. | |
| void | reserve (size_type size) |
| Reserves storage. | |
| void | shrink_to_fit () |
| Reduces memory usage by freeing unused memory. | |
| size_type | size () const |
| Returns the number of elements. | |
| void | sort () |
| Sorts the content. | |
| bool | sorted () const |
| Checks whether the container is sorted. | |
| void | sorted (bool value) |
| Sets the container is sorted. | |
| std::vector< type_t > | to_array () const |
| Gets an array with the elements of the container. | |
| std::vector< type_t > | to_vector () const |
| Gets an array with the elements of the container. | |
| 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.
|
inline |
Returns an iterator to the beginning.
|
inline |
Returns an iterator to the beginning.
|
inline |
Returns the number of elements that can be held in currently allocated storage.
|
inline |
Returns an iterator to the beginning.
|
inline |
Returns an iterator to the end.
|
inline |
clears the contents.
|
inline |
Returns a reverse iterator to the end.
|
inline |
Returns a reverse iterator to the end.
|
inline |
Direct access to the underlying array.
|
inline |
Direct access to the underlying array.
|
inline |
Checks whether the container is empty.
|
inline |
Returns an iterator to the end.
|
inline |
Returns an iterator to the end.
|
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 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 element at specified position.
| pos | The iterator 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.
|
inline |
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 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. |
|
inline |
Returns the maximum possible number of elements.
|
inline |
Access specified element.
|
inline |
Access specified element.
|
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 |
Returns a reverse iterator to the end.
|
inline |
Returns a reverse iterator to the end.
|
inline |
Returns a reverse iterator to the end.
|
inline |
Returns a reverse iterator to the end.
|
inline |
Reserves storage.
|
inline |
Reduces memory usage by freeing unused memory.
|
inline |
Returns the number of elements.
|
inline |
Sorts the content.
|
inline |
Checks whether the container is sorted.
|
inline |
Sets the container is sorted.
| value | true if container is sorted; otherwise false. |
|
inline |
Gets an array with the elements of the container.
|
inline |
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_erased |
Occurs when an item is erased 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.
|
static |
This is a special value equal to the maximum value representable by the type size_t.