SchemaNode¶
-
class
SchemaNode
¶
Represents a Node in the SchemaTree.
~SchemaNode
()¶The destructor.
Note
A
SchemaNode
represents a containment hierarchy. So invocation of the destructor will lead to the children of this node being destroyed.
- virtual std::string
path
() const¶Get the path expression representing this Node in in the NodeTree.
Returns: std::string
representing the path to this Node.
- virtual std::vector<SchemaNode *>
find
(const std::string &path) const¶Finds descendant nodes that match the given xpath expression.
This API finds descendant nodes in the
SchemaNode
tree that satisfy the given path expression. See how to path.
Parameters: path – The path expression. Returns: Vector of SchemaNode
that satisfies the criterion.Raises: YCPPPathError
if the path expression in invalid, see error code for details.Raises: YCPPInvalidArgumentError
if the argument is invalid.
- virtual const SchemaNode *
parent
() const noexcept¶Get the Parent Node of this SchemaNode in the tree.
Returns: SchemaNode*
the children of this node.
- virtual std::vector<std::unique_ptr<SchemaNode>> &
children
() const¶Returns the children of this
SchemaNode
in the NodeTree.
Returns: Child schema nodes.
- virtual const SchemaNode &
root
() const noexcept¶Get the root of NodeTree this node is part of
Returns: The pointer to the root.
- virtual Statement
statement
() const¶Returns the YANG statement associated with this
SchemaNode
Returns: The pointer to the yang statement for this SchemaNode