class StrictBits

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

Verifies that user code can manipulate these bits.

We use a uint8 since most bitwise operations will cast their operands to

int, and therefore special casting is required to properly compile.

|StrictBits| is strict, hence is guaranteed to only contain

members defined in the FIDL schema when receiving it in a message.

Sending unknown members will fail at runtime.

Public Members

static StrictBits kB
static StrictBits kD
static StrictBits kE
static StrictBits kMask

Public Methods

void StrictBits ()

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

void StrictBits (uint8_t value)

Constructs an instance of |StrictBits| from an underlying primitive value,

preserving any bit member not defined in the FIDL schema.

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

uint8_t operator unsigned char ()

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

bool operator bool ()

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

bool operator== (const StrictBits & other)

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

bool operator!= (const StrictBits & other)

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

std::optional<StrictBits> TryFrom (uint8_t value)

Constructs an instance of |StrictBits| from an underlying primitive value

if the primitive does not contain any unknown members not defined in the

FIDL schema. Otherwise, returns |std::nullopt|.

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

StrictBits TruncatingUnknown (uint8_t value)

Constructs an instance of |StrictBits| from an underlying primitive value,

clearing any bit member not defined in the FIDL schema.

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

StrictBits operator~ ()

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

StrictBits operator| (const StrictBits & other)

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

StrictBits operator& (const StrictBits & other)

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

StrictBits operator^ (const StrictBits & other)

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

StrictBits operator- (const StrictBits & other)

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

void operator|= (const StrictBits & other)

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

void operator&= (const StrictBits & other)

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

void operator^= (const StrictBits & other)

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

void operator-= (const StrictBits & other)

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