OpenTTD
CYapfReserveTrack< Types > Class Template Reference
Inheritance diagram for CYapfReserveTrack< Types >:
CYapfFollowAnySafeTileRailT< Types > CYapfFollowRailT< Types >

Public Types

typedef Types::Tpf Tpf
 the pathfinder class (derived from THIS class)
 
typedef Types::TrackFollower TrackFollower
 
typedef Types::NodeList::Titem Node
 this will be our node type
 

Public Member Functions

void SetReservationTarget (Node *node, TileIndex tile, Trackdir td)
 Set the target to where the reservation should be extended. More...
 
void FindSafePositionOnNode (Node *node)
 Check the node for a possible reservation target. More...
 
bool TryReservePath (PBSTileInfo *target, TileIndex origin)
 Try to reserve the path till the reservation target. More...
 

Protected Member Functions

Tpf & Yapf ()
 to access inherited pathfinder
 

Private Member Functions

bool FindSafePositionProc (TileIndex tile, Trackdir td)
 
bool ReserveRailStationPlatform (TileIndex &tile, DiagDirection dir)
 Reserve a railway platform. More...
 
bool ReserveSingleTrack (TileIndex tile, Trackdir td)
 Try to reserve a single track/platform. More...
 
bool UnreserveSingleTrack (TileIndex tile, Trackdir td)
 Unreserve a single track/platform. More...
 

Private Attributes

TileIndex m_res_dest
 The reservation target tile.
 
Trackdir m_res_dest_td
 The reservation target trackdir.
 
Node * m_res_node
 The reservation target node.
 
TileIndex m_res_fail_tile
 The tile where the reservation failed.
 
Trackdir m_res_fail_td
 The trackdir where the reservation failed.
 
TileIndex m_origin_tile
 Tile our reservation will originate from.
 

Detailed Description

template<class Types>
class CYapfReserveTrack< Types >

Definition at line 42 of file yapf_rail.cpp.

Member Function Documentation

◆ FindSafePositionOnNode()

template<class Types >
void CYapfReserveTrack< Types >::FindSafePositionOnNode ( Node *  node)
inline

Check the node for a possible reservation target.

Definition at line 139 of file yapf_rail.cpp.

◆ ReserveRailStationPlatform()

template<class Types >
bool CYapfReserveTrack< Types >::ReserveRailStationPlatform ( TileIndex &  tile,
DiagDirection  dir 
)
inlineprivate

◆ ReserveSingleTrack()

template<class Types >
bool CYapfReserveTrack< Types >::ReserveSingleTrack ( TileIndex  tile,
Trackdir  td 
)
inlineprivate

◆ SetReservationTarget()

template<class Types >
void CYapfReserveTrack< Types >::SetReservationTarget ( Node *  node,
TileIndex  tile,
Trackdir  td 
)
inline

Set the target to where the reservation should be extended.

Definition at line 131 of file yapf_rail.cpp.

◆ TryReservePath()

◆ UnreserveSingleTrack()

template<class Types >
bool CYapfReserveTrack< Types >::UnreserveSingleTrack ( TileIndex  tile,
Trackdir  td 
)
inlineprivate

The documentation for this class was generated from the following file: