Enables you to get the current node in relative path.
More...
#include <kanzi/core.ui/node/relative_node_resolver.hpp>
Enables you to get the current node in relative path.
The functions in this class track the node changes in relative path by observing the changes in the Node::PathProperty properties. To get a node to which a relative path points, attach a resolver, and then get the node.
◆ State
Observing states.
Enumerator |
---|
Inactive | Inactive. Resolver is not attached.
|
Local | Observing the path changes of the node in the relative path.
|
Global | Observing changes to any path of any node.
A resolver is in this state when there is no node in the relative path.
|
◆ RelativeNodeResolver()
kanzi::RelativeNodeResolver::RelativeNodeResolver |
( |
| ) |
|
|
explicitdefault |
◆ attach()
void kanzi::RelativeNodeResolver::attach |
( |
Node * |
baseNode, |
|
|
string_view |
relativePath |
|
) |
| |
Attaches a resolver.
When you attach a resolver, Kanzi starts observing the node changes in the node tree location to which the relative path points.
- Parameters
-
baseNode | Node from which you want relative path to start. |
relativePath | Relative path to the node tree location of which the resolver starts observing the changes. |
◆ detach()
void kanzi::RelativeNodeResolver::detach |
( |
| ) |
|
Detaches a resolver.
When you detach a resolver, Kanzi stops observing the node changes in the node tree location to which the relative path points.
◆ get()
Returns the node to which the relative path points.
- Returns
- The node to which the relative path points.
◆ resolve()
void kanzi::RelativeNodeResolver::resolve |
( |
| ) |
|
◆ getState()
Returns the current observing state.
- Returns
- Current observing state.
The documentation for this class was generated from the following file: