template <typename T>

struct MemberVisitor

Defined at line 164 of file ../../sdk/lib/fidl/cpp/include/lib/fidl/cpp/internal/natural_types.h

MemberVisitor provides helpers to invoke visitor functions over natural struct and natural table

members. This works because structs and tables have similar shapes in the natural bindings.

There is an instance data member called `storage_` which is a struct containing the member data

and a constexpr std::tuple member called `kMembers`, and each member of that has a `member_ptr`

which is a member pointer into the `storage_` struct.

Public Members

static const auto kMembers
static const size_t kNumMembers

Public Methods

template <typename F, size_t... I>
void Fold (F func, std::index_sequence<I...> indexes)

Invokes |func| with |std::integral_constant

<size

_t, I>| for each |I| in |indexes|.

Defined at line 170 of file ../../sdk/lib/fidl/cpp/include/lib/fidl/cpp/internal/natural_types.h

template <typename F, size_t... I>
void FoldWhile (F func, std::index_sequence<I...> indexes)

Invokes |func| with |std::integral_constant

<size

_t, I>| for each |I| in |indexes|.

Exits early if a |func| ever returns false in the middle.

Defined at line 177 of file ../../sdk/lib/fidl/cpp/include/lib/fidl/cpp/internal/natural_types.h

template <typename U, typename Fn>
void VisitWhile (U value, Fn && func)

Visit each of the members in order while the visitor function returns a truthy value.

Defined at line 183 of file ../../sdk/lib/fidl/cpp/include/lib/fidl/cpp/internal/natural_types.h

template <typename U, typename Fn>
void Visit (U value, Fn && func)

Visit all of the members in order.

Defined at line 198 of file ../../sdk/lib/fidl/cpp/include/lib/fidl/cpp/internal/natural_types.h

template <typename U, typename Fn>
void Visit2While (U value1, U value2, Fn && func)

Visit each of the members of two structs or tables in order while the visitor function returns

a truthy value.

Defined at line 209 of file ../../sdk/lib/fidl/cpp/include/lib/fidl/cpp/internal/natural_types.h

template <typename U, typename Fn>
void Visit2 (U value1, U value2, Fn && func)

Visit all of the members of two structs or tables in order.

Defined at line 225 of file ../../sdk/lib/fidl/cpp/include/lib/fidl/cpp/internal/natural_types.h