OpenTTD Source 20250220-master-gf89924a727
|
Public Member Functions | |
constexpr auto | operator<=> (const CompanyMask &) const noexcept=default |
![]() | |
constexpr | BaseBitSet (uint16_t data) |
constexpr auto | operator<=> (const BaseBitSet &) const noexcept=default |
constexpr CompanyMask & | Set () |
Set all bits. | |
constexpr CompanyMask & | Set (CompanyID value) |
Set the value-th bit. | |
constexpr CompanyMask & | Set (const CompanyMask &other) |
Set values from another bitset. | |
constexpr CompanyMask & | Set (CompanyID value, bool set) |
Assign the value-th bit. | |
constexpr CompanyMask & | Reset (CompanyID value) |
Reset the value-th bit. | |
constexpr CompanyMask & | Reset (const CompanyMask &other) |
Reset values from another bitset. | |
constexpr CompanyMask & | Flip (CompanyID value) |
Flip the value-th bit. | |
constexpr CompanyMask & | Flip (const CompanyMask &other) |
Flip values from another bitset. | |
constexpr bool | Test (CompanyID value) const |
Test if the value-th bit is set. | |
constexpr bool | All (const CompanyMask &other) const |
Test if all of the values are set. | |
constexpr bool | All () const |
Test if all of the values are set. | |
constexpr bool | Any (const CompanyMask &other) const |
Test if any of the given values are set. | |
constexpr bool | Any () const |
Test if any of the values are set. | |
constexpr bool | None () const |
Test if none of the values are set. | |
constexpr CompanyMask | operator| (const CompanyMask &other) const |
constexpr CompanyMask | operator& (const CompanyMask &other) const |
constexpr uint16_t | base () const noexcept |
Retrieve the raw value behind this bit set. | |
constexpr bool | IsValid () const |
Test that the raw value of this bit set is valid. | |
auto | begin () const |
auto | end () const |
Static Public Member Functions | |
static constexpr size_t | DecayValueType (CompanyID value) |
Additional Inherited Members | |
![]() | |
using | ValueType = CompanyID |
Value type of this BaseBitSet. | |
using | BaseType = uint16_t |
Storage type of this BaseBitSet, be ConvertibleThroughBase. | |
![]() | |
static constexpr uint16_t | MASK |
Mask of valid values. | |
Definition at line 43 of file company_type.h.
|
inlineconstexpr |
Definition at line 45 of file company_type.h.
|
inlinestaticconstexpr |
Definition at line 46 of file company_type.h.