xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
Loading...
Searching...
No Matches
xentara::workbench::skill::SubElementVector< Element, Allocator > Class Template Reference

A vector that can be used to hold sub elements. More...

#include <xentara/workbench/skill/SubElementVector.hpp>

+ Inheritance diagram for xentara::workbench::skill::SubElementVector< Element, Allocator >:

Public Types

using value_type = typename RawVector::value_type
 The element type.
 
using allocator_type = typename RawVector::allocator_type
 The Allocator type.
 
using size_type = typename RawVector::size_type
 The type used for sizes.
 
using difference_type = typename RawVector::difference_type
 The type used for distances.
 
using reference = typename RawVector::reference
 A reference to an element.
 
using const_reference = typename RawVector::const_reference
 A const reference to an element.
 
using pointer = typename RawVector::pointer
 A pointer to an element.
 
using const_pointer = typename RawVector::const_pointer
 A const pointer to an element.
 
using iterator = const_iterator
 An iterator.
 
using const_iterator = typename RawVector::const_iterator
 A const iterator.
 
using reverse_iterator = typename RawVector::reverse_iterator
 An iterator for iterating in reverse order.
 
using const_reverse_iterator = typename RawVector::const_reverse_iterator
 A const iterator for iterating in reverse order.
 

Public Member Functions

auto operator= (const SubElementVector &rhs) -> SubElementVector &
 Assignment operator.
 
auto operator= (SubElementVector &&rhs) -> SubElementVector &
 Move-Assignment operator.
 
template<std::input_iterator InputIterator>
auto assign (size_type count, const SubElementPointer< Element > &value) -> void
 Replaces the contents of the vector with copies of a specific element.
 
template<std::input_iterator InputIterator>
auto assign (InputIterator first, InputIterator last) -> void
 Copies a range of elements.
 
Constructors
 SubElementVector () noexcept(noexcept(Allocator {}))=default
 Default constructor.
 
 SubElementVector (const Allocator &allocator)
 Constructor that sets the allocator.
 
 SubElementVector (size_type size, const Allocator &allocator=Allocator())
 Constructor that creates a vector of a certain size.
 
 SubElementVector (size_type size, const SubElementPointer< Element > &value, const Allocator &allocator=Allocator())
 Constructor that fills the vector with copies of a specific element.
 
template<std::input_iterator InputIterator>
 SubElementVector (InputIterator first, InputIterator last, const Allocator &allocator=Allocator())
 Constructor that moves a range of elements.
 
 SubElementVector (const SubElementVector &other)
 Copy constructor.
 
 SubElementVector (SubElementVector &&other)
 Move constructor.
 
 SubElementVector (const SubElementVector &other, const std::type_identity_t< Allocator > &allocator)
 Copy constructor that uses a different allocator.
 
 SubElementVector (SubElementVector &&other, const std::type_identity_t< Allocator > &allocator) noexcept
 Move constructor that uses a different allocator.
 
Element Access
auto at (size_type index) const -> const_reference
 Accesses the 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.
 
auto data () const noexcept -> const value_type *
 Raw access to the data.
 
Iterators
auto begin () const noexcept -> const_iterator
 Creates a begin iterator.
 
auto cbegin () const noexcept -> const_iterator
 Creates a begin iterator.
 
auto end () const noexcept -> const_iterator
 Creates an end iterator.
 
auto cend () const noexcept -> const_iterator
 Creates an end iterator.
 
auto rbegin () const noexcept -> const_reverse_iterator
 Creates a reverse begin iterator.
 
auto crbegin () const noexcept -> const_reverse_iterator
 Creates a reverse begin iterator.
 
auto rend () const noexcept -> const_reverse_iterator
 Creates a reverse end iterator.
 
auto crend () const noexcept -> const_reverse_iterator
 Creates a reverse end iterator.
 
Size and Capacity
auto empty () const noexcept -> bool
 Determines whether the data is empty.
 
auto size () const noexcept -> size_type
 Gets the size of the data.
 
auto max_size () const noexcept -> size_type
 Gets the maximum possible data size.
 
