Brunot
Loading...
Searching...
No Matches
gobj::PathNode::path_iterator Class Reference

iterator type, refers to a GameObject, and holds onto a reference to a PathNode to determine its range More...

#include <PathNode.h>

Collaboration diagram for gobj::PathNode::path_iterator:
[legend]

Public Types

using difference_type = std::ptrdiff_t
using value_type = GameObject

Public Member Functions

 path_iterator (GameObject *ptr, std::weak_ptr< PathNode > parent)
 Constructor for path_iterator that initializes it pointing to a range of data.
 path_iterator ()=default
 Default constructor for path_iterator that initializes it as a sentinel iterator, or a past the end iterator.
auto get () const -> GameObject *
auto operator++ () -> path_iterator &
auto operator++ (int) -> path_iterator
auto operator== (const path_iterator &other) const -> bool
auto operator* () const -> std::add_lvalue_reference_t< GameObject >
auto operator-> () const -> GameObject *

Private Attributes

GameObjectdata = nullptr
 Pointer to a GameObject, which path_iterator is currently pointing to.
std::weak_ptr< PathNodepathNode = {}
 reference to parent PathNode, which path_iterator uses to determine it's range

Detailed Description

iterator type, refers to a GameObject, and holds onto a reference to a PathNode to determine its range

Member Typedef Documentation

◆ difference_type

◆ value_type

Constructor & Destructor Documentation

◆ path_iterator() [1/2]

gobj::PathNode::path_iterator::path_iterator ( GameObject * ptr,
std::weak_ptr< PathNode > parent )

Constructor for path_iterator that initializes it pointing to a range of data.

Parameters
ptrpointer to a GameObject that exists in the engine
parentweak_ptr to the parent PathNode that the path_iterator came from
Here is the caller graph for this function:

◆ path_iterator() [2/2]

gobj::PathNode::path_iterator::path_iterator ( )
default

Default constructor for path_iterator that initializes it as a sentinel iterator, or a past the end iterator.

Member Function Documentation

◆ get()

auto gobj::PathNode::path_iterator::get ( ) const->GameObject *

◆ operator*()

auto gobj::PathNode::path_iterator::operator* ( ) const->std::add_lvalue_reference_t< GameObject >

◆ operator++() [1/2]

auto gobj::PathNode::path_iterator::operator++ ( ) ->path_iterator &
Here is the call graph for this function:

◆ operator++() [2/2]

auto gobj::PathNode::path_iterator::operator++ ( int ) ->path_iterator
Here is the call graph for this function:

◆ operator->()

auto gobj::PathNode::path_iterator::operator-> ( ) const->GameObject *

◆ operator==()

auto gobj::PathNode::path_iterator::operator== ( const path_iterator & other) const->bool
Here is the call graph for this function:

Member Data Documentation

◆ data

GameObject* gobj::PathNode::path_iterator::data = nullptr
private

Pointer to a GameObject, which path_iterator is currently pointing to.

◆ pathNode

std::weak_ptr<PathNode> gobj::PathNode::path_iterator::pathNode = {}
private

reference to parent PathNode, which path_iterator uses to determine it's range


The documentation for this class was generated from the following files:
  • /home/egrazil/sites/Brunot/The House/source/Utility/Path/private/PathNode.h
  • /home/egrazil/sites/Brunot/The House/source/Utility/Path/private/PathNode.cpp