# yapf_node_road.hpp

Go to the documentation of this file.

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