template <typename TypeVariant, typename FormatType>
class NamedValue
Defined at line 178 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
Internal class associating a name with one of several types of value.
Public Methods
template <typename T>
void NamedValue<TypeVariant, FormatType> (std::string name, T value)
Constructs a NamedValue associating the given name with the value.
Defined at line 182 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
template <typename T>
bool Contains ()
Checks if this NamedValue contains the templated type.
Defined at line 189 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
template <typename T>
const T & Get ()
Gets the value by type. If this NamedValue does not contain the given type,
this method panics.
Defined at line 196 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
template <typename T>
const T * GetOrNull ()
Gets the value by type. If this NamedValue does not contain the given type, this method returns
nullptr.
Defined at line 203 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
const std::string & name ()
Gets the name of this NamedValue.
Defined at line 212 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h
FormatType format ()
Gets the format of the wrapped value.
Defined at line 215 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/hierarchy.h