OpenTTD Source 20241224-master-gf74b0cf984
CYapfOriginTileT< Types > Class Template Reference

YAPF origin provider base class - used when origin is one tile / multiple trackdirs. 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, TrackdirBits trackdirs)
 Set origin tile / trackdir mask.
 
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
 origin tile
 
TrackdirBits origin_trackdirs
 origin trackdir mask
 

Detailed Description

template<class Types>
class CYapfOriginTileT< Types >

YAPF origin provider base class - used when origin is one tile / multiple trackdirs.

Definition at line 19 of file yapf_common.hpp.

Member Typedef Documentation

◆ Key

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

key to hash tables

Definition at line 24 of file yapf_common.hpp.

◆ Node

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

this will be our node type

Definition at line 23 of file yapf_common.hpp.

◆ Tpf

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

the pathfinder class (derived from THIS class)

Definition at line 22 of file yapf_common.hpp.

Member Function Documentation

◆ PfSetStartupNodes()

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

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

Definition at line 45 of file yapf_common.hpp.

References FindFirstBit(), KillFirstBit(), TRACKDIR_BIT_NONE, and CYapfOriginTileT< Types >::Yapf().

◆ SetOrigin()

template<class Types >
void CYapfOriginTileT< Types >::SetOrigin ( TileIndex  tile,
TrackdirBits  trackdirs 
)
inline

Set origin tile / trackdir mask.

Definition at line 38 of file yapf_common.hpp.

◆ Yapf()

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

to access inherited path finder

Definition at line 31 of file yapf_common.hpp.

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

Field Documentation

◆ origin_tile

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

origin tile

Definition at line 27 of file yapf_common.hpp.

◆ origin_trackdirs

template<class Types >
TrackdirBits CYapfOriginTileT< Types >::origin_trackdirs
protected

origin trackdir mask

Definition at line 28 of file yapf_common.hpp.


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