|
constexpr | BaseBitSet (Tstorage data) |
|
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 (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) const |
|
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.
|
|
auto | begin () const |
|
auto | end () const |
|
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_type | Type of values to wrap. |
Tstorage | Storage type required to hold values. |
Definition at line 25 of file base_bitset_type.hpp.
template<typename Timpl , typename Tvalue_type , typename Tstorage , Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
constexpr bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::All |
( |
const Timpl & |
other | ) |
const |
|
inlineconstexpr |
template<typename Timpl , typename Tvalue_type , typename Tstorage , Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
constexpr bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any |
( |
const Timpl & |
other | ) |
const |
|
inlineconstexpr |
Test if any of the given values are set.
- Parameters
-
other | BitSet of values to test. |
- Returns
- true iff any of the given values are set.
Definition at line 160 of file base_bitset_type.hpp.
Referenced by AdvanceHouseConstruction(), AgeVehicle(), AirportFindFreeTerminal(), AirportHasBlock(), AirportSetBlocks(), CalcEngineReliability(), CanVehicleUseStation(), ChangeIndustryProduction(), CheckIfIndustryTilesAreFree(), ClearTownHouse(), CmdBuildObject(), CmdClearArea(), CmdLandscapeClear(), CMSAMine(), DistributeQueue(), NWidgetViewport::Draw(), NWidgetScrollbar::Draw(), StatusBarWindow::DrawWidget(), FreeTerminal(), GetOrderCmdFromTile(), IndustriesScopeResolver::GetVariable(), HandleBankruptcyTakeover(), HandleScrollbarScrolling(), CommandHelperBase::InternalExecutePrepTest(), CommandHelperBase::InternalExecuteProcessResult(), CommandHelperBase::InternalExecuteValidateTestAndPrepExec(), CommandHelperBase::InternalPostBefore(), IsCargoInClass(), IsHouseSpecValid(), BaseStation::IsInUse(), IndustrySpec::IsRawIndustry(), MakeTownHouse(), NetworkHandlePauseChange(), OnTick_Companies(), RemoveNearbyStations(), StateGameLoop(), TileLoop_Town(), UpdateStationAcceptance(), IndustrySpec::UsesOriginalEconomy(), and WatchedCargoCallback().
template<typename Timpl , typename Tvalue_type , typename Tstorage , Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
constexpr bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::IsValid |
( |
| ) |
const |
|
inlineconstexpr |
template<typename Timpl , typename Tvalue_type , typename Tstorage , Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
constexpr Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset |
( |
Tvalue_type |
value | ) |
|
|
inlineconstexpr |
Reset the value-th bit.
- Parameters
-
- Returns
- The bit set
Definition at line 84 of file base_bitset_type.hpp.
Referenced by AfterLoadGame(), CheckIfCanLevelIndustryPlatform(), CmdAutoreplaceVehicle(), CmdBuildObject(), CmdBuildObjectArea(), CmdClearArea(), CmdLevelLand(), CmdPause(), CmdRemoveLongRoad(), CmdSignalTrackHelper(), CmdTerraformLand(), Window::DisableAllWidgetHighlight(), DisableEngineForCompany(), DisasterTick_Zeppeliner(), DispatchLeftClickEvent(), CommandHelper< Tcmd, Tret(*)(DoCommandFlags, Targs...), true >::Do(), DropdownWindow::DropdownWindow(), GRFConfig::GRFConfig(), GUIEngineListAddChildren(), HandleCrashedAircraft(), HandleWindowDragging(), ENGNChunkHandler::Load(), LoadNewGRF(), GUIList< T, P, F >::NeedResort(), NewVehicleAvailable(), Vehicle::PreDestructor(), GUIList< T, P, F >::RebuildDone(), RemoveAirport(), RemoveBuoy(), RemoveDock(), RemoveFromRailBaseStation(), RemoveRoadStop(), RemoveRoadWaypointStop(), NWidgetCore::SetDisabled(), GUIList< T, P, F >::SetFiltering(), GUIList< T, P, F >::SetFilterState(), SetGroupFlag(), NWidgetCore::SetHighlighted(), GUIList< T, P, F >::SetListing(), NWidgetCore::SetLowered(), Window::SetWidgetHighlight(), GUIList< T, P, F >::Sort(), StartWindowDrag(), StartWindowSizing(), and SettingEntry::UpdateFilterState().
template<typename Timpl , typename Tvalue_type , typename Tstorage , Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
constexpr Timpl & BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set |
( |
| ) |
|
|
inlineconstexpr |
Set all bits.
- Returns
- The bit set
Definition at line 40 of file base_bitset_type.hpp.
Referenced by AcceptEnginePreview(), Station::AddFacility(), AfterLoad_LinkGraphPauseControl(), AfterLoadGame(), AirportHasBlock(), AirportSetBlocks(), AppendCopyableBadgeList(), ApplyBadgeFeaturesToClassBadges(), Window::ApplyDefaults(), ChangeTownRating(), DropdownWindow::Close(), NetworkContentDownloadStatusWindow::Close(), CmdBuildBuoy(), CmdBuildRailWaypoint(), CmdBuildRoadWaypoint(), CmdBuildVehicle(), CmdClearArea(), CmdCloneVehicle(), CmdCreateGroup(), CmdIndustrySetProduction(), CmdMoveVehicle(), CmdPause(), CmdSetVehicleVisibility(), CmdTerraformLand(), CommandFlagsToDCFlags(), CompanyCheckBankrupt(), EnableEngineForCompany(), EnumBitSet< Tenum, Tstorage, Tend_value >::EnumBitSet(), ErrorUnknownCallbackResult(), FinaliseBadges(), FixTTOEngines(), GUIList< T, P, F >::ForceRebuild(), GUIList< T, P, F >::ForceResort(), FreeTerminal(), TownAuthorityWindow::GetEnabledActions(), SmallMapWindow::GetOverlayCompanyMask(), GRFUnsafe(), HandleBankruptcyTakeover(), Window::InitializeData(), InitializeNetworkPools(), CommandHelperBase::InternalExecuteProcessResult(), ENGNChunkHandler::Load(), LoadNewGRF(), MarkBadgeSeen(), MoveBuoysToWaypoints(), MoveWaypointsToBaseStations(), NetworkAutoCleanCompanies(), NewsItem::NewsItem(), NewVehicleAvailable(), GraphLegendWindow::OnInvalidateData(), GUIList< T, P, F >::RebuildDone(), ReplaceChain(), ScrollbarClickPositioning(), SettingEntry::SetButtons(), NWidgetCore::SetDisabled(), GUIList< T, P, F >::SetFiltering(), GUIList< T, P, F >::SetFilterState(), SetGroupFlag(), NWidgetCore::SetHighlighted(), BaseSettingEntry::SetLastField(), GUIList< T, P, F >::SetListing(), NWidgetCore::SetLowered(), GUIList< T, P, F >::SetSortType(), Window::SetTimeout(), Window::SetWhiteBorder(), Window::SetWidgetHighlight(), ShowDropDownList(), ShowNewGrfVehicleError(), StartupOneEngine(), StartWindowDrag(), StartWindowSizing(), TownActionBuildStatue(), SettingEntry::UpdateFilterState(), SettingsPage::UpdateFilterState(), LinkGraphLegendWindow::UpdateOverlayCompanies(), BaseGraphWindow::UpdateStatistics(), ViewportAddSignStrings(), ViewportAddStationStrings(), ViewportAddTownStrings(), and WaypointWindow::WaypointWindow().
template<typename Timpl , typename Tvalue_type , typename Tstorage , Tstorage Tmask = std::numeric_limits<Tstorage>::max()>
constexpr bool BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test |
( |
Tvalue_type |
value | ) |
const |
|
inlineconstexpr |
Test if the value-th bit is set.
- Parameters
-
- Returns
- true iff the requested bit is set.
Definition at line 131 of file base_bitset_type.hpp.
Referenced by AddAcceptedCargoOfHouse(), AddArticulatedParts(), AddEngineReplacement(), NewGRFWindow::AddGRFToActive(), AfterLoadGame(), AfterLoadGRFs(), AircraftVehicleChangeInfo(), AirportMaintenanceCost(), AnimateNewObjectTile(), AppendCopyableBadgeList(), NWidgetHorizontal::AssignSizePosition(), NWidgetVertical::AssignSizePosition(), BuildObject(), RefitWindow::BuildRefitList(), BuildReplacementVehicle(), BuildStationPart(), BuildTownHouse(), CalcEngineReliability(), CalculateRefitMasks(), CanVehicleUseStation(), CargoSpecClassSorter(), CcRoadStop(), ChangeIndustryProduction(), ChangeTownRating(), IntSettingDesc::ChangeValue(), ChangeVehicleNews(), CheckAutoreplaceValidity(), CheckBridgeAvailability(), CheckFlatLandRailStation(), CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), CheckIfCanLevelIndustryPlatform(), CheckIfIndustryTilesAreFree(), CheckIfIndustryTileSlopes(), CheckIndustryCloseDownProtection(), CheckMinActiveClients(), CheckOrders(), CheckPauseHelper(), CheckPauseOnJoin(), CheckSoftLimit(), PoolBase::Clean(), ClearTile_Station(), ClearTile_Town(), ClearTile_TunnelBridge(), ClearTownHouse(), 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(), CmdOpenCloseAirport(), CmdOrderRefit(), CmdPause(), CmdPlaceHouse(), 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(), Train::ConsistChanged(), CopyHeadSpecificThings(), NetworkAuthenticationServerHandler::Create(), CreateNewIndustryHelper(), DecloneOrder(), DecodeSingleSprite(), Engine::DetermineCapacity(), Disaster_CoalMine_Init(), Disaster_Helicopter_Init(), DispatchLeftClickEvent(), DispatchRightClickEvent(), CommandHelper< Tcmd, Tret(*)(DoCommandFlags, Targs...), true >::Do(), DoBuildLock(), DoClearBridge(), DoClearTunnel(), DoCreateNewIndustry(), TarScanner::DoScan(), NWidgetViewport::Draw(), NWidgetScrollbar::Draw(), NWidgetLeaf::Draw(), BaseSettingEntry::Draw(), SettingsPage::Draw(), TownAuthorityWindow::DrawActions(), DrawBadgeNameList(), DrawEngineList(), DrawFrameRect(), DrawHouseInGUI(), DrawNewHouseTileInGUI(), DrawNewObjectTileInGUI(), TownAuthorityWindow::DrawRatings(), DrawRoadDepotSprite(), DrawRoadStopTile(), SettingEntry::DrawSetting(), DrawStationTile(), DrawTile_Road(), DrawTileLayout(), GraphLegendWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), BuildObjectWindow::DrawWidget(), StatusBarWindow::DrawWidget(), TownDirectoryWindow::DrawWidget(), Window::DrawWidgets(), ErrorUnknownCallbackResult(), FillGRFDetails(), GUIList< T, P, F >::Filter(), FinaliseEngineArray(), FindNearestHangar(), FixTTOEngines(), GetAllCargoSuffixes(), GetArticulatedRefitMasks(), GetBadgeSprite(), GetBestFittingSubType(), GetCapacityOfArticulatedParts(), GetCargoSubtypeText(), GetCargoSuffix(), GetCargoSuffix(), GetCargoTypesOfArticulatedParts(), GetCompanyRailTypes(), GetCompanyRoadTypes(), GetEngineLiveryScheme(), GUIList< T, P, F >::GetFiltering(), GetFoundation_Town(), BuildHouseWindow::GetHouseInformation(), GetIfStopIsForType(), GetIndustryGamePlayProbability(), GetIndustryProbabilityCallback(), GUIList< T, P, F >::GetListing(), GetLoadAmount(), GetMaskOfTownActions(), Train::GetOrderStationLocation(), NewGRFWindow::GetPalette(), GetPreviewCompany(), GetProducedCargoOfHouse(), GetRailTypes(), GetRoadTypes(), GetScaledIndustryGenerationProbability(), GetSettingsDesc(), GetTownRoadType(), GetTownRoadTypeFirstIntroductionDate(), SettingDesc::GetType(), IntSettingDesc::GetValueParams(), IndustriesScopeResolver::GetVariable(), GetVehicleCannotUseStationReason(), HandleAutoscroll(), HandleBankruptcyTakeover(), HandleScrollbarScrolling(), HandleWindowDragging(), HasRailCatenary(), HasRoadCatenary(), HasRoadTypeAvail(), HeightMapCoastLines(), HeightMapSmoothCoasts(), IConsoleGetSetting(), IndustryProductionCallback(), IndustryTemporarilyRefusesCargo(), IniSaveSettings(), InitRailTypes(), InitRoadTypes(), CommandHelperBase::InternalDoAfter(), CommandHelperBase::InternalExecutePrepTest(), CommandHelperBase::InternalExecuteProcessResult(), CommandHelperBase::InternalExecuteValidateTestAndPrepExec(), CommandHelperBase::InternalPostBefore(), IsArticulatedEngine(), IsArticulatedVehicleRefittable(), GUIList< T, P, F >::IsDescSortOrder(), NWidgetCore::IsDisabled(), SettingDesc::IsEditable(), Engine::IsEnabled(), IsEngineBuildable(), IsEngineRefittable(), ObjectSpec::IsEverAvailable(), SpecializedStation< T, Tis_waypoint >::IsExpected(), BaseSettingEntry::IsFiltered(), GUIList< T, P, F >::IsFilterEnabled(), IsGoodGRFConfigList(), Engine::IsHidden(), NWidgetCore::IsHighlighted(), IsLoggableGrfConfig(), NWidgetCore::IsLowered(), IndustrySpec::IsProcessingIndustry(), IsRoadStopAvailable(), Waypoint::IsSingleTile(), IsStationAvailable(), IsTileForestIndustry(), PATSChunkHandler::Load(), LoadNewGRF(), LoadNewGRFFile(), LoadSettings(), IntSettingDesc::MakeValueValid(), MaybeBringWindowToFront(), MaybeCrashAirplane(), GUIList< T, P, F >::NeedRebuild(), NetworkHandlePauseChange(), NewVehicleAvailable(), ReplaceVehicleWindow::OnClick(), BuildVehicleWindow::OnClick(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), VehicleGroupWindow::OnClick(), NetworkStartServerWindow::OnClick(), NewGRFWindow::OnClick(), BuildRoadStationWindow::OnClick(), ScriptDebugWindow::OnClick(), GameSettingsWindow::OnClick(), TownAuthorityWindow::OnClick(), GenerateLandscapeWindow::OnInvalidateData(), NewGRFWindow::OnInvalidateData(), PickerWindow::OnInvalidateData(), ScriptDebugWindow::OnInvalidateData(), TownAuthorityWindow::OnInvalidateData(), BuildHouseWindow::OnInvalidateData(), VehicleGroupWindow::OnPaint(), StationViewWindow::OnPaint(), TownAuthorityWindow::OnPaint(), SelectGameWindow::OnResize(), GameOptionsWindow::OnResize(), OpenGLSprite::OpenGLSprite(), ParamSet(), PlayVehicleSound(), Window::ProcessHighlightedInvalidations(), Rail90DegTurnDisallowed(), RailNoLevelCrossings(), RailVehicleChangeInfo(), ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND(), NetworkGameSocketHandler::ReceiveCommand(), RefitVehicle(), RelocateAllWindows(), RemoveAirport(), RemoveBuoy(), RemoveDock(), RemoveEngineReplacement(), RemoveFromRailBaseStation(), RemoveGenericRoadStop(), RemoveLock(), RemoveRailStation(), RemoveRoad(), RemoveRoadStop(), RemoveRoadWaypointStop(), ReplaceChain(), ReplaceFreeUnit(), StationResolverObject::ResolveReal(), RoadNoLevelCrossing(), RoadVehicleChangeInfo(), SendAllVehiclesToDepot(), Vehicle::SendToDepot(), SettingEntry::SetButtons(), LinkGraphLegendWindow::SetOverlay(), SetSettingValue(), SetSettingValue(), ReplaceVehicleWindow::SetStringParameters(), GenerateLandscapeWindow::SetStringParameters(), NWidgetHorizontal::SetupSmallestSize(), NWidgetVertical::SetupSmallestSize(), SetYearEngineAgingStops(), ShipVehicleChangeInfo(), ShowMissingContentWindow(), ShowNewGrfVehicleError(), GUIList< T, P, F >::Sort(), StartupOneEngine(), StateGameLoop_LinkGraphPauseControl(), StationHandleBigTick(), TestAutoslopeOnRailTile(), TileLoop_Town(), ToolbarOptionsClick(), TownActionAdvertiseLarge(), TownActionAdvertiseMedium(), TownActionAdvertiseSmall(), TownActionBribe(), TownActionBuildStatue(), TownActionBuyRights(), TownActionFundBuildings(), TownActionRoadRebuild(), TownCanGrowRoad(), TownDirectoryWindow::TownRatingSorter(), TriggerIndustryProduction(), TryBuildTownHouse(), Train::UpdateDeltaXY(), UpdateHousesAndTowns(), UpdateObjectColours(), Station::UpdateVirtCoord(), Vehicle::UpdateVisualEffect(), StationViewWindow::UpdateWidgetSize(), UsedBadgeClasses::UsedBadgeClasses(), VehicleLengthChanged(), StringData::Version(), and ViewportAddString().