OpenTTD Source 20250918-master-g2d13bcb7b9
CYapfRailNode Struct Reference

Yapf Node for rail YAPF. More...

#include <yapf_node_rail.hpp>

Inheritance diagram for CYapfRailNode:
CYapfNodeT< CYapfNodeKeyTrackDir, CYapfRailNode >

Public Types

typedef CYapfNodeT< CYapfNodeKeyTrackDir, CYapfRailNodebase
 
typedef CYapfRailSegment CachedData
 
- Public Types inherited from CYapfNodeT< CYapfNodeKeyTrackDir, CYapfRailNode >
typedef CYapfNodeKeyTrackDir Key
 
typedef CYapfRailNode Node
 

Public Member Functions

void Set (CYapfRailNode *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< CYapfNodeKeyTrackDir, CYapfRailNode >
void Set (Node *parent, TileIndex tile, Trackdir td, bool is_choice)
 
NodeGetHashNext ()
 
void SetHashNext (Node *pNext)
 
TileIndex GetTile () const
 
Trackdir GetTrackdir () const
 
const CYapfNodeKeyTrackDirGetKey () 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< CYapfNodeKeyTrackDir, CYapfRailNode >
CYapfNodeKeyTrackDir key
 
Nodehash_next
 
Nodeparent
 
int cost
 
int estimate
 
bool is_choice
 

Detailed Description

Yapf Node for rail YAPF.

Definition at line 113 of file yapf_node_rail.hpp.

Member Typedef Documentation

◆ base

◆ CachedData

Member Function Documentation

◆ Dump()

void CYapfRailNode::Dump ( DumpTarget dmp) const
inline

Definition at line 196 of file yapf_node_rail.hpp.

◆ GetLastTile()

TileIndex CYapfRailNode::GetLastTile ( ) const
inline

Definition at line 158 of file yapf_node_rail.hpp.

◆ GetLastTrackdir()

Trackdir CYapfRailNode::GetLastTrackdir ( ) const
inline

Definition at line 164 of file yapf_node_rail.hpp.

◆ IterateTiles()

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

Definition at line 178 of file yapf_node_rail.hpp.

◆ Set()

void CYapfRailNode::Set ( CYapfRailNode parent,
TileIndex  tile,
Trackdir  td,
bool  is_choice 
)
inline

Definition at line 130 of file yapf_node_rail.hpp.

◆ SetLastTileTrackdir()

void CYapfRailNode::SetLastTileTrackdir ( TileIndex  tile,
Trackdir  td 
)
inline

Definition at line 170 of file yapf_node_rail.hpp.

Field Documentation

◆ choice_seen

bool CYapfRailNode::choice_seen

Definition at line 123 of file yapf_node_rail.hpp.

◆ inherited_flags

uint32_t CYapfRailNode::inherited_flags

Definition at line 120 of file yapf_node_rail.hpp.

◆ last_red_signal_type

SignalType CYapfRailNode::last_red_signal_type

Definition at line 127 of file yapf_node_rail.hpp.

◆ last_signal_type

SignalType CYapfRailNode::last_signal_type

Definition at line 128 of file yapf_node_rail.hpp.

◆ last_signal_was_red

bool CYapfRailNode::last_signal_was_red

Definition at line 124 of file yapf_node_rail.hpp.

◆ num_signals_passed

uint16_t CYapfRailNode::num_signals_passed

Definition at line 118 of file yapf_node_rail.hpp.

◆ segment

CYapfRailSegment* CYapfRailNode::segment

Definition at line 117 of file yapf_node_rail.hpp.

◆ target_seen

bool CYapfRailNode::target_seen

Definition at line 122 of file yapf_node_rail.hpp.


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