auto reserve (size_type capacity) -> void
 Increases the capacity to a minimum value.
 
auto capacity () const noexcept -> size_type
 Gets the capacity of the data.
 
auto shrink_to_fit () -> void
 Reduces the capacity to the minimum required to hold the current elements, if the allocator supports it.
 
Modifiers
auto clear () noexcept -> void
 Erases all elements.
 
auto insert (const_iterator where, const SubElementPointer< Element > &value) -> const_iterator
 Inserts an element at a certain position.
 
auto insert (const_iterator where, SubElementPointer< Element > &&value) -> const_iterator
 Move-Inserts an element at a certain position.
 
auto insert (const_iterator where, size_type count, const SubElementPointer< Element > &value) -> const_iterator
 Inserts a number of copies of a element at a certain position.
 
template<std::input_iterator InputIterator>
auto insert (const_iterator where, InputIterator first, InputIterator last) -> const_iterator
 Inserts a range of values at a certain position.
 
template<typename... Arguments>
auto emplace (const_iterator where, Arguments &&...arguments) -> const_iterator
 Creates an element at a certain position.
 
auto erase (const_iterator position) -> const_iterator
 Removes an element from the vector.
 
auto erase (const_iterator first, const_iterator last) -> const_iterator
 Removes a range of elements from the vector.
 
auto push_back (const SubElementPointer< Element > &value) -> void
 Appends an element to the back of the vector.
 
auto push_back (SubElementPointer< Element > &&value) -> void
 Move-Appends an element to the back of the vector.
 
template<typename... Arguments>
auto emplace_back (Arguments &&...arguments) -> const_reference
 Appends a newly created element to the back of the vector.
 
auto pop_back () -> void
 Removes the last element.
 
auto take (const_iterator position) -> std::pair< std::unique_ptr< Element >, const_iterator >
 Removes an element from the vector and returns it.
 
auto take_back () -> std::unique_ptr< Element >
 Removes the last element from the vector and returns it.
 
auto resize (size_type newSize) -> void
 Resizes the vector.
 
auto resize (size_type newSize, const value_type &fillValue) -> void
 Resizes the vector.
 
auto swap (SubElementVector &other) -> void
 Swaps the contents of this vector with another vector.
 
Introspection
auto get_allocator () const -> allocator_type
 Gets the allocator.
 
- Public Member Functions inherited from xentara::workbench::bindings::PropertyContainer
 PropertyContainer () noexcept=default
 Default constructor.
 
 PropertyContainer (const PropertyContainer &other)
 Copy constructor.
 
 PropertyContainer (PropertyContainer &&other) noexcept
 Move constructor.
 
auto operator= (const PropertyContainer &rhs) -> PropertyContainer &
 Copy assignment operator.
 
auto operator= (PropertyContainer &&rhs) noexcept -> PropertyContainer &
 Move assignment operator that does not actually assign anything.
 
virtual ~PropertyContainer ()=0
 Virtual destructor.
 
auto setEnclosingPropertyContainer (PropertyContainer &enclosingContainer, SetEnclosingPropertyContainerOptions options={}) -> void
 Sets the enclosing container.
 
auto resetEnclosingPropertyContainer (SetEnclosingPropertyContainerOptions options={}) -> void
 Resets the enclosing container.
 
auto enclosingPropertyContainer () const -> PropertyContainer *
 Gets the enclosing container.
 
auto propertyErrorCount () const -> std::size_t
 Gets the number of error properties, including those of sub containers.
 
template<std::invocable Callback>
auto subscribeToPropertyErrorCount (Callback &&callback) -> ErrorCountSubscription
 Subscribes to a property.
 
auto forEachCrossReference (const ForEachCrossReferenceFunction &function, ForEachCrossReferenceOptions options={}) noexcept -> void
 Calls a function for each cross reference contained within the container.
 

Private Member Functions

Virtual overrides for PropertyContainer
auto forEachSubPropertyContainer (const bindings::ForEachSubPropertyContainerFunction &function, bool includeInvisible) noexcept -> void final
 Virtual override for PropertyContainer::forEachSubPropertyContainer()
 
