#include <componentresourcepath.h>
Public Member Functions | |
| ComponentResourcePath ()=default | |
| ComponentResourcePath (const Entity &root) | |
| const Entity & | getRoot () const |
| void | push (int childIndex) |
| void | pop () |
| void | pushComponent (const std::string &component) |
| void | popComponent () |
| bool | operator== (const ComponentResourcePath &other) const |
Static Public Member Functions | |
| static bool | fromString (const Entity &root, const std::string &path, ComponentResourcePath &resolvedPath, utility::ErrorState &errorState) |
Represents a path to a component in an entity hierarchy.
|
default |
| ComponentResourcePath | ( | const Entity & | root | ) |
|
static |
Creates an EntityResourcePath from a root entity and a string.
| root | The root entity that is used by path. |
| path | The string containing the path from root to the component. This path includes the name of the component. |
| resolvedPath | If the function returns true, this parameter contains the created EntityResourcePath. |
| errorState | contains error information on failure. |
| const Entity& getRoot | ( | ) | const |
| bool operator== | ( | const ComponentResourcePath & | other | ) | const |
Compares on EntityResourcePath to another.
| void pop | ( | ) |
Pops the last child entity from the path.
| void popComponent | ( | ) |
Pops the component from the path.
| void push | ( | int | childIndex | ) |
Pushes a child entity onto the path.
| childIndex | The absolute index of this child in the entity child array of the parent. |
| void pushComponent | ( | const std::string & | component | ) |
Pushes the last item, the component, onto the path.
| component | ID of the component to push onto the path. |