class TestUnion

Defined at line 446 of file fidling/gen/sdk/testing/fidl/types_tests/test.types/cpp/fidl/test.types/cpp/natural_types.h

Verifies that user code can manipulate these union payloads.

Public Methods

void TestUnion (TestUnion && other)
TestUnion & operator= (TestUnion && other)
::test_types::TestUnion::Tag Which ()
TestUnion WithPrimitive (int32_t val)
const ::fidl::internal::UnionMemberView<1, Storage_> primitive ()
::fidl::internal::UnionMemberView<1, Storage_> primitive ()
TestUnion & primitive (int32_t value)

Sets the union to hold the primitive member.

TestUnion WithCopyable (::test_types::CopyableStruct val)
const ::fidl::internal::UnionMemberView<2, Storage_> copyable ()
::fidl::internal::UnionMemberView<2, Storage_> copyable ()
TestUnion & copyable (::test_types::CopyableStruct value)

Sets the union to hold the copyable member.

TestUnion WithMoveOnly (::test_types::MoveOnlyStruct val)
const ::fidl::internal::UnionMemberView<3, Storage_> move_only ()
::fidl::internal::UnionMemberView<3, Storage_> move_only ()
TestUnion & move_only (::test_types::MoveOnlyStruct value)

Sets the union to hold the move_only member.

void TestUnion (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )

Enumerations

enum Tag
Name Value
kPrimitive 1
kCopyable 2
kMoveOnly 3

TODO: share union tag types between wire

&

natural.

Defined at line 457 of file fidling/gen/sdk/testing/fidl/types_tests/test.types/cpp/fidl/test.types/cpp/natural_types.h

Friends

class NaturalUnionCodingTraits