OpenTTD Source 20260218-master-g2123fca5ea
BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask > Class Template Reference

Base for bit set wrapper. More...

#include <base_bitset_type.hpp>

Inheritance diagram for BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >:
EnumBitSet< VehicleAirFlag, uint8_t > EnumBitSet< AirportMovingDataFlag, uint16_t > EnumBitSet< AirportBlock, uint64_t > EnumBitSet< Flag, uint8_t > EnumBitSet< VehicleFlag, uint16_t > EnumBitSet< ControlFlag, uint8_t > EnumBitSet< BridgePillarFlag, uint8_t > EnumBitSet< CargoClass, uint16_t > EnumBitSet< DoCommandFlag, uint16_t > EnumBitSet< CommandFlag, uint16_t > EnumBitSet< PoolType, uint8_t > EnumBitSet< Direction, uint8_t > EnumBitSet< DiagDirection, uint8_t > EnumBitSet< DropDownOption, uint8_t > EnumBitSet< EngineDisplayFlag, uint8_t > EnumBitSet< ExtraEngineFlag, uint8_t > EnumBitSet< EngineMiscFlag, uint8_t > EnumBitSet< EngineFlag, uint8_t > EnumBitSet< Mode, uint8_t > EnumBitSet< FontSize, uint8_t > EnumBitSet< GroupFlag, uint8_t > EnumBitSet< BuildingFlag, uint8_t > EnumBitSet< HouseZone, uint16_t > EnumBitSet< HouseExtraFlag, uint8_t > EnumBitSet< HouseRandomTrigger, uint8_t > EnumBitSet< IndustryControlFlag, uint8_t, IndustryControlFlag::End > EnumBitSet< IndustryRandomTrigger, uint8_t > EnumBitSet< IndustryAnimationTrigger, uint8_t > EnumBitSet< IndustryLifeType, uint8_t > EnumBitSet< IndustryBehaviour, uint32_t > EnumBitSet< IndustryTileSpecialFlag, uint8_t > EnumBitSet< LandscapeType, uint8_t > EnumBitSet< BorderFlag, uint8_t > EnumBitSet< EdgeUpdateMode, uint8_t > EnumBitSet< RefreshFlag, uint8_t > EnumBitSet< AdminUpdateFrequency, uint8_t > EnumBitSet< ContentType, uint16_t, CONTENT_TYPE_END > EnumBitSet< NetworkAuthenticationMethod, uint16_t > EnumBitSet< GrfMiscBit, uint8_t > EnumBitSet< GrfSpecFeature, uint32_t, GrfSpecFeature::GSF_END > EnumBitSet< BadgeFlag, uint8_t > EnumBitSet< VehicleCallbackMask, uint16_t > EnumBitSet< StationCallbackMask, uint16_t > EnumBitSet< RoadStopCallbackMask, uint8_t > EnumBitSet< HouseCallbackMask, uint16_t > EnumBitSet< CanalCallbackMask, uint8_t > EnumBitSet< CargoCallbackMask, uint8_t > EnumBitSet< IndustryCallbackMask, uint16_t > EnumBitSet< IndustryTileCallbackMask, uint8_t > EnumBitSet< ObjectCallbackMask, uint8_t > EnumBitSet< AirportTileCallbackMask, uint8_t > EnumBitSet< GRFConfigFlag, uint8_t > EnumBitSet< GRFBug, uint8_t > EnumBitSet< ObjectFlag, uint16_t > EnumBitSet< RoadStopDrawMode, uint8_t > EnumBitSet< RoadStopSpecFlag, uint8_t > EnumBitSet< StationSpecFlag, uint8_t > EnumBitSet< TileFlag, uint8_t > EnumBitSet< NewsFlag, uint8_t > EnumBitSet< ObjectAnimationTrigger, uint16_t > EnumBitSet< PauseMode, uint8_t > EnumBitSet< OrderNonStopFlag, uint8_t > EnumBitSet< OrderDepotTypeFlag, uint8_t > EnumBitSet< OrderDepotActionFlag, uint8_t > EnumBitSet< EndSegmentReason, uint16_t > EnumBitSet< PickerInvalidation, uint8_t > EnumBitSet< RailTypeFlag, uint8_t > EnumBitSet< RailType, uint64_t > EnumBitSet< RoadTypeFlag, uint8_t > EnumBitSet< RoadType, uint64_t > EnumBitSet< RoadStopStatusFlag, uint8_t > EnumBitSet< ScriptConfigFlag, uint8_t > EnumBitSet< ScriptConfigItemKey, uint8_t > EnumBitSet< SettingEntryFlag, uint8_t > EnumBitSet< SettingFlag, uint16_t > EnumBitSet< SigFlag, uint16_t > EnumBitSet< SortListFlag, uint8_t > EnumBitSet< SpriteCacheCtrlFlag, uint8_t > EnumBitSet< SpriteComponent, uint8_t, SpriteComponent::End > EnumBitSet< State, uint8_t > EnumBitSet< StationFacility, uint8_t > EnumBitSet< StationRandomTrigger, uint8_t > EnumBitSet< StationAnimationTrigger, uint16_t > EnumBitSet< AirportAnimationTrigger, uint8_t > EnumBitSet< StringValidationSetting, uint8_t > EnumBitSet< PartOfSubsidy, uint8_t > EnumBitSet< CmdFlag, uint8_t > EnumBitSet< CzechAllowFlag, uint8_t > EnumBitSet< CzechChooseFlag, uint8_t > EnumBitSet< QueryStringFlag, uint8_t > EnumBitSet< VehicleEnterTileState, uint8_t > EnumBitSet< TownFlag, uint8_t > EnumBitSet< TownAction, uint8_t > EnumBitSet< TownExpandMode, uint8_t > EnumBitSet< VehicleRailFlag, uint16_t > EnumBitSet< ConsistChangeFlag, uint8_t > EnumBitSet< VehState, uint8_t > EnumBitSet< DepotCommandFlag, uint8_t > EnumBitSet< VehicleRandomTrigger, uint8_t > EnumBitSet< ViewportStringFlag, uint8_t > EnumBitSet< AspectFlag, uint8_t > EnumBitSet< NWidgetDisplayFlag, uint16_t > EnumBitSet< NWidContainerFlag, uint8_t > EnumBitSet< FrameFlag, uint8_t > EnumBitSet< WindowDefaultFlag, uint8_t > EnumBitSet< WindowFlag, uint16_t > EnumBitSet< ZoomLevel, uint8_t > EnumBitSet< Tenum, Tstorage, Tend_value >

