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< CYapfAnyDepotRail1, CFollowTrackT, CNodeList_HashTableT, CYapfDestinationAnyDepotRailT< Types >, CYapfFollowAnyDepotRailT< Types > > > CYapfT< CYapfRail_TypesT< CYapfAnyDepotRail2, CFollowTrackT, CNodeList_HashTableT, CYapfDestinationAnyDepotRailT< Types >, CYapfFollowAnyDepotRailT< Types > > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRail1, CFollowTrackT, CNodeList_HashTableT, CYapfDestinationAnySafeTileRailT< Types >, CYapfFollowAnySafeTileRailT< Types > > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRail2, CFollowTrackT, CNodeList_HashTableT, CYapfDestinationAnySafeTileRailT< Types >, CYapfFollowAnySafeTileRailT< Types > > > CYapfT< CYapfRail_TypesT< CYapfRail1, CFollowTrackT, CNodeList_HashTableT, CYapfDestinationTileOrStationRailT< Types >, CYapfFollowRailT< Types > > > CYapfT< CYapfRail_TypesT< CYapfRail2, CFollowTrackT, CNodeList_HashTableT, CYapfDestinationTileOrStationRailT< Types >, CYapfFollowRailT< Types > > >

Public Types

typedef Types::Tpf Tpf
 the pathfinder class (derived from THIS class)
typedef Types::NodeList::Titem 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, bool treat_first_red_two_way_signal_as_eol=true)
 set origin (tiles, trackdirs, etc.
void PfSetStartupNodes ()
 Called when YAPF needs to place origin nodes into open list.
FORCEINLINE bool TreatFirstRedTwoWaySignalAsEOL ()
 return true if first two-way signal should be treated as dead end

Protected Member Functions

FORCEINLINE TpfYapf ()
 to access inherited path finder

Protected Attributes

TileIndex m_orgTile
 first origin tile
Trackdir m_orgTd
 first origin trackdir
TileIndex m_revTile
 second (reversed) origin tile
Trackdir m_revTd
 second (reversed) origin trackdir
int m_reverse_penalty
 penalty to be added for using the reversed origin
bool m_treat_first_red_two_way_signal_as_eol
 in some cases (leaving station) we need to handle first two-way signal differently

Detailed Description

template<class Types>
class CYapfOriginTileTwoWayT< Types >

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

Definition at line 57 of file yapf_common.hpp.


Member Function Documentation

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


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

Generated on Thu Feb 4 17:20:54 2010 for OpenTTD by  doxygen 1.5.6