ElementAt#

Fully qualified name: omni::graph::exec::unstable::detail::ElementAt

Structs#

Iterator

Iterator pointing to an element in the iterable range.

template<typename OwnerType, typename ValueType, typename GetterType>
struct ElementAt#

Provides iterator access to an interface that defines per-element access.

Use this object to wrap an interface that defines random element access. The resulting wrapper object can be passed to any algorithm that can iterate over an iterable object (e.g. C++’s built-in range-based for).

Template Parameters:
  • OwnerType – The interface type (e.g. IMyArray).

  • ValueType – The type of the value returned from the getter.

  • GetterType – A struct that defines a static getAt(OwnerType* owner, uint64_t index, ValueType* out) method. This method is used to access the element at the given index. The struct must also define a static getCount(OwnerType*) method which returns the number of items to iterate over.

Public Functions

inline ElementAt(OwnerType *owner) noexcept#

Constructor.

inline Iterator begin() const noexcept#

Returns an iterator to the first element.

inline Iterator end() const noexcept#

Returns an invalid iterator past the last element.

inline uint64_t getCount() const noexcept#

Returns element count.

struct Iterator#

Iterator pointing to an element in the iterable range.

Public Types

using iterator_category = std::forward_iterator_tag#

Type of the iterator.

using value_type = ValueType#

Type of the value to which the iterator points.

using pointer = value_type*#

Pointer to the type of the value to which the iterator points.

using reference = value_type&#

Reference to the type of the value to which the iterator points.

Public Functions

inline Iterator(
OwnerType *owner_,
uint64_t index_,
uint64_t count_,
) noexcept#

Constructor.

inline reference operator*() noexcept#

Dereference operator.

inline pointer operator->() noexcept#

Dereference operator.

inline Iterator &operator++() noexcept#

Move to the next item in the container.

inline Iterator operator++(int) noexcept#

Move to the next item in the container.

Friends

inline friend bool operator==(
const Iterator &a,
const Iterator &b,
) noexcept#

Check if the iterators are equal.

inline friend bool operator!=(
const Iterator &a,
const Iterator &b,
) noexcept#

Check if the iterators are not equal.