# yapf_node_road.hpp

Go to the documentation of this file.

    00001 /* $Id: yapf_node_road.hpp 15609 2009-03-04 08:02:16Z peter1138 $ */
    00002
    00005 #ifndef  YAPF_NODE_ROAD_HPP
    00006 #define  YAPF_NODE_ROAD_HPP
    00007
    00009 template <class Tkey_>
    00010 struct CYapfRoadNodeT
    00011   : CYapfNodeT<Tkey_, CYapfRoadNodeT<Tkey_> >
    00012 {
    00013   typedef CYapfNodeT<Tkey_, CYapfRoadNodeT<Tkey_> > base;
    00014
    00015   TileIndex       m_segment_last_tile;
    00016   Trackdir        m_segment_last_td;
    00017
    00018   void Set(CYapfRoadNodeT *parent, TileIndex tile, Trackdir td, bool is_choice)
    00019   {
    00020     base::Set(parent, tile, td, is_choice);
    00021     m_segment_last_tile = tile;
    00022     m_segment_last_td = td;
    00023   }
    00024 };
    00025
    00026 // now define two major node types (that differ by key type)
    00027 typedef CYapfRoadNodeT<CYapfNodeKeyExitDir>  CYapfRoadNodeExitDir;
    00028 typedef CYapfRoadNodeT<CYapfNodeKeyTrackDir> CYapfRoadNodeTrackDir;
    00029
    00030 // Default NodeList types
    00031 typedef CNodeList_HashTableT<CYapfRoadNodeExitDir , 8, 12> CRoadNodeListExitDir;
    00032 typedef CNodeList_HashTableT<CYapfRoadNodeTrackDir, 10, 14> CRoadNodeListTrackDir;
    00033
    00034 #endif /* YAPF_NODE_ROAD_HPP */