28 inline int CalcHash()
const 30 return m_exitdir | (m_tile << 2);
35 return m_tile == other.m_tile && m_exitdir == other.m_exitdir;
48 inline int CalcHash()
const 50 return m_td | (m_tile << 4);
55 return m_tile == other.m_tile && m_td == other.m_td;
60 template <
class Tkey_,
class Tnode>
75 m_hash_next =
nullptr;
79 m_is_choice = is_choice;
82 inline Node *GetHashNext()
87 inline void SetHashNext(Node *pNext)
102 inline const Tkey_& GetKey()
const 107 inline int GetCost()
const 112 inline int GetCostEstimate()
const 117 inline bool GetIsChoice()
const 122 inline bool operator<(
const Node &other)
const 124 return m_estimate < other.m_estimate;
132 dmp.
WriteLine(
"m_estimate = %d", m_estimate);
Trackdir
Enumeration for tracks and directions.
void CDECL WriteLine(const char *format,...) WARN_FORMAT(2
Write a line with indent at the beginning and <LF> at the end.
void WriteEnumT(const char *name, E e)
Dump given enum value (as a number and as named value)
void WriteTile(const char *name, TileIndex t)
Write name & TileIndex to the output.
Flag for an invalid DiagDirection.
static DiagDirection TrackdirToExitdir(Trackdir trackdir)
Maps a trackdir to the (4-way) direction the tile is exited when following that trackdir.
Flag for an invalid trackdir.
bool operator==(const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue1, Tcompare > &iter1, const MultiMapIterator< Tmap_iter2, Tlist_iter2, Tkey, Tvalue2, Tcompare > &iter2)
Compare two MultiMap iterators.
void WriteStructT(const char *name, const S *s)
Dump nested object (or only its name if this instance is already known).
uint32 TileIndex
The index/ID of a Tile.
Yapf Node Key that evaluates hash from (and compares) tile & exit dir.
DiagDirection
Enumeration for diagonal directions.
Class that represents the dump-into-string target.