InherenceObject variant that keeps children sorted by priority.
More...
#include <spk_inherence_with_priority_object.hpp>
|
|
using | Priority = std::size_t |
| | Priority value type used for sorting.
|
|
|
| InherenceWithPriorityObject () |
| | Builds a priority-aware inherence object.
|
| void | addChild (TType *p_child) override |
| | Adds a child and re-sorts by priority.
|
| void | setPriority (const Priority &p_priority) |
| | Sets this node's priority and refreshes parent ordering.
|
| const Priority & | priority () const |
| | Returns the current priority value.
|
| 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.
|
|
|
void | _sortChildByPriority () |
| | Sorts children by descending priority.
|
|
void | _notifyParentPriorityChanged () |
| | Notifies the parent that this node's priority changed.
|
template<typename TType>
class spk::InherenceWithPriorityObject< TType >
InherenceObject variant that keeps children sorted by priority.
- Template Parameters
-
- See also
- InherenceObject
child.setPriority(10);
TType * parent() const
Returns the parent pointer.
Definition spk_inherence_object.hpp:85
InherenceObject variant that keeps children sorted by priority.
Definition spk_inherence_with_priority_object.hpp:28
◆ addChild()
◆ priority()
Returns the current priority value.
- Returns
- Priority value.
◆ setPriority()
Sets this node's priority and refreshes parent ordering.
- Parameters
-
| p_priority | New priority value. |
The documentation for this class was generated from the following file: