OpenTTD
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. More...
 
#define FOR_ALL_CARGO_PAYMENTS(var)   FOR_ALL_CARGO_PAYMENTS_FROM(var, 0)
 Iterate over all cargo payments. More...
 

Typedefs

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

Variables

CargoPaymentPool _cargo_payment_pool
 The actual pool to store cargo payments in. More...
 

Detailed Description

Base classes related to the economy.

Definition in file economy_base.h.

Macro Definition Documentation

◆ FOR_ALL_CARGO_PAYMENTS

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

Iterate over all cargo payments.

Parameters
varThe variable used for iterating.

Definition at line 63 of file economy_base.h.

◆ FOR_ALL_CARGO_PAYMENTS_FROM

#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
varThe variable used for iterating.
startThe start of the iteration.

Definition at line 57 of file economy_base.h.

Typedef Documentation

◆ CargoPaymentPool

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

◆ _cargo_payment_pool

CargoPaymentPool _cargo_payment_pool

The actual pool to store cargo payments in.