36struct PathNode :
public std::enable_shared_from_this<PathNode>
69 auto operator*() const -> std::add_lvalue_reference_t<
GameObject>;
80 static_assert(std::input_iterator<path_iterator>);
81 static_assert(std::sentinel_for<path_iterator, path_iterator>);
88 [[nodiscard]]
auto getBegin() const -> path_iterator;
98 [[nodiscard]] auto
getEnd() const -> path_iterator;
103 auto
setEnd(const path_iterator&
end) ->
void;
the base class for the engine, most things inherit from this.
Definition GameObject.h:77
iterator type, refers to a GameObject, and holds onto a reference to a PathNode to determine its rang...
Definition PathNode.h:45
path_iterator(GameObject *ptr, std::weak_ptr< PathNode > parent)
Constructor for path_iterator that initializes it pointing to a range of data.
Definition PathNode.cpp:26
path_iterator()=default
Default constructor for path_iterator that initializes it as a sentinel iterator, or a past the end i...
std::ptrdiff_t difference_type
Definition PathNode.h:61
std::weak_ptr< PathNode > pathNode
reference to parent PathNode, which path_iterator uses to determine it's range
Definition PathNode.h:76
GameObject value_type
Definition PathNode.h:62
GameObject * data
Pointer to a GameObject, which path_iterator is currently pointing to.
Definition PathNode.h:74
auto get() const -> GameObject *
Definition PathNode.cpp:32
namespace for things relating to GameObject, other than GameObject itself
Definition Entity.h:229
internal type for computing Paths
Definition PathNode.h:37
auto setEnd(const path_iterator &end) -> void
function to set the cached end of our parent ( or left ) range
Definition PathNode.cpp:89
virtual auto end() -> path_iterator=0
path_iterator end_
Cached past the end iterator of parent ( left ) range.
Definition PathNode.h:172
virtual auto getNext(GameObject *ptr) -> GameObject *=0
Used by PathNode::path_iterator to increment.
auto getEnd() const -> path_iterator
function to get the cached beginning of our parent ( or left ) range
Definition PathNode.cpp:84
auto getBegin() const -> path_iterator
function to get the cached beginning of our parent ( or left ) range
Definition PathNode.cpp:74
auto setBegin(const path_iterator &begin) -> void
function to set the cached beginning of our parent ( or left ) range
Definition PathNode.cpp:79
static auto isNamed(const GameObject &obj, const std::string &name) -> bool
helper function that checks nickname, and then typename if nickname doesn't match used by PathName
Definition PathNode.cpp:116
friend GameObject
Definition PathNode.h:38
auto appendPathNode(std::shared_ptr< PathNode > nextPath) -> void
adds a path to the end of the linked list of paths
Definition PathNode.cpp:94
path_iterator begin_
Caches beginning of parent (left) range.
Definition PathNode.h:170
static auto getChildren(const GameObject &gobj) -> std::shared_ptr< std::vector< GameObject * > >
helper function to get children of GameObjects as a vector of pointers
Definition PathNode.cpp:111
virtual auto begin() -> path_iterator=0
std::shared_ptr< PathNode > next
next Path Node in linked list. Represents the next (right) range
Definition PathNode.h:176