OpenTTD Source 20250220-master-gf89924a727
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 BaseBitSet (uint16_t data)
 
constexpr auto operator<=> (const BaseBitSet &) const noexcept=default
 
constexpr CompanyMaskSet ()
 Set all bits.
 
constexpr CompanyMaskSet (CompanyID value)
 Set the value-th bit.
 
constexpr CompanyMaskSet (const CompanyMask &other)
 Set values from another bitset.
 
constexpr CompanyMaskSet (CompanyID value, bool set)
 Assign the value-th bit.
 
constexpr CompanyMaskReset (CompanyID value)
 Reset the value-th bit.
 
constexpr CompanyMaskReset (const CompanyMask &other)
 Reset values from another bitset.
 
constexpr CompanyMaskFlip (CompanyID value)
 Flip the value-th bit.
 
constexpr CompanyMaskFlip (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

- Public Types inherited from BaseBitSet< CompanyMask, CompanyID, uint16_t >
using ValueType = CompanyID
 Value type of this BaseBitSet.
 
using BaseType = uint16_t
 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()

constexpr CompanyMask::CompanyMask ( )
inlineconstexpr

Definition at line 45 of file company_type.h.

Member Function Documentation

◆ DecayValueType()

static 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: