class NodeValue
Defined at line 288 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
A Node parsed from a Hierarchy.
This is named NodeValue to differentiate it from Node, the write-side definition of nodes.
Functions
NodeValue
public void NodeValue(
basic_string
name)
Defined at line 42 of file ../../zircon/system/ulib/inspect/hierarchy.cc
Construct a NodeValue with a name and no properties.
NodeValue
public void NodeValue(
basic_string
name,
vector
properties)
Defined at line 44 of file ../../zircon/system/ulib/inspect/hierarchy.cc
Construct a NodeValue with a name and properties.
Sort
public void Sort()
Defined at line 47 of file ../../zircon/system/ulib/inspect/hierarchy.cc
Sorts the properties of this node by name.
See description of Hierarchy::Sort.
NodeValue
public void NodeValue()
Defined at line 291 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Construct an empty NodeValue.
NodeValue
public void NodeValue(const NodeValue & )
Defined at line 300 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Allow moving, disallow copying.
NodeValue
public void NodeValue(NodeValue && )
Defined at line 301 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
operator=
public NodeValue & operator=(const NodeValue & )
Defined at line 302 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
operator=
public NodeValue & operator=(NodeValue && )
Defined at line 303 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
name
public const std::string & name()
Defined at line 306 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Obtains reference to name.
set_name
public void set_name(
basic_string
name)
Defined at line 309 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
properties
public const std::vector<PropertyValue> & properties()
Defined at line 312 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Obtains reference to properties.
take_properties
public
vector
take_properties()
Defined at line 315 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Takes the properties, leaving the vector owned by this node blank.
get_property
public const T * get_property(const std::string & name)
Defined at line 327 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Gets a pointer to the property with the given name and type.
Returns a pointer if the property exists and is the correct type, nullptr otherwise.
Note: The returned pointer is invalidated if any mutation occurs to this NodeValue.
add_property
public void add_property(
NamedValue
property)
Defined at line 338 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Adds a property to this node.
links
public const std::vector<LinkValue> & links()
Defined at line 341 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Obtains reference to links.
add_link
public void add_link(
LinkValue
link)
Defined at line 344 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Adds a link to this node.
set_links
public void set_links(
vector
links)
Defined at line 347 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Sets the vector of links for this node.