class Type
Defined at line 32 of file ../../src/lib/fidl_codec/wire_types.h
A FIDL type. Provides methods for generating instances of this type.
Public Methods
void Type ()
Defined at line 36 of file ../../src/lib/fidl_codec/wire_types.h
void ~Type ()
Defined at line 37 of file ../../src/lib/fidl_codec/wire_types.h
Type & operator= (const Type & other)
Defined at line 38 of file ../../src/lib/fidl_codec/wire_types.h
void Type (const Type & other)
Defined at line 39 of file ../../src/lib/fidl_codec/wire_types.h
Uint32Type * AsUint32Type ()
Defined at line 44 of file ../../src/lib/fidl_codec/wire_types.h
const UnionType * AsUnionType ()
Defined at line 45 of file ../../src/lib/fidl_codec/wire_types.h
const StructType * AsStructType ()
Defined at line 46 of file ../../src/lib/fidl_codec/wire_types.h
const TableType * AsTableType ()
Defined at line 47 of file ../../src/lib/fidl_codec/wire_types.h
const HandleType * AsHandleType ()
Defined at line 48 of file ../../src/lib/fidl_codec/wire_types.h
bool IsArray ()
Returns true if the type is a ArrayType.
Defined at line 51 of file ../../src/lib/fidl_codec/wire_types.h
bool IsValid ()
Is this type valid?
Defined at line 54 of file ../../src/lib/fidl_codec/wire_types.h
std::string CppName ()
Returns C++ name of the type.
Defined at line 60 of file ../../src/lib/fidl_codec/wire_types.h
std::string ToString (bool expand)
Returns a detailed representation of the type.
Defined at line 162 of file ../../src/lib/fidl_codec/wire_types.cc
std::string Name ()
Returns a readable representation of the type.
size_t InlineSize (WireVersion version)
Returns the size of this type when embedded in another object.
std::unique_ptr<Value> Decode (MessageDecoder * decoder, uint64_t offset)
Decodes the type's inline part. It generates a Value and, eventually,
registers the field for further decoding (secondary objects).
void PrettyPrint (PrettyPrinter & printer)
Prints a colorized representation of the type.
Defined at line 63 of file ../../src/lib/fidl_codec/wire_types.h
bool Nullable ()
Whether this is a nullable type.
Defined at line 71 of file ../../src/lib/fidl_codec/wire_types.h
const Type * GetComponentType ()
For vectors and arrays, give the type of the components (members).
Defined at line 74 of file ../../src/lib/fidl_codec/wire_types.h
void PrettyPrint (const Value * value, PrettyPrinter & printer)
Pretty prints the value for this type. This is used to print numerical values.
Defined at line 170 of file ../../src/lib/fidl_codec/wire_types.cc
void Visit (TypeVisitor * visitor)
Use a visitor on this value;
std::unique_ptr<Type> ScalarTypeFromName (const std::string & type_name)
Gets a Type object representing the |type_name|. |type| is a string that
represents a scalar type (e.g., "float64", "uint32").
Defined at line 978 of file ../../src/lib/fidl_codec/wire_types.cc
std::unique_ptr<Type> TypeFromPrimitive (const rapidjson::Value & type)
Gets a Type object representing the |type|. |type| is a JSON object with a
"subtype" field that represents a scalar type (e.g., "float64", "uint32")
Defined at line 1007 of file ../../src/lib/fidl_codec/wire_types.cc
std::unique_ptr<Type> TypeFromInternal (const rapidjson::Value & type)
Gets a Type object representing |type|, where |type| is a JSON object
representing an "internal" fidl type, with the "subtype" field specifying
what internal type is being represented.
Defined at line 1017 of file ../../src/lib/fidl_codec/wire_types.cc
std::unique_ptr<Type> TypeFromIdentifier (LibraryLoader * loader, const rapidjson::Value & type)
Gets a Type object representing the |type|. |type| is a JSON object a
field "kind" that states the type. "kind" is an identifier
(e.g.,"foo.bar/Baz"). |loader| is the set of libraries to use to lookup
that identifier.
Defined at line 1025 of file ../../src/lib/fidl_codec/wire_types.cc
std::unique_ptr<Type> GetType (LibraryLoader * loader, const rapidjson::Value & type)
Gets a Type object representing the |type|. |type| is a JSON object a
field "kind" that states the type (e.g., "array", "vector", "foo.bar/Baz").
|loader| is the set of libraries to use to find types that need to be given
by identifier (e.g., "foo.bar/Baz").
Defined at line 1047 of file ../../src/lib/fidl_codec/wire_types.cc
Friends
class Library