OpenTTD Source 20260621-master-g720d10536d
currency_type.h File Reference

Types related to currencies. More...

Go to the source code of this file.

Data Structures

struct  CurrencySpec
 Specification of a currency. More...

Typedefs

using Currencies = EnumBitSet<Currency, uint64_t, CURRENCY_END>
 Bitmask of Currency.
using CurrencySymbolPositions = EnumBitSet<CurrencySymbolPosition, uint8_t>
 Bitmask of CurrencySymbolPosition.

Enumerations

enum  Currency : uint8_t {
  CURRENCY_GBP , CURRENCY_USD , CURRENCY_EUR , CURRENCY_JPY ,
  CURRENCY_ATS , CURRENCY_BEF , CURRENCY_CHF , CURRENCY_CZK ,
  CURRENCY_DEM , CURRENCY_DKK , CURRENCY_ESP , CURRENCY_FIM ,
  CURRENCY_FRF , CURRENCY_GRD , CURRENCY_HUF , CURRENCY_ISK ,
  CURRENCY_ITL , CURRENCY_NLG , CURRENCY_NOK , CURRENCY_PLN ,
  CURRENCY_RON , CURRENCY_RUR , CURRENCY_SIT , CURRENCY_SEK ,
  CURRENCY_YTL , CURRENCY_SKK , CURRENCY_BRL , CURRENCY_EEK ,
  CURRENCY_LTL , CURRENCY_KRW , CURRENCY_ZAR , CURRENCY_CUSTOM ,
  CURRENCY_GEL , CURRENCY_IRR , CURRENCY_RUB , CURRENCY_MXN ,
  CURRENCY_NTD , CURRENCY_CNY , CURRENCY_HKD , CURRENCY_INR ,
  CURRENCY_IDR , CURRENCY_MYR , CURRENCY_LVL , CURRENCY_PTE ,
  CURRENCY_UAH , CURRENCY_VND , CURRENCY_END
}
 This enum gives the currencies a unique id which must be maintained for savegame compatibility and in order to refer to them quickly, especially for referencing the custom one. More...
enum class  CurrencySymbolPosition : uint8_t { Prefix , Suffix }
 The currency symbol positions that we can show. More...

Variables

static constexpr TimerGameCalendar::Year CF_NOEURO {0}
 Currency never switches to the Euro (as far as known).
static constexpr TimerGameCalendar::Year CF_ISEURO {1}
 Currency is the Euro.
static constexpr TimerGameCalendar::Year MIN_EURO_YEAR {2000}
 The earliest year custom currencies may switch to the Euro.

Detailed Description

Types related to currencies.

Definition in file currency_type.h.

Typedef Documentation

◆ Currencies

Bitmask of Currency.

Definition at line 76 of file currency_type.h.

◆ CurrencySymbolPositions

Bitmask of CurrencySymbolPosition.

Definition at line 85 of file currency_type.h.

Enumeration Type Documentation

◆ Currency

enum Currency : uint8_t

This enum gives the currencies a unique id which must be maintained for savegame compatibility and in order to refer to them quickly, especially for referencing the custom one.

Enumerator
CURRENCY_GBP 

British Pound.

CURRENCY_USD 

US Dollar.

CURRENCY_EUR 

Euro.

CURRENCY_JPY 

Japanese Yen.

CURRENCY_ATS 

Austrian Schilling.

CURRENCY_BEF 

Belgian Franc.

CURRENCY_CHF 

Swiss Franc.

CURRENCY_CZK 

Czech Koruna.

CURRENCY_DEM 

Deutsche Mark.

CURRENCY_DKK 

Danish Krona.

CURRENCY_ESP 

Spanish Peseta.

CURRENCY_FIM 

Finish Markka.

CURRENCY_FRF 

French Franc.

CURRENCY_GRD 

Greek Drachma.

CURRENCY_HUF 

Hungarian Forint.

CURRENCY_ISK 

Icelandic Krona.

CURRENCY_ITL 

Italian Lira.

CURRENCY_NLG 

Dutch Gulden.

CURRENCY_NOK 

Norwegian Krone.

CURRENCY_PLN 

Polish Zloty.

CURRENCY_RON 

Romanian Leu.

CURRENCY_RUR 

Russian Rouble.

CURRENCY_SIT 

Slovenian Tolar.

CURRENCY_SEK 

Swedish Krona.

CURRENCY_YTL 

Turkish Lira.

CURRENCY_SKK 

Slovak Kornuna.

CURRENCY_BRL 

Brazilian Real.

CURRENCY_EEK 

Estonian Krooni.

CURRENCY_LTL 

Lithuanian Litas.

CURRENCY_KRW 

South Korean Won.

CURRENCY_ZAR 

South African Rand.

CURRENCY_CUSTOM 

Custom currency.

CURRENCY_GEL 

Georgian Lari.

CURRENCY_IRR 

Iranian Rial.

CURRENCY_RUB 

New Russian Ruble.

CURRENCY_MXN 

Mexican Peso.

CURRENCY_NTD 

New Taiwan Dollar.

CURRENCY_CNY 

Chinese Renminbi.

CURRENCY_HKD 

Hong Kong Dollar.

CURRENCY_INR 

Indian Rupee.

CURRENCY_IDR 

Indonesian Rupiah.

CURRENCY_MYR 

Malaysian Ringgit.

CURRENCY_LVL 

Latvian Lats.

CURRENCY_PTE 

Portuguese Escudo.

CURRENCY_UAH 

Ukrainian Hryvnia.

CURRENCY_VND 

Vietnamese Dong.

CURRENCY_END 

always the last item

Definition at line 25 of file currency_type.h.

◆ CurrencySymbolPosition

enum class CurrencySymbolPosition : uint8_t
strong

The currency symbol positions that we can show.

Enumerator
Prefix 

Show the prefix value.

Suffix 

Show the suffix value.

Definition at line 79 of file currency_type.h.

Variable Documentation

◆ CF_ISEURO

TimerGameCalendar::Year CF_ISEURO {1}
staticconstexpr

Currency is the Euro.

Definition at line 17 of file currency_type.h.

Referenced by GetMaskOfAllowedCurrencies().

◆ CF_NOEURO

TimerGameCalendar::Year CF_NOEURO {0}
staticconstexpr

◆ MIN_EURO_YEAR

TimerGameCalendar::Year MIN_EURO_YEAR {2000}
staticconstexpr

The earliest year custom currencies may switch to the Euro.

Definition at line 18 of file currency_type.h.

Referenced by CustomCurrencyWindow::OnClick(), and CustomCurrencyWindow::OnQueryTextFinished().