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

Starts a range with an arbitrary GameObject. More...

#include <PathBase.h>

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

Public Member Functions

 PathBase (GameObject &gameObject)
 constructor
 ~PathBase () 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

Private Attributes

GameObjectbase {nullptr}

Additional Inherited Members

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
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

Starts a range with an arbitrary GameObject.

Constructor & Destructor Documentation

◆ PathBase()

gobj::PathBase::PathBase ( GameObject & gameObject)
explicit

constructor

Parameters
gameObjectGameObject to start with

◆ ~PathBase()

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

Member Function Documentation

◆ begin() [1/2]

auto gobj::PathBase::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::PathBase::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::PathBase::end ( ) ->path_iterator
overridevirtual
Returns
iterator past the end of the range

Implements gobj::PathNode.

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

◆ end() [2/2]

auto gobj::PathBase::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::PathBase::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.

Member Data Documentation

◆ base

GameObject* gobj::PathBase::base {nullptr}
private

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