template <typename IdTraits>
class IdType
Defined at line 34 of file ../../src/ui/scenic/lib/types/id_type.h
Newtype pattern implementation for integer identifiers.
Instances are value types, and support being stored in containers. Copying is
supported. The destructor is trivial.
Instances support incrementing for sequential ID generation.
Instances support being used as container keys, by implementing comparison
with strict ordering guarantees and a std::hash specialization.
Instances support being used with std::format(), by delegating to the
std::formatter specialization for the underlying value type.
This type is a zero-cost abstraction. Compiler optimizations will remove any
overhead associated with it.
`IdTraits` must be a traits structure with the same type aliases and static
methods as `DefaultIdTraitsForWireFidl` and `DefaultIdTraitsForWireFidl`, see below.
Public Methods
void IdType<IdTraits> ()
Defined at line 48 of file ../../src/ui/scenic/lib/types/id_type.h
void IdType<IdTraits> (const ValueType & int_value)
Defined at line 50 of file ../../src/ui/scenic/lib/types/id_type.h
template <typename _ = std::enable_if<!std::is_same_v<FidlType, ValueType>>>
void IdType<IdTraits> (const FidlType & fidl_value)
Defined at line 53 of file ../../src/ui/scenic/lib/types/id_type.h
void IdType<IdTraits> (const IdType<IdTraits> & )
Defined at line 56 of file ../../src/ui/scenic/lib/types/id_type.h
void IdType<IdTraits> (IdType<IdTraits> && )
Defined at line 57 of file ../../src/ui/scenic/lib/types/id_type.h
IdType<IdTraits> & operator= (const IdType<IdTraits> & )
Defined at line 58 of file ../../src/ui/scenic/lib/types/id_type.h
IdType<IdTraits> & operator= (IdType<IdTraits> && )
Defined at line 59 of file ../../src/ui/scenic/lib/types/id_type.h
void ~IdType<IdTraits> ()
Defined at line 61 of file ../../src/ui/scenic/lib/types/id_type.h
ValueType operator type-parameter-0-0::ValueType ()
Defined at line 63 of file ../../src/ui/scenic/lib/types/id_type.h
const ValueType & value ()
Defined at line 64 of file ../../src/ui/scenic/lib/types/id_type.h
FidlType ToFidl ()
Defined at line 66 of file ../../src/ui/scenic/lib/types/id_type.h
IdType<IdTraits> & operator++ ()
Defined at line 157 of file ../../src/ui/scenic/lib/types/id_type.h
IdType<IdTraits> operator++ (int )
Defined at line 163 of file ../../src/ui/scenic/lib/types/id_type.h