YAPF origin provider for route links. More...
Public Member Functions | |
FORCEINLINE CargoID | GetCargoID () const |
Get the current cargo type. | |
FORCEINLINE byte | GetFlags () const |
Get the cargo routing flags. | |
void | SetOrigin (CargoID cid, TileIndex src, const StationList *stations, bool cargo_creation, OrderID order, byte flags) |
Set origin. | |
void | PfSetStartupNodes () |
Called when YAPF needs to place origin nodes into the open list. | |
Private Types | |
typedef Types::Tpf | Tpf |
The pathfinder class (derived from THIS class). | |
typedef Types::NodeList::Titem | Node |
This will be our node type. | |
Private Member Functions | |
FORCEINLINE Tpf & | Yapf () |
To access inherited path finder. | |
Private Attributes | |
CargoID | m_cid |
TileIndex | m_src |
OrderID | m_order |
byte | m_flags |
SmallVector< RouteLink, 2 > | m_origin |
YAPF origin provider for route links.
Definition at line 199 of file yapf_cargo.cpp.
FORCEINLINE CargoID CYapfOriginRouteLinkT< Types >::GetCargoID | ( | ) | const [inline] |
Get the current cargo type.
Definition at line 214 of file yapf_cargo.cpp.
FORCEINLINE byte CYapfOriginRouteLinkT< Types >::GetFlags | ( | ) | const [inline] |
Get the cargo routing flags.
Definition at line 220 of file yapf_cargo.cpp.
void CYapfOriginRouteLinkT< Types >::PfSetStartupNodes | ( | ) | [inline] |
Called when YAPF needs to place origin nodes into the open list.
Definition at line 246 of file yapf_cargo.cpp.
References SmallVector< T, S >::Begin(), DistanceSquare(), SmallVector< T, S >::End(), SpecializedStation< Station, false >::Get(), and CYapfOriginRouteLinkT< Types >::Yapf().
void CYapfOriginRouteLinkT< Types >::SetOrigin | ( | CargoID | cid, | |
TileIndex | src, | |||
const StationList * | stations, | |||
bool | cargo_creation, | |||
OrderID | order, | |||
byte | flags | |||
) | [inline] |
Set origin.
Definition at line 226 of file yapf_cargo.cpp.
References _settings_game, SmallVector< T, S >::Append(), SmallVector< T, S >::Begin(), SmallVector< T, S >::End(), INVALID_ORDER, GameSettings::order, and OrderSettings::selectgoods.
FORCEINLINE Tpf& CYapfOriginRouteLinkT< Types >::Yapf | ( | ) | [inline, private] |
To access inherited path finder.
Definition at line 210 of file yapf_cargo.cpp.
Referenced by CYapfOriginRouteLinkT< Types >::PfSetStartupNodes().