OpenTTD Source: HistoryRange Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Data Fields
HistoryRange Struct Reference

## Public Member Functions
constexpr | HistoryRange (uint8_t periods)
constexpr | HistoryRange (const HistoryRange &hr, uint8_t division, uint8_t periods)

## Data Fields
const HistoryRange * | hr
const uint8_t | periods
| Number of periods for this range.
const uint8_t | records
| Number of records needed for this range.
const uint8_t | first
| Index of first element in history data.
const uint8_t | last
| Index of last element in history data.
const uint8_t | division
| Number of divisions of the previous history range.
const uint8_t | total_division
| Number of divisions of the initial history range.

## Detailed Description

Definition at line 13 of file history_type.hpp.

## Constructor & Destructor Documentation

## ◆ HistoryRange() [1/2]

constexpr HistoryRange::HistoryRange | ( | uint8_t | periods | ) |
| inlineexplicitconstexpr

Definition at line 22 of file history_type.hpp.

## ◆ HistoryRange() [2/2]

constexpr HistoryRange::HistoryRange | ( | const HistoryRange & | hr,
|  | uint8_t | division,
|  | uint8_t | periods
| ) |  |
| inlineconstexpr

Definition at line 27 of file history_type.hpp.

## Field Documentation

## ◆ division

const uint8_t HistoryRange::division

Number of divisions of the previous history range.

Definition at line 19 of file history_type.hpp.

Referenced by GetHistory(), IsValidHistory(), RotateHistory(), and UpdateValidHistory().

## ◆ first

const uint8_t HistoryRange::first

Index of first element in history data.

Definition at line 17 of file history_type.hpp.

Referenced by GetHistory(), IsValidHistory(), RotateHistory(), and UpdateValidHistory().

## ◆ hr

const HistoryRange* HistoryRange::hr

Definition at line 14 of file history_type.hpp.

## ◆ last

const uint8_t HistoryRange::last

Index of last element in history data.

Definition at line 18 of file history_type.hpp.

Referenced by RotateHistory(), and UpdateValidHistory().

## ◆ periods

const uint8_t HistoryRange::periods

Number of periods for this range.

Definition at line 15 of file history_type.hpp.

Referenced by GetHistory(), and IsValidHistory().

## ◆ records

const uint8_t HistoryRange::records

Number of records needed for this range.

Definition at line 16 of file history_type.hpp.

Referenced by UpdateValidHistory().

## ◆ total_division

const uint8_t HistoryRange::total_division

Number of divisions of the initial history range.

Definition at line 20 of file history_type.hpp.

Referenced by RotateHistory(), and UpdateValidHistory().

The documentation for this struct was generated from the following file:

- src/misc/history_type.hpp