OpenTTD Source: src/league_base.h File Reference

OpenTTD Source 15.0-RC2

Data Structures | Typedefs | Functions | Variables
league_base.h File Reference

LeagueTable base class. More...

`#include "company_type.h"`
`#include "goal_type.h"`
`#include "league_type.h"`
`#include "core/pool_type.hpp"`
`#include "strings_type.h"`

Go to the source code of this file.

## Data Structures
struct | LeagueTableElement
| Struct about league table elements. More...
struct | LeagueTable
| Struct about custom league tables. More...

## Typedefs
using | LeagueTableElementPool = Pool< LeagueTableElement, LeagueTableElementID, 64 >
using | LeagueTablePool = Pool< LeagueTable, LeagueTableID, 4 >

## Functions
bool | IsValidLink (Link link)
| Checks whether a link is valid, i.e.

## Variables
LeagueTableElementPool | _league_table_element_pool
LeagueTablePool | _league_table_pool

## Detailed Description

LeagueTable base class.

Definition in file league_base.h.

## Typedef Documentation

## ◆ LeagueTableElementPool

using LeagueTableElementPool = Pool<LeagueTableElement, LeagueTableElementID, 64>

Definition at line 21 of file league_base.h.

## ◆ LeagueTablePool

using LeagueTablePool = Pool<LeagueTable, LeagueTableID, 4>

Definition at line 24 of file league_base.h.

## Function Documentation

## ◆ IsValidLink()

bool IsValidLink | ( | Link | link | ) |

Checks whether a link is valid, i.e.

has a valid target.

Parameters

  link | the link to check

Returns
  true iff the link is valid

Definition at line 34 of file league_cmd.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_story_page_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_industry_pool >::IsValidID(), IsValidTile(), LT_COMPANY, LT_INDUSTRY, LT_NONE, LT_STORY_PAGE, LT_TILE, and LT_TOWN.

Referenced by CmdCreateLeagueTableElement(), and CmdUpdateLeagueTableElementData().