Brunot
Loading...
Searching...
No Matches
gobj::PathUp Struct Reference

Internal Path Node that takes a range of GameObjects on the left, and transforms the range into the parent of every GameObject in the range. More...

#include <PathUp.h>

Inheritance diagram for gobj::PathUp:
[legend]
Collaboration diagram for gobj::PathUp:
[legend]

Public Member Functions

 ~PathUp () override=default
auto begin () -> path_iterator override
auto end () -> path_iterator override
auto begin (path_iterator begin, path_iterator end) -> path_iterator override
 Traverses the linked list of PathNode s to calculate the beginning of the range of GameObjects.
auto end (path_iterator begin, path_iterator end) -> path_iterator override
 Traverses the linked list of PathNode s to find the proper end to the range of GameObjects.
auto getNext (GameObject *ptr) -> GameObject *override
 Used by PathNode::path_iterator to increment.
Public Member Functions inherited from gobj::PathNode
virtual ~PathNode ()=default
auto appendPathNode (std::shared_ptr< PathNode > nextPath) -> void
 adds a path to the end of the linked list of paths

Static Public Member Functions

static auto getProperParent (path_iterator begin) -> GameObject *
 helper function to get the proper parent of a GameObject ( used for entities, to skip from sceneroot Entity to SceneManager)
Static Public Member Functions inherited from gobj::PathNode
static auto getChildren (const GameObject &gobj) -> std::shared_ptr< std::vector< GameObject * > >
 helper function to get children of GameObjects as a vector of pointers

Additional Inherited Members

Public Attributes inherited from gobj::PathNode
friend GameObject
Protected Member Functions inherited from gobj::PathNode
auto getBegin () const -> path_iterator
 function to get the cached beginning of our parent ( or left ) range
auto setBegin (const path_iterator &begin) -> void
 function to set the cached beginning of our parent ( or left ) range
auto getEnd () const -> path_iterator
 function to get the cached beginning of our parent ( or left ) range
auto setEnd (const path_iterator &end) -> void
 function to set the cached end of our parent ( or left ) range
Static Protected Member Functions inherited from gobj::PathNode
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
Protected Attributes inherited from gobj::PathNode
std::shared_ptr< PathNodenext
 next Path Node in linked list. Represents the next (right) range

Detailed Description

Internal Path Node that takes a range of GameObjects on the left, and transforms the range into the parent of every GameObject in the range.

Constructor & Destructor Documentation

◆ ~PathUp()

gobj::PathUp::~PathUp ( )
overridedefault
Here is the call graph for this function:

Member Function Documentation

◆ begin() [1/2]

auto gobj::PathUp::begin ( ) ->path_iterator
overridevirtual
Returns
iterator to the beginning of the range

Implements gobj::PathNode.

Here is the caller graph for this function:

◆ begin() [2/2]

auto gobj::PathUp::begin ( path_iterator begin,
path_iterator end )->path_iterator
overridevirtual

Traverses the linked list of PathNode s to calculate the beginning of the range of GameObjects.

One of the main functions for calculating a path. Takes the left range, and applies whatever modifier the specific PathNode represents (filter by name, filter arbitrarily, get parent, get children, etc.) then gives it's range to the right (next) range, which continues the sequence. Once the end of the linked list is reached, an iterator to the beginning of the final range is returned.

Parameters
beginthe beginning of the parents ( or left ) range
endsentinel iterator (past the end) of the parents ( left ) range
Returns
iterator to the beginning of the final iterators range

Implements gobj::PathNode.

Here is the call graph for this function:

◆ end() [1/2]

auto gobj::PathUp::end ( ) ->path_iterator
overridevirtual
Returns
iterator past the end of the range

Implements gobj::PathNode.

Here is the caller graph for this function:

◆ end() [2/2]

auto gobj::PathUp::end ( path_iterator begin,
path_iterator end )->path_iterator
overridevirtual

Traverses the linked list of PathNode s to find the proper end to the range of GameObjects.

Parameters
beginbeginning of parents ( or left ) range. Doesn't need to be the actual beginning, because end doesn't depend on beginning at all
endend of parent ( or left ) range.
Returns
iterator to the end

Implements gobj::PathNode.

Here is the call graph for this function:

◆ getNext()

auto gobj::PathUp::getNext ( GameObject * ptr) ->GameObject *override
overridevirtual

Used by PathNode::path_iterator to increment.

Takes in a pointer to a GameObject, and returns the pointer to the next GameObject in the range.

Parameters
ptrto a GameObject in the range of the PathNode
Returns
to a GameObject directly after ptr in the range

Implements gobj::PathNode.

Here is the call graph for this function:

◆ getProperParent()

auto gobj::PathUp::getProperParent ( path_iterator begin) ->GameObject *
static

helper function to get the proper parent of a GameObject ( used for entities, to skip from sceneroot Entity to SceneManager)

Here is the call graph for this function:
Here is the caller graph for this function:

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