OpenTTD Source 20260421-master-gc2fbc6fdeb
CYapfOriginTileTwoWayT< Types > Class Template Reference

YAPF origin provider base class - used when there are two tile/trackdir origins. More...

#include <yapf_common.hpp>

Inheritance diagram for CYapfOriginTileTwoWayT< Types >:
CYapfT< CYapfRail_TypesT< CYapfAnyDepotRail, CFollowTrackRail, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfT< CYapfRail_TypesT< CYapfAnyDepotRailNo90, CFollowTrackRailNo90, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRail, CFollowTrackFreeRail, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRailNo90, CFollowTrackFreeRailNo90, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfT< CYapfRail_TypesT< CYapfRail, CFollowTrackRail, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfT< CYapfRail_TypesT< CYapfRailNo90, CFollowTrackRailNo90, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfRailBase< CYapfRail_TypesT< CYapfAnyDepotRail, CFollowTrackRail, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfRailBase< CYapfRail_TypesT< CYapfAnyDepotRailNo90, CFollowTrackRailNo90, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfRailBase< CYapfRail_TypesT< CYapfAnySafeTileRail, CFollowTrackFreeRail, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfRailBase< CYapfRail_TypesT< CYapfAnySafeTileRailNo90, CFollowTrackFreeRailNo90, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfRailBase< CYapfRail_TypesT< CYapfRail, CFollowTrackRail, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfRailBase< CYapfRail_TypesT< CYapfRailNo90, CFollowTrackRailNo90, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfAnyDepotRail CYapfAnyDepotRailNo90 CYapfAnySafeTileRail CYapfAnySafeTileRailNo90 CYapfRail CYapfRailNo90

Public Types

typedef Types::Tpf Tpf
 the pathfinder class (derived from THIS class)
typedef Types::NodeList::Item Node
 this will be our node type
typedef Node::Key Key
 key to hash tables

Public Member Functions

void SetOrigin (TileIndex forward_tile, Trackdir forward_td, TileIndex reverse_tile=INVALID_TILE, Trackdir reverse_td=INVALID_TRACKDIR, int reverse_penalty=0)
 Set origin (tiles, trackdirs, etc.).

Protected Member Functions

TpfYapf ()
 Access the inherited path finder.

Detailed Description

template<class Types>
class CYapfOriginTileTwoWayT< Types >

YAPF origin provider base class - used when there are two tile/trackdir origins.

Definition at line 52 of file yapf_common.hpp.

Member Typedef Documentation

◆ Key

template<class Types>
typedef Node::Key CYapfOriginTileTwoWayT< Types >::Key

key to hash tables

Definition at line 56 of file yapf_common.hpp.

◆ Node

template<class Types>
typedef Types::NodeList::Item CYapfOriginTileTwoWayT< Types >::Node

this will be our node type

Definition at line 55 of file yapf_common.hpp.

◆ Tpf

template<class Types>
typedef Types::Tpf CYapfOriginTileTwoWayT< Types >::Tpf

the pathfinder class (derived from THIS class)

Definition at line 54 of file yapf_common.hpp.

Member Function Documentation

◆ SetOrigin()

template<class Types>
void CYapfOriginTileTwoWayT< Types >::SetOrigin ( TileIndex forward_tile,
Trackdir forward_td,
TileIndex reverse_tile = INVALID_TILE,
Trackdir reverse_td = INVALID_TRACKDIR,
int reverse_penalty = 0 )
inline

Set origin (tiles, trackdirs, etc.).

Parameters
forward_tileThe start tile when going forward.
forward_tdThe track direction when going forward.
reverse_tileThe start tile when going backward.
reverse_tdThe track direction when going backward.
reverse_penaltyThe penalty for reversing.

Definition at line 74 of file yapf_common.hpp.

References INVALID_TILE, INVALID_TRACKDIR, and Yapf().

◆ Yapf()

template<class Types>
Tpf & CYapfOriginTileTwoWayT< Types >::Yapf ( )
inlineprotected

Access the inherited path finder.

Returns
The current path finder.

Definition at line 60 of file yapf_common.hpp.

Referenced by SetOrigin().


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