OpenTTD Source 20241224-master-gee860a5c8e
CYapfOriginTileTwoWayT< Types > Class Template Reference

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

#include <yapf_common.hpp>

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 tile, Trackdir td, TileIndex tiler=INVALID_TILE, Trackdir tdr=INVALID_TRACKDIR, int reverse_penalty=0)
 set origin (tiles, trackdirs, etc.)
 
void PfSetStartupNodes ()
 Called when YAPF needs to place origin nodes into open list.
 

Protected Member Functions

TpfYapf ()
 to access inherited path finder
 

Protected Attributes

TileIndex origin_tile
 first origin tile
 
Trackdir origin_td
 first origin trackdir
 
TileIndex reverse_tile
 second (reverse) origin tile
 
Trackdir reverse_td
 second (reverse) origin trackdir
 
int reverse_penalty
 penalty to be added for using the reverse origin
 

Detailed Description

template<class Types>
class CYapfOriginTileTwoWayT< Types >

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

Definition at line 59 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 64 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 63 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 62 of file yapf_common.hpp.

Member Function Documentation

◆ PfSetStartupNodes()

template<class Types >
void CYapfOriginTileTwoWayT< Types >::PfSetStartupNodes ( )
inline

Called when YAPF needs to place origin nodes into open list.

Definition at line 91 of file yapf_common.hpp.

References INVALID_TILE, INVALID_TRACKDIR, CYapfOriginTileTwoWayT< Types >::reverse_penalty, and CYapfOriginTileTwoWayT< Types >::Yapf().

◆ SetOrigin()

template<class Types >
void CYapfOriginTileTwoWayT< Types >::SetOrigin ( TileIndex  tile,
Trackdir  td,
TileIndex  tiler = INVALID_TILE,
Trackdir  tdr = INVALID_TRACKDIR,
int  reverse_penalty = 0 
)
inline

set origin (tiles, trackdirs, etc.)

Definition at line 81 of file yapf_common.hpp.

References CYapfOriginTileTwoWayT< Types >::reverse_penalty.

◆ Yapf()

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

to access inherited path finder

Definition at line 74 of file yapf_common.hpp.

Referenced by CYapfOriginTileTwoWayT< Types >::PfSetStartupNodes().

Field Documentation

◆ origin_td

template<class Types >
Trackdir CYapfOriginTileTwoWayT< Types >::origin_td
protected

first origin trackdir

Definition at line 68 of file yapf_common.hpp.

◆ origin_tile

template<class Types >
TileIndex CYapfOriginTileTwoWayT< Types >::origin_tile
protected

first origin tile

Definition at line 67 of file yapf_common.hpp.

◆ reverse_penalty

template<class Types >
int CYapfOriginTileTwoWayT< Types >::reverse_penalty
protected

penalty to be added for using the reverse origin

Definition at line 71 of file yapf_common.hpp.

Referenced by CYapfOriginTileTwoWayT< Types >::PfSetStartupNodes(), and CYapfOriginTileTwoWayT< Types >::SetOrigin().

◆ reverse_td

template<class Types >
Trackdir CYapfOriginTileTwoWayT< Types >::reverse_td
protected

second (reverse) origin trackdir

Definition at line 70 of file yapf_common.hpp.

◆ reverse_tile

template<class Types >
TileIndex CYapfOriginTileTwoWayT< Types >::reverse_tile
protected

second (reverse) origin tile

Definition at line 69 of file yapf_common.hpp.


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