|
| template<typename enum_type> |
| constexpr std::underlying_type_t< enum_type > | to_underlying (enum_type e) |
| | Implementation of std::to_underlying (from C++23).
|
| template<typename enum_type, std::enable_if_t< is_enum_incrementable_v< enum_type >, bool > = true> |
| constexpr enum_type & | operator++ (enum_type &e) |
| | Prefix increment.
|
| template<typename enum_type, std::enable_if_t< is_enum_incrementable_v< enum_type >, bool > = true> |
| constexpr enum_type | operator++ (enum_type &e, int) |
| | Postfix increment, uses prefix increment.
|
| template<typename enum_type, std::enable_if_t< is_enum_incrementable_v< enum_type >, bool > = true> |
| constexpr enum_type & | operator-- (enum_type &e) |
| | Prefix decrement.
|
| template<typename enum_type, std::enable_if_t< is_enum_incrementable_v< enum_type >, bool > = true> |
| constexpr enum_type | operator-- (enum_type &e, int) |
| | Postfix decrement, uses prefix decrement.
|
| template<typename enum_type, std::enable_if_t< is_enum_sequential_v< enum_type >, bool > = true> |
| constexpr enum_type | operator+ (enum_type e, int offset) |
| | Add integer.
|
| template<typename enum_type, std::enable_if_t< is_enum_sequential_v< enum_type >, bool > = true> |
| constexpr enum_type & | operator+= (enum_type &e, int offset) |
| template<typename enum_type, std::enable_if_t< is_enum_sequential_v< enum_type >, bool > = true> |
| constexpr enum_type | operator- (enum_type e, int offset) |
| | Subtract integer.
|
| template<typename enum_type, std::enable_if_t< is_enum_sequential_v< enum_type >, bool > = true> |
| constexpr enum_type & | operator-= (enum_type &e, int offset) |
| template<typename enum_type, std::enable_if_t< is_enum_sequential_v< enum_type >, bool > = true> |
| constexpr auto | operator- (enum_type a, enum_type b) |
| | Distance of two enums.
|
| template<typename T, class = typename std::enable_if_t<std::is_enum_v<T>>> |
| constexpr bool | HasFlag (const T x, const T y) |
| | Checks if a value in a bitset enum is set.
|
| template<typename T, class = typename std::enable_if_t<std::is_enum_v<T>>> |
| constexpr void | ToggleFlag (T &x, const T y) |
| | Toggle a value in a bitset enum.
|
Type (helpers) for enums.
Definition in file enum_type.hpp.
template<typename enum_type>
| std::underlying_type_t< enum_type > to_underlying |
( |
enum_type | e | ) |
|
|
constexpr |
Implementation of std::to_underlying (from C++23).
- Parameters
-
| e | The enum to get the value of. |
- Returns
- The underlying value of the enum.
Definition at line 21 of file enum_type.hpp.
Referenced by AfterLoadGame(), AmbientSoundEffectCallback(), BadgeClassSaveConfigFeature(), CheckforTownRating(), CmdBuildBridge(), CmdBuildDock(), CmdBuildRoad(), CmdBuildTunnel(), CmdDoTownAction(), CmdModifyOrder(), CmdPlantTree(), ConvertTTDBasePrice(), DeserializeNetworkGameInfo(), TownAuthorityWindow::DrawActions(), NetworkContentListWindow::DrawDetails(), DrawOrderString(), DrawRoadBits(), DrawWaterDepot(), DrawWaterLock(), PerformanceRatingDetailWindow::DrawWidget(), TownAuthorityWindow::DrawWidget(), FixOwnerOfRailTrack(), GetBadgeClassConfiguration(), GetBridgeTooLowMessageForStationType(), GetGlobalVariable(), GetIndustryGamePlayProbability(), GetLockPartMinimalBridgeHeight(), GetMaxTreeSpriteSize(), GetNearbyTileInformation(), GetNumberOfIndustries(), GetScaledIndustryGenerationProbability(), GetShipDepotDirection(), GetSmallMapVegetationPixels(), OpenGLBackend::GetSpriteAlignment(), GetStationBridgeableTileInfo(), GetStationTileLayout(), GetTownActionCost(), GetTownRadiusGroup(), AirportTileScopeResolver::GetVariable(), HouseScopeResolver::GetVariable(), IndustriesScopeResolver::GetVariable(), IndustryTileScopeResolver::GetVariable(), ObjectScopeResolver::GetVariable(), RailTypeScopeResolver::GetVariable(), RoadStopScopeResolver::GetVariable(), RoadTypeScopeResolver::GetVariable(), TownScopeResolver::GetVariable(), GenerateLandscapeWindow::GetWidgetString(), GlobalVarChangeInfo(), IndustriesChangeInfo(), IsCommandAllowedWhilePaused(), IsInsideMM(), IsValidCommand(), LoadSpriteTables(), MakeLockTile(), MakePerformanceDetailPanels(), MakeRailDepot(), MakeRailNormal(), MakeRoadCrossing(), MakeRoadDepot(), MakeRoadNormal(), MakeShipDepot(), MakeStation(), MakeTree(), MakeTreeTypeButtons(), ViewportSign::MarkDirty(), MarkViewportDirty(), MoveBuoysToWaypoints(), MoveToNextNewsItem(), MoveToNextTickerItem(), CompanyStationsWindow::OnClick(), CreateScenarioWindow::OnClick(), GenerateLandscapeWindow::OnClick(), OrdersWindow::OnClick(), SpriteAlignerWindow::OnClick(), NetworkClientListWindow::OnClickClientAdmin(), NetworkClientListWindow::OnClickCompanyAdmin(), SpriteAlignerWindow::OnInvalidateData(), BuildRoadToolbarWindow::OnPlaceMouseUp(), OpenGLSprite::OpenGLSprite(), operator+(), operator++(), operator-(), operator-(), operator--(), OrdersWindow::OrderClick_FullLoad(), OrdersWindow::OrderClick_Service(), OrdersWindow::OrderClick_Unload(), OutputContentState(), ScaleByZoom(), ScaleByZoomLower(), ServerNetworkAdminSocketHandler::SendCmdLogging(), ServerNetworkAdminSocketHandler::SendCmdNames(), NetworkGameSocketHandler::SendCommand(), CombinedAuthenticationServerHandler::SendRequest(), ServerNetworkAdminSocketHandler::SendWelcome(), SerializeNetworkGameInfo(), SetAnimatedTileState(), SetClearGroundDensity(), Order::SetConditionComparator(), Order::SetConditionVariable(), SetHasSignals(), Order::SetLoadType(), SetRailGroundType(), SetRoadside(), SetRoadWaypointRoadside(), Order::SetStopLocation(), SetTileType(), SetTreeGroundDensity(), SetTreeGrowth(), Order::SetUnloadType(), CargoSpec::SetupCargoForClimate, SetupScreenshotViewport(), SetWaterClass(), SetWaterTileType(), ShowLastNewsMessage(), ShowNewspaper(), SndPlayScreenCoordFx(), NetworkContentListWindow::StateSorter(), TestVehicleBuildProbability(), TGPGetMaxHeight(), TriggerRoadStopRandomisation(), TriggerStationRandomisation(), UnScaleByZoom(), UnScaleByZoomLower(), UpdateTownRadius(), OrdersWindow::UpdateWidgetSize(), PerformanceRatingDetailWindow::UpdateWidgetSize(), TownAuthorityWindow::UpdateWidgetSize(), ValueStr(), ValueStr(), ValueStr(), and ValueStr().