|
Brunot
|
iterator member class for Path. More...
#include <Path.h>
Public Types | |
| using | difference_type = std::ptrdiff_t |
| using | value_type = Gobj |
Public Member Functions | |
| iterator ()=default | |
| defaults initializes iterator as a sentinel "Past the End" iterator | |
| auto | get () const -> Gobj * |
| auto | operator++ () -> iterator & |
| pre-increments the iterator, getting the next GameObject in the range. | |
| auto | operator++ (int) -> iterator |
| post-increments the iterator, getting the next GameObject in the range | |
| auto | operator== (iterator other) const -> bool |
| compares if two iterators point to the same object. | |
| auto | operator* () const -> std::add_lvalue_reference_t< Gobj > |
| Gets a reference to the GameObject the iterator refers to, and casts it to Gobj as well. | |
| auto | operator-> () const -> Gobj * |
| allows for calling functions on the objects an iterator refers to. | |
Public Attributes | |
| friend | Path |
Private Member Functions | |
| iterator (PathNode::path_iterator itr) | |
| constructs a Path::iterator from a PathNode::path_iterator, which is an internal type used for logic | |
Private Attributes | |
| PathNode::path_iterator | itr |
| Internal iterator type that is used by PathNode, and only refers to GameObjects as GameObjects. | |
iterator member class for Path.
iterator is both a public interface, and a wrapper class for an internal iterator type, and handles casting from GameObjects to Gobj.
| using gobj::Path< Gobj >::iterator::difference_type = std::ptrdiff_t |
| using gobj::Path< Gobj >::iterator::value_type = Gobj |
|
inlineexplicitprivate |
constructs a Path::iterator from a PathNode::path_iterator, which is an internal type used for logic
| itr | a PathNode::iterator from |
|
default |
defaults initializes iterator as a sentinel "Past the End" iterator
|
inline |
| PathException | if improper type |
|
inline |
Gets a reference to the GameObject the iterator refers to, and casts it to Gobj as well.
| PathException | if the iterator points to nothing |
|
inline |
pre-increments the iterator, getting the next GameObject in the range.
If iterator at the back of the range, or range of 1, then it iterates to a "past the end" iterator
| PathException | if incrementing a "past the end" iterator |
|
inline |
post-increments the iterator, getting the next GameObject in the range
If iterator at the back of the range, or range of 1, then it iterates to a "past the end" iterator
| PathException | if incrementing a "past the end" iterator |
|
inline |
allows for calling functions on the objects an iterator refers to.
|
inline |
compares if two iterators point to the same object.
| other | iterator to compare with |
|
private |
Internal iterator type that is used by PathNode, and only refers to GameObjects as GameObjects.
| friend gobj::Path< Gobj >::iterator::Path |