OpenTTD Source: src/group_type.h File Reference

OpenTTD Source 15.3

Typedefs | Variables
group_type.h File Reference

Types of a group. More...

`#include "core/pool_type.hpp"`

Go to the source code of this file.

## Typedefs
using | GroupID = PoolID< uint16_t, struct GroupIDTag, 64000, 0xFFFF >

## Variables
static constexpr GroupID | NEW_GROUP {0xFFFC}
| Sentinel for a to-be-created group.
static constexpr GroupID | ALL_GROUP {0xFFFD}
| All vehicles are in this group.
static constexpr GroupID | DEFAULT_GROUP {0xFFFE}
| Ungrouped vehicles are in this group.
static const uint | MAX_LENGTH_GROUP_NAME_CHARS = 32
| The maximum length of a group name in characters including '\0'.

## Detailed Description

Types of a group.

Definition in file group_type.h.

## Typedef Documentation

## ◆ GroupID

using GroupID = PoolID<uint16_t, struct GroupIDTag, 64000, 0xFFFF>

Definition at line 15 of file group_type.h.

## Variable Documentation

## ◆ ALL_GROUP

constexpr GroupID ALL_GROUP {0xFFFD}
| staticconstexpr

All vehicles are in this group.

Definition at line 17 of file group_type.h.

Referenced by VehicleGroupWindow::ComputeGroupInfoSize(), VehicleGroupWindow::DrawWidget(), EngineReplacement(), GenerateVehicleSortList(), GroupStatistics::GetAllGroup(), ReplaceVehicleWindow::GetWidgetString(), InvalidateAutoreplaceWindow(), IsAllGroupID(), ERNWChunkHandler::Load(), NewVehicleAvailable(), ReplaceVehicleWindow::OnClick(), VehicleGroupWindow::OnClick(), VehicleListWindow::OnDropdownSelect(), VehicleGroupWindow::OnInvalidateData(), and VehicleGroupWindow::SelectGroup().

## ◆ DEFAULT_GROUP

constexpr GroupID DEFAULT_GROUP {0xFFFE}
| staticconstexpr

Ungrouped vehicles are in this group.

Definition at line 18 of file group_type.h.

Referenced by OrderBackup::ClearGroup(), CmdBuildRailVehicle(), CmdBuildRailWagon(), CmdMoveRailVehicle(), CmdRemoveAllVehiclesGroup(), BaseVehicleListWindow::DrawVehicleListItems(), BuildVehicleWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), EngineReplacement(), FormatString(), ReplaceVehicleWindow::GetWidgetString(), ERNWChunkHandler::Load(), VEHSChunkHandler::Load(), VehicleGroupWindow::OnClick(), VehicleGroupWindow::OnMouseDrag(), VehicleGroupWindow::SelectGroup(), UpdateTrainGroupID(), and Vehicle::Vehicle().

## ◆ MAX_LENGTH_GROUP_NAME_CHARS

const uint MAX_LENGTH_GROUP_NAME_CHARS = 32
| static

The maximum length of a group name in characters including '\0'.

Definition at line 20 of file group_type.h.

Referenced by CmdAlterGroup().

## ◆ NEW_GROUP

constexpr GroupID NEW_GROUP {0xFFFC}
| staticconstexpr

Sentinel for a to-be-created group.

Definition at line 16 of file group_type.h.

Referenced by CmdAddVehicleGroup(), VehicleGroupWindow::DrawGroupInfo(), VehicleGroupWindow::DrawWidget(), VehicleGroupWindow::OnDropdownSelect(), VehicleListWindow::OnDropdownSelect(), and VehicleGroupWindow::OnMouseDrag().