Brunot
Loading...
Searching...
No Matches
PathDir.h
Go to the documentation of this file.
1
10// ____ __ __ __
11// /\__ _\/\ \ /\ \/\ \
12// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
13// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
14// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
15// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
16// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
17
18
19#pragma once
21
22namespace gobj
23{
24
28struct PathDir : public PathNode
29{
30 ~PathDir() override = default;
31 auto begin() -> path_iterator override;
32 auto end() -> path_iterator override;
35 auto getNext(GameObject* ptr) -> GameObject* override;
36
43 static auto checkForPtr(const GameObject* ptr,
44 const std::shared_ptr<std::vector<GameObject*>>& siblings) -> GameObject*;
45};
46
47}
Base class for a linked list of Path sections, which altogether represent the logic of a Path,...
iterator type, refers to a GameObject, and holds onto a reference to a PathNode to determine its rang...
Definition PathNode.h:45
namespace for things relating to GameObject, other than GameObject itself
Definition Entity.h:229
Given a range of GameObjects, generates a range of all of those GameObjects children.
Definition PathDir.h:29
~PathDir() override=default
static auto checkForPtr(const GameObject *ptr, const std::shared_ptr< std::vector< GameObject * > > &siblings) -> GameObject *
helper function to find next sibling of a GameObject
Definition PathDir.cpp:72
auto begin() -> path_iterator override
Definition PathDir.cpp:23
auto end() -> path_iterator override
Definition PathDir.cpp:28
auto getNext(GameObject *ptr) -> GameObject *override
Used by PathNode::path_iterator to increment.
Definition PathDir.cpp:91
internal type for computing Paths
Definition PathNode.h:37
friend GameObject
Definition PathNode.h:38