Provides parent/child ownership links for tree structures.
More...
#include <spk_inherence_object.hpp>
|
| virtual void | addChild (TType *p_child) |
| | Adds a child to this node, handling reparenting as needed.
|
| virtual void | removeChild (TType *p_child) |
| | Removes a child from this node.
|
| TType * | parent () const |
| | Returns the parent pointer.
|
| virtual std::vector< TType * > & | children () |
| | Returns the children vector.
|
| virtual const std::vector< TType * > & | children () const |
| | Returns the children vector.
|
|
void | clearChildren () |
| | Clears the children list and resets each child's parent pointer.
|
template<typename TType>
class spk::InherenceObject< TType >
Provides parent/child ownership links for tree structures.
- Template Parameters
-
- See also
- InherenceWithPriorityObject
Node child;
Provides parent/child ownership links for tree structures.
Definition spk_inherence_object.hpp:22
TType * parent() const
Returns the parent pointer.
Definition spk_inherence_object.hpp:85
virtual void addChild(TType *p_child)
Adds a child to this node, handling reparenting as needed.
Definition spk_inherence_object.hpp:46
◆ addChild()
◆ children() [1/2]
Returns the children vector.
- Returns
- Mutable reference to children.
Reimplemented in spk::Entity.
◆ children() [2/2]
Returns the children vector.
- Returns
- Const reference to children.
◆ parent()
Returns the parent pointer.
- Returns
- Parent node or nullptr.
◆ removeChild()
Removes a child from this node.
- Parameters
-
| p_child | Child pointer to remove. |
Reimplemented in spk::Entity.
The documentation for this class was generated from the following file: