OpenTTD: src/economy_base.h File Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Variables
economy_base.h File Reference

Base classes related to the economy. More...

`#include "cargopacket.h"`
`#include "company_type.h"`

Go to the source code of this file.

## Data Structures
struct | CargoPayment
| Helper class to perform the cargo payment. More...

## Macros
#define | FOR_ALL_CARGO_PAYMENTS_FROM(var, start) FOR_ALL_ITEMS_FROM(CargoPayment, cargo_payment_index, var, start)
| Iterate over all cargo payments from a given start position.
#define | FOR_ALL_CARGO_PAYMENTS(var) FOR_ALL_CARGO_PAYMENTS_FROM(var, 0)
| Iterate over all cargo payments.

## Typedefs
typedef Pool< CargoPayment, CargoPaymentID, 512, 0xFF000 > | CargoPaymentPool
| Type of pool to store cargo payments in; little over 1 million.

## Variables
CargoPaymentPool | _cargo_payment_pool
| The actual pool to store cargo payments in.

## Detailed Description

Base classes related to the economy.

Definition in file economy_base.h.

## Macro Definition Documentation

#define FOR_ALL_CARGO_PAYMENTS | ( |  | var | ) | FOR_ALL_CARGO_PAYMENTS_FROM(var, 0)

Iterate over all cargo payments.

Parameters

  var | The variable used for iterating.

Definition at line 63 of file economy_base.h.

Referenced by AfterLoadGame().

#define FOR_ALL_CARGO_PAYMENTS_FROM | ( |  | var,
|  |  | start
| ) |  | FOR_ALL_ITEMS_FROM(CargoPayment, cargo_payment_index, var, start)

Iterate over all cargo payments from a given start position.

Parameters

  var | The variable used for iterating.
  start | The start of the iteration.

Definition at line 57 of file economy_base.h.

## Typedef Documentation

typedef Pool<CargoPayment, CargoPaymentID, 512, 0xFF000> CargoPaymentPool

Type of pool to store cargo payments in; little over 1 million.

Definition at line 19 of file economy_base.h.

## Variable Documentation

CargoPaymentPool _cargo_payment_pool

The actual pool to store cargo payments in.