# depot_base.h File Reference

Base for all depots (except hangars). More...

`#include "tile_type.h"`
`#include "depot_type.h"`
`#include "oldpool.h"`
`#include "town_type.h"`

Go to the source code of this file.

## Data Structures

struct | Depot

## Defines

#define | FOR_ALL_DEPOTS_FROM(d, start) for (d = GetDepot(start); d != NULL; d = (d->index + 1U < GetDepotPoolSize()) ? GetDepot(d->index + 1U) : NULL) if (d->IsValid())
#define | FOR_ALL_DEPOTS(d) FOR_ALL_DEPOTS_FROM(d, 0)

## Functions

static bool | IsValidDepotID (DepotID index)
Depot * | GetDepotByTile (TileIndex tile)
| Gets a depot from a tile.

## Detailed Description

Base for all depots (except hangars).

Definition in file depot_base.h.

## Function Documentation

Depot* GetDepotByTile | ( | TileIndex | tile | ) |

Gets a depot from a tile.

Returns:
  Returns the depot if the tile had a depot, else it returns NULL

Definition at line 21 of file depot.cpp.

References min().

Referenced by AIOrder::InsertOrder(), and YapfFindNearestRoadDepot().