OpenTTD Source 20241224-master-gee860a5c8e
CYapfRailNodeT< Tkey_ > Struct Template Reference

Yapf Node for rail YAPF. More...

#include <yapf_node_rail.hpp>

Inheritance diagram for CYapfRailNodeT< Tkey_ >:
CYapfNodeT< Tkey_, CYapfRailNodeT< Tkey_ > >

Public Types

typedef CYapfNodeT< Tkey_, CYapfRailNodeT< Tkey_ > > base
 
typedef CYapfRailSegment CachedData
 
- Public Types inherited from CYapfNodeT< Tkey_, CYapfRailNodeT< Tkey_ > >
typedef Tkey_ Key
 
typedef CYapfRailNodeT< Tkey_ > Node
 

Public Member Functions

void Set (CYapfRailNodeT *parent, TileIndex tile, Trackdir td, bool is_choice)
 
TileIndex GetLastTile () const
 
Trackdir GetLastTrackdir () const
 
void SetLastTileTrackdir (TileIndex tile, Trackdir td)
 
template<class Tbase , class Tfunc , class Tpf >
bool IterateTiles (const Train *v, Tpf &yapf, Tbase &obj, bool(Tfunc::*func)(TileIndex, Trackdir)) const
 
void Dump (DumpTarget &dmp) const
 
- Public Member Functions inherited from CYapfNodeT< Tkey_, CYapfRailNodeT< Tkey_ > >
void Set (Node *parent, TileIndex tile, Trackdir td, bool is_choice)
 
NodeGetHashNext ()
 
void SetHashNext (Node *pNext)
 
TileIndex GetTile () const
 
Trackdir GetTrackdir () const
 
const Tkey_ & GetKey () const
 
int GetCost () const
 
int GetCostEstimate () const
 
bool GetIsChoice () const
 
bool operator< (const Node &other) const
 
void Dump (DumpTarget &dmp) const
 

Data Fields

CYapfRailSegmentsegment
 
uint16_t num_signals_passed
 
union { 
 
   uint32_t   inherited_flags 
 
   struct { 
 
      bool   target_seen 
 
      bool   choice_seen 
 
      bool   last_signal_was_red 
 
   }   flags_s 
 
flags_u 
 
SignalType last_red_signal_type
 
SignalType last_signal_type
 
- Data Fields inherited from CYapfNodeT< Tkey_, CYapfRailNodeT< Tkey_ > >
Tkey_ key
 
Nodehash_next
 
Nodeparent
 
int cost
 
int estimate
 
bool is_choice
 

Detailed Description

template<class Tkey_>
struct CYapfRailNodeT< Tkey_ >

Yapf Node for rail YAPF.

Definition at line 116 of file yapf_node_rail.hpp.

Member Typedef Documentation

◆ base

template<class Tkey_ >
typedef CYapfNodeT<Tkey_, CYapfRailNodeT<Tkey_> > CYapfRailNodeT< Tkey_ >::base

Definition at line 119 of file yapf_node_rail.hpp.

◆ CachedData

template<class Tkey_ >
typedef CYapfRailSegment CYapfRailNodeT< Tkey_ >::CachedData

Definition at line 120 of file yapf_node_rail.hpp.

Member Function Documentation

◆ Dump()

template<class Tkey_ >
void CYapfRailNodeT< Tkey_ >::Dump ( DumpTarget dmp) const
inline

Definition at line 201 of file yapf_node_rail.hpp.

◆ GetLastTile()

template<class Tkey_ >
TileIndex CYapfRailNodeT< Tkey_ >::GetLastTile ( ) const
inline

Definition at line 163 of file yapf_node_rail.hpp.

◆ GetLastTrackdir()

template<class Tkey_ >
Trackdir CYapfRailNodeT< Tkey_ >::GetLastTrackdir ( ) const
inline

Definition at line 169 of file yapf_node_rail.hpp.

◆ IterateTiles()

template<class Tkey_ >
template<class Tbase , class Tfunc , class Tpf >
bool CYapfRailNodeT< Tkey_ >::IterateTiles ( const Train v,
Tpf &  yapf,
Tbase &  obj,
bool(Tfunc::*)(TileIndex, Trackdir func 
) const
inline

Definition at line 183 of file yapf_node_rail.hpp.

◆ Set()

template<class Tkey_ >
void CYapfRailNodeT< Tkey_ >::Set ( CYapfRailNodeT< Tkey_ > *  parent,
TileIndex  tile,
Trackdir  td,
bool  is_choice 
)
inline

Definition at line 135 of file yapf_node_rail.hpp.

◆ SetLastTileTrackdir()

template<class Tkey_ >
void CYapfRailNodeT< Tkey_ >::SetLastTileTrackdir ( TileIndex  tile,
Trackdir  td 
)
inline

Definition at line 175 of file yapf_node_rail.hpp.

Field Documentation

◆ choice_seen

template<class Tkey_ >
bool CYapfRailNodeT< Tkey_ >::choice_seen

Definition at line 128 of file yapf_node_rail.hpp.

◆ inherited_flags

template<class Tkey_ >
uint32_t CYapfRailNodeT< Tkey_ >::inherited_flags

Definition at line 125 of file yapf_node_rail.hpp.

◆ last_red_signal_type

template<class Tkey_ >
SignalType CYapfRailNodeT< Tkey_ >::last_red_signal_type

Definition at line 132 of file yapf_node_rail.hpp.

◆ last_signal_type

template<class Tkey_ >
SignalType CYapfRailNodeT< Tkey_ >::last_signal_type

Definition at line 133 of file yapf_node_rail.hpp.

◆ last_signal_was_red

template<class Tkey_ >
bool CYapfRailNodeT< Tkey_ >::last_signal_was_red

Definition at line 129 of file yapf_node_rail.hpp.

◆ num_signals_passed

template<class Tkey_ >
uint16_t CYapfRailNodeT< Tkey_ >::num_signals_passed

Definition at line 123 of file yapf_node_rail.hpp.

◆ segment

template<class Tkey_ >
CYapfRailSegment* CYapfRailNodeT< Tkey_ >::segment

Definition at line 122 of file yapf_node_rail.hpp.

◆ target_seen

template<class Tkey_ >
bool CYapfRailNodeT< Tkey_ >::target_seen

Definition at line 127 of file yapf_node_rail.hpp.


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