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.
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.
|
kanzi::RelativeNodeResolver::RelativeNodeResolver |
( |
| ) |
|
|
explicitdefault |
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. |
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.
Returns the node to which the relative path points.
- Returns
- The node to which the relative path points.
void kanzi::RelativeNodeResolver::resolve |
( |
| ) |
|
Returns the current observing state.
- Returns
- Current observing state.
The documentation for this class was generated from the following file: