Template Class Enumerator

Nested Relationships

Nested Types

Class Documentation

template<typename T>
class Enumerator

Provides iterators with reference semantics for arrays of pointers.

Param <T>

The type of pointers to enumerate

Public Functions

Enumerator() = default

Constructs an instance of Enumerator<>

inline Enumerator(T const **pBegin, T const **pEnd)

Constructs an instance of Enumerator<>

Parameters
  • pBegin -- [in] A pointer to the beginning of the range to enumerate via this Enumerator

  • pEnd -- [in] A pointer to the ending of the range to enumerate via this Enumerator

inline Iterator begin() const

Gets an Iterator to this Enumerator<>'s first element.

Returns

An Iterator to this Enumerator<>'s first element

inline Iterator end() const

Gets an Iterator to this Enumerator<>'s last element.

Returns

An Iterator to this Enumerator<>'s last element

class Iterator

An iterator to an enumerated pointer.

Public Functions

Iterator() = default

Constructs an instance of Iterator.

inline Iterator(T const **ptr)

Constructs an instance of Iterator.

Parameters

ptr -- [in] The array of pointers to iterate

Iterator(Iterator const &other) = default

Copies an instance of Iterator.

Parameters

other -- [in] The Iterator to copy from

Iterator &operator=(Iterator const &other) = default

Copies an instance of Iterator.

Parameters

other -- [in] The Iterator to copy from

Returns

This Iterator after being copied to

inline Iterator &operator++()

Increments this Iterator.

Returns

This Iterator after being incremented

inline Iterator operator++(int)

Increments this Iterator.

Returns

A copy of this Iterator before being incremented

inline bool operator!=(Iterator const &other)

Gets a value indicating whether or not this Iterator is inequal to a given Iterator.

Parameters

other -- [in] The Iterator to compare this Iterator against

Returns

A value indicating whether or not this Iterator is inequal to a given Iterator

inline T const *operator->() const

Dereferences this Iterator's current value.

Returns

A pointer to this Iterator's current value

inline T const &operator*() const

Dereferences this Iterator's current value.

Returns

A reference to this Iterator's current value