|
Brunot
|
internal type for computing Paths More...
#include <PathNode.h>
Classes | |
| class | path_iterator |
| iterator type, refers to a GameObject, and holds onto a reference to a PathNode to determine its range More... | |
Public Member Functions | |
| virtual | ~PathNode ()=default |
| virtual auto | begin () -> path_iterator=0 |
| virtual auto | end () -> path_iterator=0 |
| virtual auto | begin (path_iterator begin, path_iterator end) -> path_iterator=0 |
| Traverses the linked list of PathNode s to calculate the beginning of the range of GameObjects. | |
| virtual auto | end (path_iterator begin, path_iterator end) -> path_iterator=0 |
| Traverses the linked list of PathNode s to find the proper end to the range of GameObjects. | |
| virtual auto | getNext (GameObject *ptr) -> GameObject *=0 |
| Used by PathNode::path_iterator to increment. | |
| 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 | getChildren (const GameObject &gobj) -> std::shared_ptr< std::vector< GameObject * > > |
| helper function to get children of GameObjects as a vector of pointers | |
Public Attributes | |
| friend | GameObject |
Protected Member Functions | |
| 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 | |
| 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 | |
| std::shared_ptr< PathNode > | next |
| next Path Node in linked list. Represents the next (right) range | |
Private Attributes | |
| path_iterator | begin_ |
| Caches beginning of parent (left) range. | |
| path_iterator | end_ |
| Cached past the end iterator of parent ( left ) range. | |
internal type for computing Paths
|
virtualdefault |
| auto gobj::PathNode::appendPathNode | ( | std::shared_ptr< PathNode > | nextPath | ) | ->void |
adds a path to the end of the linked list of paths
| nextPath | the path to append |
|
pure virtual |
Implemented in gobj::PathBase, gobj::PathDir, gobj::PathFilter, gobj::PathName, gobj::PathRoot, and gobj::PathUp.
|
pure virtual |
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.
| begin | the beginning of the parents ( or left ) range |
| end | sentinel iterator (past the end) of the parents ( left ) range |
Implemented in gobj::PathBase, gobj::PathDir, gobj::PathFilter, gobj::PathName, gobj::PathRoot, and gobj::PathUp.
|
pure virtual |
Implemented in gobj::PathBase, gobj::PathDir, gobj::PathFilter, gobj::PathName, gobj::PathRoot, and gobj::PathUp.
|
pure virtual |
Traverses the linked list of PathNode s to find the proper end to the range of GameObjects.
| begin | beginning of parents ( or left ) range. Doesn't need to be the actual beginning, because end doesn't depend on beginning at all |
| end | end of parent ( or left ) range. |
Implemented in gobj::PathBase, gobj::PathDir, gobj::PathFilter, gobj::PathName, gobj::PathRoot, and gobj::PathUp.
|
nodiscardprotected |
function to get the cached beginning of our parent ( or left ) range
|
static |
helper function to get children of GameObjects as a vector of pointers
| gobj | GameObject to get children of |
|
nodiscardprotected |
function to get the cached beginning of our parent ( or left ) range
|
pure virtual |
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.
| ptr | to a GameObject in the range of the PathNode |
Implemented in gobj::PathBase, gobj::PathDir, gobj::PathFilter, gobj::PathName, gobj::PathRoot, and gobj::PathUp.
|
staticprotected |
helper function that checks nickname, and then typename if nickname doesn't match used by PathName
|
protected |
function to set the cached beginning of our parent ( or left ) range
| begin | iterator to cache |
|
protected |
function to set the cached end of our parent ( or left ) range
| past | the end iterator to cache |
|
private |
Caches beginning of parent (left) range.
|
private |
Cached past the end iterator of parent ( left ) range.
| friend gobj::PathNode::GameObject |
|
protected |