class Value

Defined at line 33 of file ../../src/lib/fidl_codec/wire_object.h

Base class for all the values we can find within a message.

Public Methods

void Value ()

Defined at line 35 of file ../../src/lib/fidl_codec/wire_object.h

void ~Value ()

Defined at line 36 of file ../../src/lib/fidl_codec/wire_object.h

bool IsNull ()

Defined at line 38 of file ../../src/lib/fidl_codec/wire_object.h

uint8_t GetUint8Value ()

Returns the uint8_t value of the value. If the value is not a uint8_t value this returns zero.

This is used to eventually display a vector of uint8_t values as a string.

Defined at line 42 of file ../../src/lib/fidl_codec/wire_object.h

bool GetIntegerValue (uint64_t * absolute, bool * negative)

Gets the integer value of the value. Returns false if the node can't compute an integer value.

For floating point values, the floating point value is converted to the nearest integer

value.

Defined at line 47 of file ../../src/lib/fidl_codec/wire_object.h

bool GetDoubleValue (double * result)

Gets the floating point value of the value. Returns false if the node can't compute a floating

point value. For integer values, we can lost precision during the conversion.

Defined at line 51 of file ../../src/lib/fidl_codec/wire_object.h

const ActualAndRequestedValue * AsActualAndRequestedValue ()

Methods to downcast a value.

Defined at line 54 of file ../../src/lib/fidl_codec/wire_object.h

const StringValue * AsStringValue ()

Defined at line 55 of file ../../src/lib/fidl_codec/wire_object.h

const HandleValue * AsHandleValue ()

Defined at line 56 of file ../../src/lib/fidl_codec/wire_object.h

StructValue * AsStructValue ()

Defined at line 57 of file ../../src/lib/fidl_codec/wire_object.h

const StructValue * AsStructValue ()

Defined at line 58 of file ../../src/lib/fidl_codec/wire_object.h

TableValue * AsTableValue ()

Defined at line 59 of file ../../src/lib/fidl_codec/wire_object.h

const TableValue * AsTableValue ()

Defined at line 60 of file ../../src/lib/fidl_codec/wire_object.h

UnionValue * AsUnionValue ()

Defined at line 61 of file ../../src/lib/fidl_codec/wire_object.h

const UnionValue * AsUnionValue ()

Defined at line 62 of file ../../src/lib/fidl_codec/wire_object.h

const VectorValue * AsVectorValue ()

Defined at line 63 of file ../../src/lib/fidl_codec/wire_object.h

const FidlMessageValue * AsFidlMessageValue ()

Defined at line 64 of file ../../src/lib/fidl_codec/wire_object.h

size_t DisplaySize (const Type * for_type, size_t remaining_size)

Returns the size needed to display the value. If the needed size is

greater than |remaining_size|, the return value can be anything greater

than |remaining_size| and the only useful information is that the value

can't fit in |remaining_size|.

Remaining size is just an optimization parameter. It avoids to compute the

whole display size for an object: the computation is stopped as soon as we

find that the object doesn't fit.

bool NeedsToLoadHandleInfo (int64_t timestamp, zx_koid_t tid, semantic::HandleSemantic * handle_semantic)

Returns true if we need to load information about the handle (call to zx_object_get_info with

ZX_INFO_HANDLE_TABLE). We need to load information about the handle if one of the handles of

the value has an unknown koid.

Defined at line 69 of file ../../src/lib/fidl_codec/wire_object.h

void PrettyPrint (const Type * for_type, PrettyPrinter & printer)

Pretty print of the value.

void Visit (Visitor * visitor, const Type * for_type)

Use a visitor on this value;

void ExtractJson (rapidjson::Document::AllocatorType & allocator, rapidjson::Value & result)

Defined at line 26 of file ../../src/lib/fidl_codec/wire_object.cc