Enables you to get the current node in relative path. More...
#include <kanzi/core.ui/node/relative_node_resolver.hpp>
Public Types | |
| enum class | State { Inactive , Local , Global } |
| Observing states. More... | |
Public Member Functions | |
| void | attach (Node *baseNode, string_view relativePath) |
| Attaches a resolver. | |
| void | detach () |
| Detaches a resolver. | |
| NodeSharedPtr | get () const |
| Returns the node to which the relative path points. | |
| RelativeNodeResolver::State | getState () const |
| Returns the current observing state. | |
| RelativeNodeResolver ()=default | |
| Constructor. | |
| void | resolve () |
| Execute resolving. | |
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.
|
explicitdefault |
Constructor.
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.
| 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.
| NodeSharedPtr kanzi::RelativeNodeResolver::get | ( | ) | const |
Returns the node to which the relative path points.
| void kanzi::RelativeNodeResolver::resolve | ( | ) |
Execute resolving.
|
inline |
Returns the current observing state.