OpenTTD Source 20260206-master-g4d4e37dbf1
CompanyMask Class Reference
Inheritance diagram for CompanyMask:
BaseBitSet< CompanyMask, CompanyID, uint16_t >

Public Member Functions

constexpr auto operator<=> (const CompanyMask &) const noexcept=default
Public Member Functions inherited from BaseBitSet< CompanyMask, CompanyID, uint16_t >
constexpr auto operator<=> (const BaseBitSet &) const noexcept=default
constexpr CompanyMaskSet ()
 Set all bits.
constexpr CompanyMaskReset ()
 Reset all bits.
constexpr CompanyMaskFlip (CompanyID value)
 Flip the value-th bit.
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 Any (const CompanyMask &other) const
 Test if any of the given values are set.
constexpr bool None () const
 Test if none of the values are set.
constexpr CompanyMaskoperator|= (const CompanyMask &other)
constexpr CompanyMask operator| (const CompanyMask &other) const
constexpr CompanyMaskoperator&= (const CompanyMask &other)
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.
uint Count () const
 Count the number of set bits.
std::optional< CompanyID > GetNthSetBit (uint n) const
 Get the value of the Nth set bit.
auto begin () const
auto end () const

Static Public Member Functions

static constexpr size_t DecayValueType (CompanyID value)

Additional Inherited Members

Public Types inherited from BaseBitSet< CompanyMask, CompanyID, uint16_t >
using ValueType
 Value type of this BaseBitSet.
using BaseType
 Storage type of this BaseBitSet, be ConvertibleThroughBase.
Static Public Attributes inherited from BaseBitSet< CompanyMask, CompanyID, uint16_t >
static constexpr uint16_t MASK
 Mask of valid values.

Detailed Description

Definition at line 43 of file company_type.h.

Constructor & Destructor Documentation

◆ CompanyMask()

CompanyMask::CompanyMask ( )
inlineconstexpr

Definition at line 45 of file company_type.h.

Member Function Documentation

◆ DecayValueType()

constexpr size_t CompanyMask::DecayValueType ( CompanyID value)
inlinestaticconstexpr

Definition at line 46 of file company_type.h.


The documentation for this class was generated from the following file: