OpenTTD Source 20260711-master-g3fb3006dff
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 class  Currency : uint8_t {
  GBP , USD , EUR , JPY ,
  ATS , BEF , CHF , CZK ,
  DEM , DKK , ESP , FIM ,
  FRF , GRD , HUF , ISK ,
  ITL , NLG , NOK , PLN ,
  RON , RUR , SIT , SEK ,
  YTL , SKK , BRL , EEK ,
  LTL , KRW , ZAR , Custom ,
  GEL , IRR , RUB , MXN ,
  NTD , CNY , HKD , INR ,
  IDR , MYR , LVL , PTE ,
  UAH , VND , 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 77 of file currency_type.h.

◆ CurrencySymbolPositions

Bitmask of CurrencySymbolPosition.

Definition at line 86 of file currency_type.h.

Enumeration Type Documentation

◆ Currency

enum class Currency : uint8_t
strong

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
GBP 

British Pound.

USD 

US Dollar.

EUR 

Euro.

JPY 

Japanese Yen.

ATS 

Austrian Schilling.

BEF 

Belgian Franc.

CHF 

Swiss Franc.

CZK 

Czech Koruna.

DEM 

Deutsche Mark.

DKK 

Danish Krona.

ESP 

Spanish Peseta.

FIM 

Finish Markka.

FRF 

French Franc.

GRD 

Greek Drachma.

HUF 

Hungarian Forint.

ISK 

Icelandic Krona.

ITL 

Italian Lira.

NLG 

Dutch Gulden.

NOK 

Norwegian Krone.

PLN 

Polish Zloty.

RON 

Romanian Leu.

RUR 

Russian Rouble.

SIT 

Slovenian Tolar.

SEK 

Swedish Krona.

YTL 

Turkish Lira.

SKK 

Slovak Kornuna.

BRL 

Brazilian Real.

EEK 

Estonian Krooni.

LTL 

Lithuanian Litas.

KRW 

South Korean Won.

ZAR 

South African Rand.

Custom 

Custom currency.

GEL 

Georgian Lari.

IRR 

Iranian Rial.

RUB 

New Russian Ruble.

MXN 

Mexican Peso.

NTD 

New Taiwan Dollar.

CNY 

Chinese Renminbi.

HKD 

Hong Kong Dollar.

INR 

Indian Rupee.

IDR 

Indonesian Rupiah.

MYR 

Malaysian Ringgit.

LVL 

Latvian Lats.

PTE 

Portuguese Escudo.

UAH 

Ukrainian Hryvnia.

VND 

Vietnamese Dong.

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 80 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().