# NewGRFClass< Tspec, Tid, Tmax > Struct Template Reference

Struct containing information relating to NewGRF classes for stations and airports. More...

`#include <newgrf_class.h>`

## Static Public Member Functions
static void | Reset ()
static void | InsertDefaults ()
| Initialise the defaults.
static Tid | Allocate (uint32 global_id)
static void | SetName (Tid cls_id, StringID name)
static void | Assign (Tspec *spec)
static StringID | GetName (Tid cls_id)
static uint | GetCount ()
static uint | GetCount (Tid cls_id)
static const Tspec * | Get (Tid cls_id, uint index)
static const Tspec * | GetByGrf (uint32 grfid, byte local_id, int *index)
## Data Fields
uint32 | global_id
| Global ID for class, e.g. 'DFLT', 'WAYP', etc.
StringID | name
| Name of this class.
uint | count
| Number of stations in this class.
Tspec ** | spec
| Array of station specifications.
## Static Public Attributes
static NewGRFClass< Tspec, Tid, Tmax > | classes [Tmax]
| The actual classes.

## Detailed Description

### template<typename Tspec, typename Tid, Tid Tmax>
struct NewGRFClass< Tspec, Tid, Tmax >

Struct containing information relating to NewGRF classes for stations and airports.

Definition at line 21 of file newgrf_class.h.

## Member Function Documentation

template<typename Tspec , typename Tid , Tid Tmax>

void NewGRFClass< Tspec, Tid, Tmax >::InsertDefaults | ( |  | ) | `[inline, static]`

Initialise the defaults.

Reset airport classes to their default state.

This includes initialising the defaults classes with an empty entry, for standard airports.

Definition at line 27 of file newgrf_airport.cpp.

## Field Documentation

template<typename Tspec, typename Tid, Tid Tmax>

NewGRFClass< Tspec, Tid, Tmax > NewGRFClass< Tspec, Tid, Tmax >::classes`[inline, static]`

The actual classes.

Instantiate the array.

Definition at line 28 of file newgrf_class.h.

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

- src/newgrf_class.h
- src/newgrf_airport.cpp
- src/newgrf_class_func.h
- src/newgrf_object.cpp
- src/newgrf_station.cpp