Public Types

using ValueType = Tvalue_type
 Value type of this BaseBitSet.
using BaseType = Tstorage
 Storage type of this BaseBitSet, be ConvertibleThroughBase.

Public Member Functions

constexpr BaseBitSet ()
 Create an empty bitset.
constexpr BaseBitSet (Tstorage data)
 Create a bitset with a given bits that are within the mask of valid values.
constexpr auto operator<=> (const BaseBitSet &) const noexcept=default
constexpr Timpl & Set ()
 Set all bits.
constexpr Timpl & Set (Tvalue_type value)
 Set the value-th bit.
constexpr Timpl & Set (const Timpl &other)
 Set values from another bitset.
constexpr Timpl & Set (Tvalue_type value, bool set)
 Assign the value-th bit.
constexpr Timpl & Reset ()
 Reset all bits.
constexpr Timpl & Reset (Tvalue_type value)
 Reset the value-th bit.
constexpr Timpl & Reset (const Timpl &other)
 Reset values from another bitset.
constexpr Timpl & Flip (Tvalue_type value)
 Flip the value-th bit.
constexpr Timpl & Flip (const Timpl &other)
 Flip values from another bitset.
constexpr bool Test (Tvalue_type value) const
 Test if the value-th bit is set.
constexpr bool All (const Timpl &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 Timpl &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 Timpl & operator|= (const Timpl &other)
constexpr Timpl operator| (const Timpl &other) const
constexpr Timpl & operator&= (const Timpl &other)
constexpr Timpl operator& (const Timpl &other) const
constexpr Tstorage 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< Tvalue_type > GetNthSetBit (uint n) const
 Get the value of the Nth set bit.
auto begin () const
 Returns an iterator to begin of the set bits.
auto end () const
 Returns an iterator to the end of the set bits.

Static Public Attributes

static constexpr Tstorage MASK = Tmask
 Mask of valid values.

Private Attributes

Tstorage data
 Bitmask of values.

Detailed Description

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
class BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >

Base for bit set wrapper.

Allows wrapping strong type values as a bit set. Methods are loosely modelled on std::bitset.

Template Parameters
Tvalue_typeType of values to wrap.
TstorageStorage type required to hold values.

Definition at line 22 of file base_bitset_type.hpp.

Member Typedef Documentation

◆ BaseType

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
using BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::BaseType = Tstorage

Storage type of this BaseBitSet, be ConvertibleThroughBase.

Definition at line 25 of file base_bitset_type.hpp.

◆ ValueType

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
using BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::ValueType = Tvalue_type

Value type of this BaseBitSet.

Definition at line 24 of file base_bitset_type.hpp.

Constructor & Destructor Documentation

◆ BaseBitSet() [1/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::BaseBitSet ( )
inlineconstexpr

Create an empty bitset.

Definition at line 29 of file base_bitset_type.hpp.

◆ BaseBitSet() [2/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::BaseBitSet ( Tstorage data)
inlineexplicitconstexpr

Create a bitset with a given bits that are within the mask of valid values.

Parameters
dataThe initial set bits.

Definition at line 35 of file base_bitset_type.hpp.

Member Function Documentation

◆ All() [1/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::All ( ) const
inlineconstexpr

Test if all of the values are set.

Returns
true iff all of the values are set.

Definition at line 163 of file base_bitset_type.hpp.

◆ All() [2/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::All ( const Timpl & other) const
inlineconstexpr

Test if all of the values are set.

Parameters
otherBitSet of values to test.
Returns
true iff all of the values are set.

Definition at line 154 of file base_bitset_type.hpp.

Referenced by AddDateIntroducedRailTypes(), AddDateIntroducedRoadTypes(), ScriptInfo::AddSetting(), AircraftController(), CmdAlterGroup(), HandleBankruptcyTakeover(), MakeCzechTownName(), and TryBuildTownHouse().

◆ Any() [1/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any ( ) const
inlineconstexpr

Test if any of the values are set.

Returns
true iff any of the values are set.

Definition at line 182 of file base_bitset_type.hpp.

◆ Any() [2/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any ( const Timpl & other) const
inlineconstexpr

Test if any of the given values are set.

Parameters
otherBitSet of values to test.
Returns
true iff any of the given values are set.

Definition at line 173 of file base_bitset_type.hpp.

Referenced by AdvanceHouseConstruction(), AfterLoadGRFs(), AgeVehicle(), AircraftController(), AirportFindFreeTerminal(), AirportHasBlock(), AirportSetBlocks(), BuildTownHouse(), CalcEngineReliability(), CFollowTrackT< TRANSPORT_WATER, Ship, true >::CanEnterNewTile(), CanVehicleUseStation(), ChangeIndustryProduction(), CheckAutoreplaceValidity(), CheckClickOnVehicle(), CheckIfIndustryTilesAreFree(), ClearTownHouse(), CmdBuildObject(), CmdClearArea(), CmdInsertOrder(), CmdLandscapeClear(), CmdModifyOrder(), CmdTurnRoadVeh(), IndustryViewWindow::DrawInfo(), NetworkContentListWindow::FilterContentList(), FreeTerminal(), GetCompanyRailTypes(), GetEngineCategoryName(), GetEngineLivery(), GetOrderCmdFromTile(), GetRailTypes(), HousePickerCallbacks::GetTypeName(), IndustriesScopeResolver::GetVariable(), HandleBankruptcyTakeover(), HandleScrollbarScrolling(), HasAnyRailTypesAvail(), HasAnyRoadTypesAvail(), RoadStop::HasFreeBay(), HasTileAnyRoadType(), CommandHelperBase::InternalExecutePrepTest(), CommandHelperBase::InternalExecuteProcessResult(), CommandHelperBase::InternalExecuteValidateTestAndPrepExec(), IsCargoInClass(), IsEngineBuildable(), IsHouseSpecValid(), BaseStation::IsInUse(), Vehicle::LeaveUnbunchingDepot(), LoadUnloadStation(), MakeCzechTownName(), MakeTownHouse(), ModifyStationRatingAround(), NetworkContentListWindow::OnClick(), NetworkContentListWindow::OnKeyPress(), OnTick_Companies(), CYapfCostRailT< Types >::PfCalcCost(), ReadGRFSpriteOffsets(), ReadSprite(), RemoveNearbyStations(), TileLoop_Town(), TriggerHouseAnimation_WatchedCargoAccepted(), TryBuildTownHouse(), NetworkContentListWindow::UpdateFilterState(), UpdateSignalsAroundSegment(), UpdateStationAcceptance(), and VehicleTimetableSorter().

◆ base()

◆ begin()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
auto BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::begin ( ) const
inline

Returns an iterator to begin of the set bits.

Returns
The iterator.

Definition at line 264 of file base_bitset_type.hpp.

◆ Count()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
uint BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Count ( ) const
inline

Count the number of set bits.

Returns
The number of bits set to true.

Definition at line 240 of file base_bitset_type.hpp.

◆ end()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
auto BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::end ( ) const
inline

Returns an iterator to the end of the set bits.

Returns
The iterator past the last set bit.

Definition at line 270 of file base_bitset_type.hpp.

◆ Flip() [1/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Flip ( const Timpl & other)
inlineconstexpr

Flip values from another bitset.

Parameters
otherBitset of values to flip.
Returns
The bit set

Definition at line 133 of file base_bitset_type.hpp.

◆ Flip() [2/2]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Flip ( Tvalue_type value)
inlineconstexpr

◆ GetNthSetBit()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
std::optional< Tvalue_type > BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::GetNthSetBit ( uint n) const
inline

Get the value of the Nth set bit.

Parameters
nThe Nth set bit from which we want to know the value.
Returns
The value of the Nth set bit, or std::nullopt if no Nth bit set.

Definition at line 250 of file base_bitset_type.hpp.

Referenced by GetEngineCategoryName(), and TownAuthorityWindow::OnClick().

◆ IsValid()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::IsValid ( ) const
inlineconstexpr

Test that the raw value of this bit set is valid.

Returns
true iff the no bits outside the masked value are set.

Definition at line 231 of file base_bitset_type.hpp.

Referenced by CmdIndustrySetFlags().

◆ None()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::None ( ) const
inlineconstexpr

◆ operator&()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::operator& ( const Timpl & other) const
inlineconstexpr

Definition at line 213 of file base_bitset_type.hpp.

◆ operator&=()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::operator&= ( const Timpl & other)
inlineconstexpr

Definition at line 207 of file base_bitset_type.hpp.

◆ operator|()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::operator| ( const Timpl & other) const
inlineconstexpr

Definition at line 202 of file base_bitset_type.hpp.

◆ operator|=()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::operator|= ( const Timpl & other)
inlineconstexpr

Definition at line 196 of file base_bitset_type.hpp.

◆ Reset() [1/3]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset ( )
inlineconstexpr

Reset all bits.

Returns
The bit set

Definition at line 86 of file base_bitset_type.hpp.

Referenced by AddArticulatedParts(), AdvanceWagonsAfterSwap(), AfterLoadGame(), AircraftController(), AircraftHandleDestTooFar(), AircraftLeaveHangar(), RoadStop::AllocateDriveThroughBay(), BridgeChangeInfo(), CheckShipStayInDepot(), CheckTrainStayInDepot(), ClearTownHouse(), CmdAutofillTimetable(), CmdInsertOrder(), CmdModifyOrder(), CmdOrderRefit(), CmdTerraformLand(), CmdTownGrowthRate(), DisableEngineForCompany(), DisasterTick_Zeppeliner(), DispatchLeftClickEvent(), DoCreateTown(), DrawRailCatenaryRailway(), Order::Equals(), FixupTrainLengths(), TownAuthorityWindow::GetEnabledActions(), GetRailTypeDropDownList(), GUIEngineListAddChildren(), HandleAircraftSmoke(), HandleCrashedAircraft(), HandleWindowDragging(), HasAnyRailTypesAvail(), HasAnyRoadTypesAvail(), HasRoadTypeAvail(), ENGNChunkHandler::Load(), LoadUnloadVehicle(), RoadStop::MakeDriveThrough(), NewVehicleAvailable(), Window::OnDropdownClose(), DropdownWindow::OnFocusLost(), ParamSet(), Vehicle::PreDestructor(), PrepareUnload(), ReadGRFSpriteOffsets(), GUIList< BuildBridgeData >::RebuildDone(), ServerNetworkAdminSocketHandler::Receive_ADMIN_JOIN_SECURE(), LinkRefresher::RefreshLinks(), RemoveAirport(), RemoveBuoy(), RemoveDock(), RemoveFromRailBaseStation(), RemoveRoadStop(), RemoveRoadWaypointStop(), ReverseTrainDirection(), GUIList< BuildBridgeData >::SetFiltering(), GUIList< BuildBridgeData >::SetFilterState(), SetGroupFlag(), GUIList< BuildBridgeData >::SetListing(), GUIList< BuildBridgeData >::Sort(), StartWindowDrag(), StartWindowSizing(), StationHandleBigTick(), TrainCheckIfLineEnds(), TriggerRoadStopRandomisation(), TriggerStationRandomisation(), TryPathReserve(), UpdateStationRating(), UpdateTownGrowth(), UpdateVehicleTimetable(), VehicleEnter_Track(), and VehicleEnterDepot().

◆ Reset() [2/3]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset ( const Timpl & other)
inlineconstexpr

Reset values from another bitset.

Parameters
otherBitset of values to reset.
Returns
The bit set

Definition at line 108 of file base_bitset_type.hpp.

◆ Reset() [3/3]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset ( Tvalue_type value)
inlineconstexpr

Reset the value-th bit.

Parameters
valueBit to reset.
Returns
The bit set

Definition at line 97 of file base_bitset_type.hpp.

◆ Set() [1/4]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set ( )
inlineconstexpr

Set all bits.

Returns
The bit set

Definition at line 43 of file base_bitset_type.hpp.

Referenced by AcceptEnginePreview(), AddArticulatedParts(), AddDateIntroducedRailTypes(), AddDateIntroducedRoadTypes(), ScriptInfo::AddSetting(), AfterLoadGame(), AfterLoadGRFs(), AfterLoadVehiclesPhase2(), AircraftController(), AircraftEventHandler_Flying(), AircraftHandleDestTooFar(), AirportHasBlock(), AirportSetBlocks(), AppendCopyableBadgeList(), ApplyBadgeFeaturesToClassBadges(), BridgeChangeInfo(), CalculateRoadStopCost(), ChangeTownRating(), CheckTrainStayInDepot(), RoadStop::ClearDriveThrough(), DropdownWindow::Close(), NetworkContentDownloadStatusWindow::Close(), CmdAutofillTimetable(), CmdBuildAircraft(), CmdBuildBuoy(), CmdBuildRailStation(), CmdBuildRailVehicle(), CmdBuildRailWagon(), CmdBuildRailWaypoint(), CmdBuildRoadStop(), CmdBuildRoadWaypoint(), CmdBuildVehicle(), CmdClearArea(), CmdCloneVehicle(), CmdCreateGroup(), CmdIndustrySetProduction(), CmdModifyOrder(), CmdMoveVehicle(), CmdSetGroupLivery(), CmdSetVehicleVisibility(), CmdTerraformLand(), CmdTownGrowthRate(), CommandFlagsToDCFlags(), CompanyCheckBankrupt(), Order::ConvertFromOldSavegame(), DrawRailCatenaryRailway(), DrawTile_Road(), EnableEngineForCompany(), EnumBitSet< VehicleAirFlag, uint8_t >::EnumBitSet(), ErrorUnknownCallbackResult(), ExploreSegment(), FinaliseBadges(), FinalisePriceBaseMultipliers(), FixTTOEngines(), GUIList< BuildBridgeData >::ForceRebuild(), GUIList< BuildBridgeData >::ForceResort(), RoadStop::FreeBay(), FreeTerminal(), GetAllCompatibleRailTypes(), GetAllIntroducesRailTypes(), GetAllPoweredRailTypes(), GetCompanyRailTypes(), GetCompanyRoadTypes(), TownAuthorityWindow::GetEnabledActions(), GetGlobalVariable(), GetMaskOfTownActions(), SmallMapWindow::GetOverlayCompanyMask(), GetPresentRoadTypes(), GetRailTypes(), RoadStopScopeResolver::GetRandomTriggers(), StationScopeResolver::GetRandomTriggers(), GetRoadTypes(), HandleAircraftEnterHangar(), HandleBankruptcyTakeover(), HandleIncomingNetworkGameInfoGRFConfig(), InitializeNetworkPools(), CoreTextFontCache::InternalGetGlyph(), FreeTypeFontCache::InternalGetGlyph(), Win32FontCache::InternalGetGlyph(), Vehicle::LeaveStation(), ENGNChunkHandler::Load(), SlStationGoods::Load(), LoadUnloadVehicle(), MakeCzechTownName(), MarkBadgeSeen(), MarkTrainAsStuck(), MoveBuoysToWaypoints(), MoveWaypointsToBaseStations(), GUIList< BuildBridgeData >::NeedResort(), NetworkAutoCleanCompanies(), NewVehicleAvailable(), NetworkContentDownloadStatusWindow::OnDownloadProgress(), CYapfCostRailT< Types >::PfCalcCost(), LinkRefresher::PredictNextOrder(), RailTypeChangeInfo(), ReadGRFSpriteOffsets(), GUIList< BuildBridgeData >::RebuildDone(), LinkRefresher::RefreshLinks(), ReverseTrainSwapVeh(), RoadStopUpdateCachedTriggers(), RoadTypeChangeInfo(), ScrollbarClickPositioning(), RoadStop::SetEntranceBusy(), GUIList< BuildBridgeData >::SetFiltering(), GUIList< BuildBridgeData >::SetFilterState(), SetGroupFlag(), BaseSettingEntry::SetLastField(), GUIList< BuildBridgeData >::SetListing(), GUIList< BuildBridgeData >::SetSortType(), Window::SetTimeout(), Window::SetWhiteBorder(), ShowDropDownList(), ShowNetworkContentListWindow(), ShowNewGrfVehicleError(), StartupOneEngine(), StartWindowDrag(), StartWindowSizing(), StationUpdateCachedTriggers(), TileLoop_Town(), TownActionBuildStatue(), TownTickHandler(), TrainApproachingLineEnd(), TrainCheckIfLineEnds(), TriggerRoadStopRandomisation(), TriggerStationRandomisation(), TryBuildTownHouse(), LinkGraphLegendWindow::UpdateOverlayCompanies(), UpdateStationAcceptance(), BaseCompanyGraphWindow::UpdateStatistics(), UpdateTownGrowth(), UpdateVehicleTimetable(), VehicleEnter_Track(), VehicleEnterDepot(), VehicleEnteredDepotThisTick(), ViewportAddSignStrings(), ViewportAddStationStrings(), and ViewportAddTownStrings().

◆ Set() [2/4]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set ( const Timpl & other)
inlineconstexpr

Set values from another bitset.

Parameters
otherBitset of values to set.
Returns
The bit set

Definition at line 65 of file base_bitset_type.hpp.

◆ Set() [3/4]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set ( Tvalue_type value)
inlineconstexpr

Set the value-th bit.

Parameters
valueBit to set.
Returns
The bit set

Definition at line 54 of file base_bitset_type.hpp.

◆ Set() [4/4]

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set ( Tvalue_type value,
bool set )
inlineconstexpr

Assign the value-th bit.

Parameters
valueBit to assign to.
settrue if the bit should be set, false if the bit should be reset.
Returns
The EnumBitset

Definition at line 77 of file base_bitset_type.hpp.

◆ Test()

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test ( Tvalue_type value) const
inlineconstexpr

Test if the value-th bit is set.

Parameters
valueBit to check.
Returns
true iff the requested bit is set.

Definition at line 144 of file base_bitset_type.hpp.

Referenced by AddAcceptedCargoOfHouse(), AddBadgeClassesToConfiguration(), LinkGraph::BaseNode::AddEdge(), AddEngineReplacement(), NewGRFWindow::AddGRFToActive(), LinkGraph::AddNode(), ScriptInfo::AddSetting(), AfterLoadGame(), AircraftController(), AircraftEventHandler(), AircraftEventHandler_Flying(), AircraftEventHandler_InHangar(), AircraftHandleDestTooFar(), AircraftVehicleChangeInfo(), AirportMaintenanceCost(), AnimateNewObjectTile(), AppendCopyableBadgeList(), BridgeChangeInfo(), TimetableWindow::BuildArrivalDepartureList(), BuildObject(), RefitWindow::BuildRefitList(), BuildReplacementVehicle(), BuildStationPart(), BuildTownHouse(), CalcEngineReliability(), CalcPercentVehicleFilled(), CanDetermineTimeTaken(), CFollowTrackT< TRANSPORT_WATER, Ship, true >::CanEnterNewTile(), CanVehicleUseStation(), CargoSpecClassSorter(), CcRoadStop(), CcStartStopVehicle(), ChangeIndustryProduction(), ChangeTownRating(), ChangeTrainDirRandomly(), ChangeVehicleNews(), CheckAutoreplaceValidity(), CheckBridgeAvailability(), CheckBuildableTile(), CheckFlatLandRailStation(), CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), CheckIfCanLevelIndustryPlatform(), CheckIfIndustryTilesAreFree(), CheckIfIndustryTileSlopes(), CheckIndustryCloseDownProtection(), RoadStop::Entry::CheckIntegrity(), CheckOrders(), CheckSoftLimit(), CheckSubsidised(), CheckVehicleBreakdown(), PoolBase::Clean(), RoadStop::ClearDriveThrough(), ClearTile_Station(), ClearTile_Town(), ClearTile_TunnelBridge(), ClearTownHouse(), DropdownWindow::Close(), CloseAllNonVitalWindows(), CloseConstructionWindows(), CloseNonVitalWindows(), CloseWindowById(), CmdAddSharedVehicleGroup(), CmdAddVehicleGroup(), CmdAlterGroup(), CmdAutofillTimetable(), CmdAutoreplaceVehicle(), CmdBuildAircraft(), CmdBuildAirport(), CmdBuildBridge(), CmdBuildBuoy(), CmdBuildCanal(), CmdBuildDock(), CmdBuildIndustry(), CmdBuildObject(), CmdBuildObjectArea(), CmdBuildRailStation(), CmdBuildRailVehicle(), CmdBuildRailWagon(), CmdBuildRailWaypoint(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildRoadStop(), CmdBuildRoadVehicle(), CmdBuildRoadWaypoint(), CmdBuildShip(), CmdBuildShipDepot(), CmdBuildSingleRail(), CmdBuildSingleSignal(), CmdBuildTrainDepot(), CmdBuildTunnel(), CmdBuildVehicle(), CmdBulkChangeTimetable(), CmdBuyCompany(), CmdChangeBankBalance(), CmdChangeCompanySetting(), CmdChangeServiceInt(), CmdChangeSetting(), CmdChangeTimetable(), CmdClearArea(), CmdClearOrderBackup(), CmdCloneOrder(), CmdCloneVehicle(), CmdCompanyAllowListCtrl(), CmdCompanyCtrl(), CmdConvertRail(), CmdConvertRoad(), CmdCreateGoal(), CmdCreateGroup(), CmdCreateLeagueTable(), CmdCreateLeagueTableElement(), CmdCreateStoryPage(), CmdCreateStoryPageElement(), CmdCreateSubsidy(), CmdCustomNewsItem(), CmdDecreaseLoan(), CmdDeleteGroup(), CmdDeleteOrder(), CmdDeleteTown(), CmdDoTownAction(), CmdEngineCtrl(), CmdExpandTown(), CmdForceTrainProceed(), CmdFoundTown(), CmdGiveMoney(), CmdGoalQuestion(), CmdGoalQuestionAnswer(), CmdIncreaseLoan(), CmdIndustrySetExclusivity(), CmdIndustrySetFlags(), CmdIndustrySetProduction(), CmdIndustrySetText(), CmdInsertOrder(), CmdLandscapeClear(), CmdLevelLand(), CmdModifyOrder(), CmdMoveOrder(), CmdMoveRailVehicle(), CmdMoveSign(), CmdMoveStationName(), CmdMoveWaypointName(), CmdOpenCloseAirport(), CmdOrderRefit(), CmdPause(), CmdPlaceHouse(), CmdPlaceHouseArea(), CmdPlaceSign(), CmdPlantTree(), CmdRefitVehicle(), CmdRemoveAllVehiclesGroup(), CmdRemoveGoal(), CmdRemoveLeagueTableElement(), CmdRemoveLongRoad(), CmdRemoveRoadStop(), CmdRemoveSingleRail(), CmdRemoveSingleSignal(), CmdRemoveStoryPage(), CmdRemoveStoryPageElement(), CmdRenameCompany(), CmdRenameDepot(), CmdRenameEngine(), CmdRenamePresident(), CmdRenameSign(), CmdRenameStation(), CmdRenameTown(), CmdRenameVehicle(), CmdRenameWaypoint(), CmdReverseTrainDirection(), CmdScrollViewport(), CmdSellRailWagon(), CmdSellVehicle(), CmdSendVehicleToDepot(), CmdSetAutoReplace(), CmdSetCompanyColour(), CmdSetCompanyManagerFace(), CmdSetCompanyMaxLoan(), CmdSetGoalCompleted(), CmdSetGoalDestination(), CmdSetGoalProgress(), CmdSetGoalText(), CmdSetGroupFlag(), CmdSetGroupLivery(), CmdSetStoryPageDate(), CmdSetStoryPageTitle(), CmdSetTimetableStart(), CmdSetVehicleOnTime(), CmdSetVehicleVisibility(), CmdShowStoryPage(), CmdSkipToOrder(), CmdStartStopVehicle(), CmdStoryPageButton(), CmdTerraformLand(), CmdTownCargoGoal(), CmdTownGrowthRate(), CmdTownRating(), CmdTownSetText(), CmdTurnRoadVeh(), CmdUpdateLeagueTableElementData(), CmdUpdateLeagueTableElementScore(), CmdUpdateStoryPageElement(), CmdWantEnginePreview(), CMSAMine(), CommandFlagsToDCFlags(), ConDumpRailTypes(), ConDumpRoadTypes(), Train::ConsistChanged(), BaseConsist::CopyConsistPropertiesFrom(), CopyHeadSpecificThings(), NetworkAuthenticationServerHandler::Create(), CreateNewIndustryHelper(), DecloneOrder(), DecodeSingleSprite(), DeleteLastWagon(), DetermineNextTrainForceProceeding(), Disaster_CoalMine_Init(), Disaster_Helicopter_Init(), DisasterTick_Ufo(), DispatchLeftClickEvent(), DispatchRightClickEvent(), CommandHelper< Tcmd, Tret(*)(DoCommandFlags, Targs...), true >::Do(), DoBuildLock(), DoClearBridge(), DoClearTunnel(), DoCreateNewIndustry(), DoDrawVehicle(), TarScanner::DoScan(), NWidgetLeaf::Draw(), TownAuthorityWindow::DrawActions(), DrawAircraftImage(), TimetableWindow::DrawArrivalDeparturePanel(), DrawBadgeNameList(), DrawCustomStationFoundations(), DrawEngineList(), DrawFrameRect(), DrawHouseInGUI(), IndustryViewWindow::DrawInfo(), DrawNewHouseTileInGUI(), DrawNewObjectTileInGUI(), DrawOrderString(), DrawRailCatenaryRailway(), TownAuthorityWindow::DrawRatings(), DrawRoadDepotSprite(), DrawRoadStopTile(), DrawRoadVehImage(), SettingEntry::DrawSetting(), DrawStationTile(), TimetableWindow::DrawSummaryPanel(), DrawTile_Road(), DrawTileLayout(), DrawTrainDetails(), DrawTrainImage(), DepotWindow::DrawVehicleInDepot(), BaseVehicleListWindow::DrawVehicleListItems(), BuildIndustryWindow::DrawWidget(), BuildObjectWindow::DrawWidget(), GSConfigWindow::DrawWidget(), ScriptSettingsWindow::DrawWidget(), TownDirectoryWindow::DrawWidget(), TownViewWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), VehicleViewWindow::DrawWidget(), Order::Equals(), ErrorUnknownCallbackResult(), ExploreSegment(), FillGRFDetails(), GUIList< BuildBridgeData >::Filter(), FinalisePriceBaseMultipliers(), FindClosestTrainDepot(), FindNearestHangar(), SlStationNormal::FixPointers(), SlStationWaypoint::FixPointers(), FixTTOEngines(), FloodVehicleProc(), ReplaceVehicleWindow::GenerateReplaceRailList(), GetAllCargoSuffixes(), GetArticulatedRefitMasks(), GetBadgeSprite(), GetBestFittingSubType(), GetBridgeTilePillarFlags(), GetCapacityOfArticulatedParts(), GetCargoSuffix(), GetCargoSuffix(), GetCargoTypesOfArticulatedParts(), GetCompanyRailTypes(), GetCompanyRoadTypes(), NWidgetBadgeFilter::GetDropDownList(), GetEngineLiveryScheme(), GUIList< BuildBridgeData >::GetFiltering(), GetFoundation_Town(), GetGlobalVariable(), BuildHouseWindow::GetHouseInformation(), GetIfStopIsForType(), GetIndustryGamePlayProbability(), GetIndustryProbabilityCallback(), GUIList< BuildBridgeData >::GetListing(), GetLoadAmount(), GetMaskOfTownActions(), OrderList::GetNextDecisionNode(), Train::GetOrderStationLocation(), NewGRFWindow::GetPalette(), GetPreviewCompany(), GetProducedCargoOfHouse(), GetRailTypeDropDownList(), GetRailTypes(), GetRoadTypes(), GetScaledIndustryGenerationProbability(), GetSettingsDesc(), GetTownRoadType(), GetTownRoadTypeFirstIntroductionDate(), HousePickerCallbacks::GetTypeName(), IndustriesScopeResolver::GetVariable(), GetVehicleCannotUseStationReason(), OrdersWindow::GetWidgetString(), SelectCompanyLiveryWindow::GetWidgetString(), HandleAircraftSmoke(), HandleAutoscroll(), HandleBankruptcyTakeover(), HandleCrashedTrain(), HandleScrollbarScrolling(), HandleWindowDragging(), HasPowerOnRail(), HasPowerOnRail(), HasPowerOnRoad(), HasRailCatenary(), GoodsEntry::HasRating(), HasRoadCatenary(), HasRoadTypeAvail(), Vehicle::HasUnbunchingOrder(), HeightMapCoastLines(), HeightMapSmoothCoasts(), IConsoleGetSetting(), IndustryProductionCallback(), IndustryTemporarilyRefusesCargo(), IniSaveSettings(), InitRailTypes(), InitRoadTypes(), CommandHelperBase::InternalDoAfter(), CommandHelperBase::InternalExecutePrepTest(), CommandHelperBase::InternalExecuteProcessResult(), CommandHelperBase::InternalExecuteValidateTestAndPrepExec(), CommandHelperBase::InternalPostBefore(), IsArticulatedVehicleRefittable(), IsCompatibleRail(), IsCompatibleRail(), GUIList< BuildBridgeData >::IsDescSortOrder(), IsEngineBuildable(), IsEngineRefittable(), RoadStop::IsEntranceBusy(), SpecializedStation< T, Tis_waypoint >::IsExpected(), BaseSettingEntry::IsFiltered(), GUIList< BuildBridgeData >::IsFilterEnabled(), RoadStop::IsFreeBay(), IsGoodGRFConfigList(), Engine::IsHidden(), IsLoggableGrfConfig(), IsRoadStopAvailable(), IsStationAvailable(), Vehicle::IsStoppedInDepot(), IsTileForestIndustry(), SlStationGoods::Load(), SlStationNormal::Load(), SlStationWaypoint::Load(), LoadNewGRFFile(), LoadSettings(), LoadUnloadVehicle(), MakeCzechTownName(), MapAircraftMovementState(), MarkTrainAsStuck(), MaybeBringWindowToFront(), MaybeCrashAirplane(), GUIList< BuildBridgeData >::NeedRebuild(), NetworkAutoCleanCompanies(), NewVehicleAvailable(), BuildRoadStationWindow::OnClick(), BuildVehicleWindow::OnClick(), GSConfigWindow::OnClick(), NewGRFWindow::OnClick(), ReplaceVehicleWindow::OnClick(), ScriptSettingsWindow::OnClick(), TimetableWindow::OnClick(), TownAuthorityWindow::OnClick(), VehicleGroupWindow::OnClick(), GameOptionsWindow::OnDropdownSelect(), BuildHouseWindow::OnInvalidateData(), BuildObjectWindow::OnInvalidateData(), NewGRFWindow::OnInvalidateData(), PickerWindow::OnInvalidateData(), TownAuthorityWindow::OnInvalidateData(), DropdownWindow::OnMouseLoop(), StationViewWindow::OnPaint(), TimetableWindow::OnPaint(), TownAuthorityWindow::OnPaint(), BuildHouseWindow::OnPlaceObject(), CheatWindow::OnQueryTextFinished(), GameOptionsWindow::OnQueryTextFinished(), OrdersWindow::OrderClick_Service(), ParamSet(), CYapfCostRailT< Types >::PfCalcCost(), Vehicle::PreDestructor(), LinkRefresher::PredictNextOrder(), PrepareUnload(), PreviousOrderIsUnbunching(), ProcessOrders(), PropagateChildLivery(), Rail90DegTurnDisallowed(), RailNoLevelCrossings(), RailVehicleChangeInfo(), RoadStop::Entry::Rebuild(), ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND(), NetworkGameSocketHandler::ReceiveCommand(), RefitVehicle(), LinkRefresher::RefreshLinks(), RelocateAllWindows(), RemoveAirport(), RemoveBuoy(), RemoveDock(), RemoveEngineReplacement(), RemoveFromRailBaseStation(), RemoveGenericRoadStop(), RemoveLock(), OrderBackup::RemoveOrder(), RemoveOrderFromAllVehicles(), RemoveRailStation(), RemoveRoad(), RemoveRoadStop(), RemoveRoadWaypointStop(), ReplaceChain(), ReplaceFreeUnit(), ScriptConfig::ResetEditableSettings(), ResetSettings(), ResolveObject(), ReverseTrainDirection(), ReverseTrainSwapVeh(), RoadNoLevelCrossing(), RoadVehicleChangeInfo(), SlStationNormal::Save(), SlStationWaypoint::Save(), SendAllVehiclesToDepot(), Vehicle::SendToDepot(), SettingEntry::SetButtons(), SetMouseCursorVehicle(), LinkGraphLegendWindow::SetOverlay(), SetSettingValue(), SetSettingValue(), SetYearEngineAgingStops(), ShipVehicleChangeInfo(), Order::ShouldStopAtStation(), ShowMissingContentWindow(), ShowNewGrfVehicleError(), ShowQueryString(), Vehicle::ShowVisualEffect(), GUIList< BuildBridgeData >::Sort(), StartupOneEngine(), StationHandleBigTick(), VehicleOrderSaver::SwitchToNextOrder(), TestAutoslopeOnRailTile(), TileLoop_Town(), TownActionAdvertiseLarge(), TownActionAdvertiseMedium(), TownActionAdvertiseSmall(), TownActionBribe(), TownActionBuildStatue(), TownActionBuyRights(), TownActionFundBuildings(), TownActionRoadRebuild(), TownAllowedToBuildRoads(), TownCanGrowRoad(), TownLayoutAllows2x2HouseHere(), TownLayoutAllowsHouseHere(), TownDirectoryWindow::TownRatingSorter(), TownTickHandler(), TrainApproachingCrossingEnum(), TrainApproachingCrossingTile(), TrainController(), TrainCrashed(), TriggerHouseAnimation_TileLoop(), TriggerIndustryProduction(), TryBuildTownHouse(), TryPathReserve(), NetworkContentListWindow::TypeOrSelectedFilter(), LinkGraph::BaseEdge::Update(), UpdateAircraftSpeed(), UpdateAirplanesOnNewStation(), UpdateCompanyGroupLiveries(), UpdateHousesAndTowns(), UpdateObjectColours(), UpdateOrderDest(), UpdateSignalsAroundSegment(), UpdateSignalsInBuffer(), UpdateStationRating(), UpdateTownGrowth(), UpdateTownGrowthRate(), UpdateVehicleTimetable(), Vehicle::UpdateVisualEffect(), VehicleEnterDepot(), VehicleEnteredDepotThisTick(), VehicleLengthChanged(), StringData::Version(), ViewportAddString(), and ViewportAddVehicles().

Field Documentation

◆ data

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Tstorage BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::data
private

Bitmask of values.

Definition at line 273 of file base_bitset_type.hpp.

◆ MASK

template<typename Timpl, typename Tvalue_type, typename Tstorage, Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
Tstorage BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::MASK = Tmask
staticconstexpr

Mask of valid values.

Definition at line 26 of file base_bitset_type.hpp.


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