OpenTTD Source 20260311-master-g511d3794ce
linkgraph_type.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef LINKGRAPH_TYPE_H
11#define LINKGRAPH_TYPE_H
12
13#include "../core/pool_type.hpp"
14
17
18typedef uint16_t NodeID;
19static const NodeID INVALID_NODE = UINT16_MAX;
20
24enum class DistributionType : uint8_t {
25 Min = 0,
26 Manual = 0,
30 Max = 2,
31};
32
52
53using EdgeUpdateModes = EnumBitSet<EdgeUpdateMode, uint8_t>;
54
55#endif /* LINKGRAPH_TYPE_H */
Enum-as-bit-set wrapper.
EdgeUpdateMode
Special modes for updating links.
@ Refresh
Refresh capacity.
@ Unrestricted
Use unrestricted link.
@ Increase
Increase capacity.
@ Restricted
Use restricted link.
DistributionType
Distribution types.
@ MaxNonSymmetric
Maximum non-symmetric distribution.
@ Asymmetric
Asymmetric distribution. Usually cargo will only travel in one direction.
@ Max
Maximal value of Distribution type.
@ Min
Minimal value of Distribution type.
@ Manual
Manual distribution. No link graph calculations are run.
@ Symmetric
Symmetric distribution. The same amount of cargo travels in each direction between each pair of nodes...
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Templated helper to make a PoolID a single POD value.
Definition pool_type.hpp:47