template <typename T>

class MessagePart

Defined at line 25 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

Part of a FIDL message.

A FIDL message has two parts: the bytes and the handles. This class is used

to represent both kinds of parts.

Each part of the message has a data buffer, which contains the actual data

for that part of the message, a capacity for that buffer, and the actual

amount of data stored in the buffer, which might be less that the capacity if

the buffer is not completely full.

Public Methods

void MessagePart<T> ()

A message part with no storage.

Defined at line 31 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

void MessagePart<T> (T * data, uint32_t capacity, uint32_t actual)

A message part that uses the given storage.

The constructed |MessagePart| object does not take ownership of the given

storage.

Defined at line 37 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

void MessagePart<T> (const MessagePart<T> & other)

The copy constructor is deleted because a MessagePart may own handles (see

HandlePart/HandleDispositionPart/HandleInfoPart below), which may not be copied.

Defined at line 42 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

MessagePart<T> & operator= (const MessagePart<T> & other)

Defined at line 43 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

void MessagePart<T> (MessagePart<T> && other)

Defined at line 45 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

void MessagePart<T> (const MessagePart<T> & other, uint32_t pos)

A copy constructor for |other|, which trims the first |pos| number of |T|s from it when

copying. This should not be invoked on any |Handle*Part| specialization of the |MessagePart|

class, as handle containing classes may not be copied (handles must be unique).

Defined at line 55 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

MessagePart<T> & operator= (MessagePart<T> && other)

Defined at line 65 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

template <size_t N>
MessagePart<T> WrapFull (T (&)[N] array)

Constructs a full |MessagePart| wrapping an array.

The array is assumed to be initialized with data, such that |actual()|

will match exactly the length of the array.

Defined at line 81 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

template <size_t N>
MessagePart<T> WrapEmpty (T (&)[N] array)

Constructs an empty |MessagePart| wrapping an array.

The array is assumed to be uninitialized, hence |actual()| is set to 0.

Defined at line 88 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

T * data ()

The data stored in this part of the message.

Defined at line 93 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

uint32_t capacity ()

The total amount of storage available for this part of the message.

This part of the message might not actually use all of this storage. To

determine how much storage is actually being used, see |actual()|.

Defined at line 99 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

uint32_t actual ()

The amount of storage that is actually being used for this part of the

message.

There might be more storage available than is actually being used. To

determine how much storage is available, see |capacity()|.

Defined at line 106 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

void set_actual (uint32_t actual)

Defined at line 107 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

T * begin ()

Defined at line 109 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

const T * begin ()

Defined at line 110 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

const T * cbegin ()

Defined at line 111 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

T * end ()

Defined at line 113 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

const T * end ()

Defined at line 114 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

const T * cend ()

Defined at line 115 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h

size_t size ()

Defined at line 117 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message_part.h