auto forEachLocalCrossReference (const bindings::ForEachCrossReferenceFunction &function, bool includeInvisible) noexcept -> void final
 Virtual override for PropertyContainer::forEachLocalCrossReference()
 
auto localPropertyErrorCount () const -> std::size_t final
 Virtual override for bindings::PropertyContainer::localPropertyErrorCount()
 
auto propertyNotificationRaised (const bindings::PropertyId &propertyId) -> void final
 Virtual override for PropertyContainer::propertyNotificationRaised()
 

Additional Inherited Members

- Protected Member Functions inherited from xentara::workbench::bindings::PropertyContainer
auto subPropertyContainerAdded (const PropertyContainer &container) -> void
 Must be called by derived classes if a sub container was added.
 
auto subPropertyContainerRemoved (const PropertyContainer &container) -> void
 Must be called by derived classes if a sub container was removed.
 
auto subPropertyContainerListChanged (SubPropertyContainerListChangedOptions options={}) -> void
 Must be called by derived classes if the list of sub containers changed completely.
 
auto subPropertyContainerListCopied (const PropertyContainer &other, SubPropertyContainerListChangedOptions options={}) -> void
 Must be called by derived classes if the list of sub containers was copied from another container.
 
auto subPropertyContainerListMoved (PropertyContainer &other, SubPropertyContainerListChangedOptions options={}) -> void
 Must be called by derived classes if the list of sub containers was moved from another container.
 
auto subPropertyContainerListSwapped (PropertyContainer &other, SubPropertyContainerListChangedOptions options={}) -> void
 Must be called by derived classes if the list of sub containers was swapped with another container.
 
auto localPropertyErrorCountChanged () -> void
 Must be called by derived classes if the value returned by localPropertyErrorCount() has changed.
 
auto raisePropertyNotification (const PropertyId &propertyId) const -> void
 Passes a property notification to the enclosing container.
 

Detailed Description

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
class xentara::workbench::skill::SubElementVector< Element, Allocator >

A vector that can be used to hold sub elements.

This vector adds a copy constructor and copy assignment operator to std::vector<std::unique_ptr>, that copy the objects held by the pointers

Member Typedef Documentation

◆ allocator_type

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::allocator_type = typename RawVector::allocator_type

The Allocator type.

◆ const_iterator

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::const_iterator = typename RawVector::const_iterator

A const iterator.

◆ const_pointer

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::const_pointer = typename RawVector::const_pointer

A const pointer to an element.

◆ const_reference

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::const_reference = typename RawVector::const_reference

A const reference to an element.

◆ const_reverse_iterator

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::const_reverse_iterator = typename RawVector::const_reverse_iterator

A const iterator for iterating in reverse order.

◆ difference_type

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::difference_type = typename RawVector::difference_type

The type used for distances.

◆ iterator

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::iterator = const_iterator

An iterator.

Note
This is an alias for const_iterator, because the pointers contained in this vector cannot be modified.

◆ pointer

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::pointer = typename RawVector::pointer

A pointer to an element.

◆ reference

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::reference = typename RawVector::reference

A reference to an element.

◆ reverse_iterator

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::reverse_iterator = typename RawVector::reverse_iterator

An iterator for iterating in reverse order.

◆ size_type

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::size_type = typename RawVector::size_type

The type used for sizes.

◆ value_type

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
using xentara::workbench::skill::SubElementVector< Element, Allocator >::value_type = typename RawVector::value_type

The element type.

Constructor & Destructor Documentation

