|
xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
|
A class that provides access to the child elements of an element. More...
#include <xentara/workbench/model/ChildElementAccessor.hpp>
Classes | |
| class | Iterator |
Public Types | |
| using | value_type = Element |
| The element type. | |
| using | size_type = std::size_t |
| The type used for sizes. | |
| using | difference_type = std::ptrdiff_t |
| The type used for distances. | |
| using | reference = value_type & |
| A reference to an element. | |
| using | const_reference = const value_type & |
| A const reference to an element. | |
| using | pointer = Element * |
| A pointer to an element. | |
| using | const_pointer = const Element * |
| A const pointer to an element. | |
| using | iterator = Iterator |
| An iterator. | |
| using | const_iterator = Iterator |
| A const iterator. | |
| using | reverse_iterator = std::reverse_iterator< iterator > |
| An iterator for iterating in reverse order. | |
| using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
| A const iterator for iterating in reverse order. | |
Public Member Functions | |
Constructors | |
| ChildElementAccessor ()=default | |
| Default constructor. | |
Element Access | |
| auto | at (size_type index) const -> const_reference |
| Accesses the child element at a certain index. | |
| auto | operator[] (size_type index) const noexcept -> const_reference |
| Subscript operator. | |
| auto | front () const noexcept -> const_reference |
| Returns the first element. | |
| auto | back () const noexcept -> const_reference |
| Returns the last element. | |
Iterators | |
| constexpr auto | begin () const noexcept -> const_iterator |
| Creates a begin iterator. | |
| constexpr auto | cbegin () const noexcept -> const_iterator |
| Creates a begin iterator. | |
| constexpr auto | end () const noexcept -> const_iterator |
| Creates an end iterator. | |
| constexpr auto | cend () const noexcept -> const_iterator |
| Creates an end iterator. | |
| constexpr auto | rbegin () const noexcept -> const_reverse_iterator |
| Creates a reverse begin iterator. | |
| constexpr auto | crbegin () const noexcept -> const_reverse_iterator |
| Creates a reverse begin iterator. | |
| constexpr auto | rend () const noexcept -> const_reverse_iterator |
| Creates a reverse end iterator. | |
| constexpr auto | crend () const noexcept -> const_reverse_iterator |
| Creates a reverse end iterator. | |
Capacity | |
| constexpr auto | empty () const noexcept -> bool |
| Determines whether the data is empty. | |
| constexpr auto | size () const noexcept -> size_type |
| Gets the size of the data. | |
A class that provides access to the child elements of an element.
This class is a special random access container class that allows you to access the child elements of an element. The accessor is index-based, and allows access to any element in constant time similar to std::accessor and std::array.
This is a lightweight reference object similar to std::span, and does not actually contain the children. Copying the object does not copy the actual child elements.
A const iterator.
A const pointer to an element.
A const reference to an element.
| using xentara::workbench::model::ChildElementAccessor::const_reverse_iterator = std::reverse_iterator<const_iterator> |
A const iterator for iterating in reverse order.
The type used for distances.
An iterator.
A pointer to an element.
A reference to an element.
| using xentara::workbench::model::ChildElementAccessor::reverse_iterator = std::reverse_iterator<iterator> |
An iterator for iterating in reverse order.
The type used for sizes.
The element type.
|
default |
Default constructor.
This constructor construct an accessor for an empty element list.
| auto xentara::workbench::model::ChildElementAccessor::at | ( | size_type | index | ) | const -> const_reference |
Accesses the child element at a certain index.
| index | The index |
| std::out_of_range | index is out of range |
|
noexcept |
Returns the last element.
|
constexprnoexcept |
Creates a begin iterator.
|
constexprnoexcept |
Creates a begin iterator.
|
constexprnoexcept |
Creates an end iterator.
|
constexprnoexcept |
Creates a reverse begin iterator.
|
constexprnoexcept |
Creates a reverse end iterator.
|
constexprnoexcept |
Determines whether the data is empty.
|
constexprnoexcept |
Creates an end iterator.
|
noexcept |
Returns the first element.
|
noexcept |
Subscript operator.
Returns a reference to the child element at a certain index
| index | The index |
|
constexprnoexcept |
Creates a reverse begin iterator.
|
constexprnoexcept |
Creates a reverse end iterator.
|
constexprnoexcept |
Gets the size of the data.