SchemaNode¶
-
class
SchemaNode¶
Represents a Node in the SchemaTree.
~SchemaNode()¶The destructor.
Note
A
SchemaNoderepresents 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::stringrepresenting 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
SchemaNodetree that satisfy the given path expression. See how to path.
Parameters: path – The path expression. Returns: Vector of SchemaNodethat satisfies the criterion.Raises: YCPPPathErrorif the path expression in invalid, see error code for details.Raises: YCPPInvalidArgumentErrorif 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
SchemaNodein 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