template <typename T>
class ObjectView
Defined at line 13 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
Public Methods
void ObjectView<T> ()
Defined at line 15 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
template <typename... Args>
void ObjectView<T> (AnyArena & allocator, Args &&... args)
Allocates an object using an arena.
This constructor creates the object using T(args...).
Defined at line 20 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
void ObjectView<T> (AnyArena & allocator, T && obj)
These constructors are redundant with the above constructor, but are provided
anyway to help the compiler infer types in common cases. For example, one would
be able to write:
fidl::ObjectView(allocator, 42.0);
fidl::ObjectView(allocator, v);
instead of
fidl::ObjectView
<double
>(allocator, 42.0);
fidl::ObjectView
<fidl
::VectorView
<double
>>(allocator, v);
which is more verbose.
Defined at line 36 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
void ObjectView<T> (AnyArena & allocator, const T & obj)
Defined at line 37 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
void ObjectView<T> (std::nullptr_t )
Initialize an ObjectView that contains null.
Defined at line 40 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
ObjectView<T> FromExternal (T * from)
Constructs a fidl::ObjectView by unsafely borrowing other objects.
These methods are the only way to reference data which is not managed by an |Arena|.
Their usage is discouraged. The lifetime of the referenced object must be longer than the
lifetime of the created ObjectView.
For example:
Foo foo;
auto foo_view = fidl::ObjectView
<Foo
>::FromExternal(
&foo
);
Defined at line 53 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
template <typename U = T, typename = std::enable_if_t<!std::is_void<U>::value>>
U & operator* ()
Defined at line 56 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
template <typename U = T, typename = std::enable_if_t<!std::is_void<U>::value>>
U * operator-> ()
Defined at line 61 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
bool operator== (std::nullptr_t )
Defined at line 65 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
bool operator!= (std::nullptr_t )
Defined at line 66 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
T * get ()
Defined at line 68 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
bool operator bool ()
Defined at line 70 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h
template <typename... Args>
void Allocate (AnyArena & allocator, Args &&... args)
Allocates an object using an arena.
Defined at line 74 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/object_view.h