◆ SubElementVector() [1/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( )
defaultnoexcept

Default constructor.

Constructs an empty vector.

◆ SubElementVector() [2/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( const Allocator &  allocator)
explicit

Constructor that sets the allocator.

Constructs an empty vector.

Parameters
allocatorThe allocator

◆ SubElementVector() [3/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( size_type  size,
const Allocator &  allocator = Allocator() 
)
explicit

Constructor that creates a vector of a certain size.

Creates a vector of the given size and fills it with default-constructed sub elements. The vector will be filled with pointers containing default-constructed sub elements, not with null pointers.

Parameters
sizeThe number of entries to create
allocatorThe allocator

◆ SubElementVector() [4/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( size_type  size,
const SubElementPointer< Element > &  value,
const Allocator &  allocator = Allocator() 
)
explicit

Constructor that fills the vector with copies of a specific element.

Creates a vector of the given size and fills it with the given value.

Parameters
sizeThe number of entries to create
valueThe element to copy into the vector. Can be a null pointer.
allocatorThe allocator

◆ SubElementVector() [5/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
template<std::input_iterator InputIterator>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( InputIterator  first,
InputIterator  last,
const Allocator &  allocator = Allocator() 
)

Constructor that moves a range of elements.

Creates a vector that holds copies of the given input range.

Parameters
firstThe first element to copy
lastThe position after the last element to copy
allocatorThe allocator

◆ SubElementVector() [6/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( const SubElementVector< Element, Allocator > &  other)

Copy constructor.

Parameters
otherThe vector to copy

◆ SubElementVector() [7/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( SubElementVector< Element, Allocator > &&  other)

Move constructor.

Parameters
otherThe vector from which to move the elements

◆ SubElementVector() [8/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( const SubElementVector< Element, Allocator > &  other,
const std::type_identity_t< Allocator > &  allocator 
)

Copy constructor that uses a different allocator.

Parameters
otherThe vector to copy
allocatorThe allocator

◆ SubElementVector() [9/9]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
xentara::workbench::skill::SubElementVector< Element, Allocator >::SubElementVector ( SubElementVector< Element, Allocator > &&  other,
const std::type_identity_t< Allocator > &  allocator 
)
noexcept

Move constructor that uses a different allocator.

Parameters
otherThe vector from which to move the elements
allocatorThe allocator

Member Function Documentation

◆ assign() [1/2]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
template<std::input_iterator InputIterator>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::assign ( InputIterator  first,
InputIterator  last 
) -> void

Copies a range of elements.

Replaces the contents of the vector with a given input range.

Parameters
firstThe first element to copy
lastThe position after the last element to copy

◆ assign() [2/2]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
template<std::input_iterator InputIterator>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::assign ( size_type  count,
const SubElementPointer< Element > &  value 
) -> void

Replaces the contents of the vector with copies of a specific element.

Replaces the contents of the vector with copies of given element.

Parameters
countThe number of copies to create
valueThe element to copy into the vector. Can be a null pointer.

◆ at()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::at ( size_type  index) const -> const_reference

Accesses the element at a certain index.

Parameters
indexThe index
Returns
A reference to the element at the given index
Exceptions
std::out_of_rangeindex is out of range

◆ back()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::back ( ) const -> const_reference
noexcept

Returns the last element.

Note
Must not be called on an empty vector
Returns
A reference to last element

◆ begin()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::begin ( ) const -> const_iterator
noexcept

Creates a begin iterator.

Returns
An iterator pointing at the first element, or end(), if the data is empty

◆ capacity()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::capacity ( ) const -> size_type
noexcept

Gets the capacity of the data.

Returns
The total number of elements the vector can hold without reallocation

◆ cbegin()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::cbegin ( ) const -> const_iterator
noexcept

Creates a begin iterator.

Returns
An iterator pointing at the first element, or end(), if the data is empty

◆ cend()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::cend ( ) const -> const_iterator
noexcept

Creates an end iterator.

Returns
An iterator pointing at the position past the last element

◆ clear()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::clear ( ) -> void
noexcept

Erases all elements.

◆ crbegin()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::crbegin ( ) const -> const_reverse_iterator
noexcept

Creates a reverse begin iterator.

Returns
A reverse iterator pointing at the last element, or rend(), if the data is empty

◆ crend()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::crend ( ) const -> const_reverse_iterator
noexcept

Creates a reverse end iterator.

Returns
A reverse iterator pointing at the position before the first element

◆ data()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::data ( ) const -> const value_type *
noexcept

Raw access to the data.

Returns a pointer to the underlying array that serves as element storage.

Returns
A pointer to the first element. If the array is empty, the pointer is not dereferencable.

◆ emplace()

template<std::derived_from< SubElement > Element, typename Allocator >
template<typename... Arguments>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::emplace ( const_iterator  where,
Arguments &&...  arguments 
) -> const_iterator

Creates an element at a certain position.

Parameters
whereThe desired position of the new element. Must be a position within the vector, or cend() to append the element.
argumentsThe arguments to pass to the element's constructor
Returns
The position of the new element

◆ emplace_back()

template<std::derived_from< SubElement > Element, typename Allocator >
template<typename... Arguments>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::emplace_back ( Arguments &&...  arguments) -> const_reference

Appends a newly created element to the back of the vector.

Parameters
argumentsThe arguments to pass to the element's constructor
Returns
A reference to the new value

◆ empty()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::empty ( ) const -> bool
noexcept

Determines whether the data is empty.

Returns
Whether the data is empty

◆ end()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::end ( ) const -> const_iterator
noexcept

Creates an end iterator.

Returns
An iterator pointing at the position past the last element

◆ erase() [1/2]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::erase ( const_iterator  first,
const_iterator  last 
) -> const_iterator

Removes a range of elements from the vector.

Parameters
firstAn iterator to the first element to remove
lastAn iterator one position past the last element to remove
Returns
An iterator to the element after the last removed one.

◆ erase() [2/2]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::erase ( const_iterator  position) -> const_iterator

Removes an element from the vector.

Parameters
positionThe position of the element to remove. Must point to a valid element.
Returns
An iterator to the element after the removed one.

◆ forEachLocalCrossReference()

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::forEachLocalCrossReference ( const bindings::ForEachCrossReferenceFunction function,
bool  includeInvisible 
) -> void
finalprivatevirtualnoexcept

Virtual override for PropertyContainer::forEachLocalCrossReference()

Implements xentara::workbench::bindings::PropertyContainer.

◆ forEachSubPropertyContainer()

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::forEachSubPropertyContainer ( const bindings::ForEachSubPropertyContainerFunction function,
bool  includeInvisible 
) -> void
finalprivatevirtualnoexcept

Virtual override for PropertyContainer::forEachSubPropertyContainer()

Implements xentara::workbench::bindings::PropertyContainer.

◆ front()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::front ( ) const -> const_reference
noexcept

Returns the first element.

Note
Must not be called on an empty vector
Returns
A reference to first element

◆ get_allocator()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::get_allocator ( ) const -> allocator_type

Gets the allocator.

◆ insert() [1/4]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::insert ( const_iterator  where,
const SubElementPointer< Element > &  value 
) -> const_iterator

Inserts an element at a certain position.

Parameters
whereThe desired position of the new element. Must be a position within the vector, or cend() to append the element.
valueThe value to insert
Returns
The position of the new element

◆ insert() [2/4]

template<std::derived_from< SubElement > Element, typename Allocator >
template<std::input_iterator InputIterator>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::insert ( const_iterator  where,
InputIterator  first,
InputIterator  last 
) -> const_iterator

Inserts a range of values at a certain position.

Parameters
whereThe desired position of the first new element. Must be a position within the vector, or cend() to append the elements.
firstAn iterator to the first value to insert
lastAn iterator one position past the last value to insert
Returns
The position of the first new element

◆ insert() [3/4]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::insert ( const_iterator  where,
size_type  count,
const SubElementPointer< Element > &  value 
) -> const_iterator

Inserts a number of copies of a element at a certain position.

Parameters
whereThe desired position of the first new element. Must be a position within the vector, or cend() to append the elements.
countThe number of copies to insert
valueThe value to insert
Returns
The position of the first new element

◆ insert() [4/4]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::insert ( const_iterator  where,
SubElementPointer< Element > &&  value 
) -> const_iterator

Move-Inserts an element at a certain position.

Parameters
whereThe desired position of the new element. Must be a position within the vector, or cend() to append the element.
valueThe value to move
Returns
The position of the new element

◆ localPropertyErrorCount()

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::localPropertyErrorCount ( ) const -> std::size_t
finalprivatevirtual

◆ max_size()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::max_size ( ) const -> size_type
noexcept

Gets the maximum possible data size.

Returns
The maximum data size.

◆ operator=() [1/2]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::operator= ( const SubElementVector< Element, Allocator > &  rhs) -> SubElementVector &

Assignment operator.

Parameters
rhsThe vector to copy

◆ operator=() [2/2]

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::operator= ( SubElementVector< Element, Allocator > &&  rhs) -> SubElementVector &

Move-Assignment operator.

Parameters
rhsThe vector from which to move the elements
Returns
A reference to this vector

◆ operator[]()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::operator[] ( size_type  index) const -> const_reference
noexcept

Subscript operator.

Returns a reference to the element at a certain index

Parameters
indexThe index
Returns
A reference to the value at the given offset

◆ pop_back()

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::pop_back ( ) -> void

Removes the last element.

Note
Must not be called on an empty vector

◆ propertyNotificationRaised()

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::propertyNotificationRaised ( const bindings::PropertyId propertyId) -> void
finalprivatevirtual

Virtual override for PropertyContainer::propertyNotificationRaised()

Implements xentara::workbench::bindings::PropertyContainer.

◆ push_back() [1/2]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::push_back ( const SubElementPointer< Element > &  value) -> void

Appends an element to the back of the vector.

Parameters
valueThe value to insert

◆ push_back() [2/2]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::push_back ( SubElementPointer< Element > &&  value) -> void

Move-Appends an element to the back of the vector.

Parameters
valueThe value to move

◆ rbegin()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::rbegin ( ) const -> const_reverse_iterator
noexcept

Creates a reverse begin iterator.

Returns
A reverse iterator pointing at the last element, or rend(), if the data is empty

◆ rend()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::rend ( ) const -> const_reverse_iterator
noexcept

Creates a reverse end iterator.

Returns
A reverse iterator pointing at the position before the first element

◆ reserve()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::reserve ( size_type  capacity) -> void

Increases the capacity to a minimum value.

Parameters
capacityThe minimum number of elements the vector should be able to hold without reallocation

◆ resize() [1/2]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::resize ( size_type  newSize) -> void

Resizes the vector.

Grows or shrinks the vector to a new size. If the new size is greater than the old size, the new elements are filled with default-constructed sub elements. The new elements be filled with pointers containing default-constructed sub elements, not with null pointers.

Note
This function does not invalidate any but the end iterator.
Parameters
newSizeThe new size for the vector.

◆ resize() [2/2]

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::resize ( size_type  newSize,
const value_type fillValue 
) -> void

Resizes the vector.

Grows or shrinks the vector to a new size. If the new size is greater than the old size, the new elements are filled with copies of fillValue.

Note
This function does not invalidate any but the end iterator.
Parameters
newSizeThe new size for the vector.
fillValueThe value that should be used to initialize new element.

◆ shrink_to_fit()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::shrink_to_fit ( ) -> void

Reduces the capacity to the minimum required to hold the current elements, if the allocator supports it.

◆ size()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::size ( ) const -> size_type
noexcept

Gets the size of the data.

Returns
The number of elements contained in the data

◆ swap()

template<std::derived_from< SubElement > Element, typename Allocator = std::allocator<SubElementPointer<Element>>>
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::swap ( SubElementVector< Element, Allocator > &  other) -> void

Swaps the contents of this vector with another vector.

This function will propagate any exception thrown when swapping or transferring the individual elements. It does not have a strong exception guarantee, however: if an exception is thrown, both vectors will remain in a valid but unspecified state.

◆ take()

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::take ( const_iterator  position) -> std::pair<std::unique_ptr<Element>, const_iterator>

Removes an element from the vector and returns it.

Parameters
positionThe position of the element to remove. Must point to a valid element.
Returns
The removed element, plus an iterator to the element after the removed one.

◆ take_back()

template<std::derived_from< SubElement > Element, typename Allocator >
auto xentara::workbench::skill::SubElementVector< Element, Allocator >::take_back ( ) -> std::unique_ptr<Element>

Removes the last element from the vector and returns it.

Note
Must not be called on an empty vector
Returns
The removed element.