CYapfSegmentCostCacheGlobalT< Types > Class Template Reference

CYapfSegmentCostCacheGlobalT - the yapf cost cache provider that adds the segment cost caching functionality to yapf. More...

#include <yapf_costcache.hpp>

Inheritance diagram for CYapfSegmentCostCacheGlobalT< Types >:
CYapfSegmentCostCacheLocalT< Types > CYapfT< CYapfRail_TypesT< CYapfAnyDepotRail1, CFollowTrackRail, CRailNodeListTrackDir, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfT< CYapfRail_TypesT< CYapfAnyDepotRail2, CFollowTrackRailNo90, CRailNodeListTrackDir, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRail1, CFollowTrackFreeRail, CRailNodeListTrackDir, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRail2, CFollowTrackFreeRailNo90, CRailNodeListTrackDir, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfT< CYapfRail_TypesT< CYapfRail1, CFollowTrackRail, CRailNodeListTrackDir, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfT< CYapfRail_TypesT< CYapfRail2, CFollowTrackRailNo90, CRailNodeListTrackDir, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfAnyDepotRail1 CYapfAnyDepotRail2 CYapfAnySafeTileRail1 CYapfAnySafeTileRail2 CYapfRail1 CYapfRail2

Public Types

typedef
CYapfSegmentCostCacheLocalT
< Types > 
Tlocal
typedef Types::Tpf Tpf
 the pathfinder class (derived from THIS class)
typedef Types::NodeList::Titem Node
 this will be our node type
typedef Node::Key Key
 key to hash tables
typedef Node::CachedData CachedData
typedef CachedData::Key CacheKey
typedef CSegmentCostCacheT
< CachedData > 
Cache

Public Member Functions

FORCEINLINE bool PfNodeCacheFetch (Node &n)
 Called by YAPF to attach cached or local segment cost data to the given node.
FORCEINLINE void PfNodeCacheFlush (Node &n)
 Called by YAPF to flush the cached segment cost data back into cache storage.

Protected Member Functions

FORCEINLINE TpfYapf ()
 to access inherited path finder

Static Protected Member Functions

static FORCEINLINE CachestGetGlobalCache ()

Protected Attributes

Cachem_global_cache

Detailed Description

template<class Types>
class CYapfSegmentCostCacheGlobalT< Types >

CYapfSegmentCostCacheGlobalT - the yapf cost cache provider that adds the segment cost caching functionality to yapf.

Using this class as base of your will provide the global segment cost caching services for your Nodes.

Definition at line 165 of file yapf_costcache.hpp.


Member Function Documentation

template<class Types >
FORCEINLINE bool CYapfSegmentCostCacheGlobalT< Types >::PfNodeCacheFetch ( Node n  )  [inline]

Called by YAPF to attach cached or local segment cost data to the given node.

Returns:
true if globally cached data were used or false if local data was used

Reimplemented from CYapfSegmentCostCacheLocalT< Types >.

Definition at line 214 of file yapf_costcache.hpp.

References CYapfSegmentCostCacheLocalT< Types >::PfNodeCacheFetch(), and CYapfSegmentCostCacheGlobalT< Types >::Yapf().

template<class Types >
FORCEINLINE void CYapfSegmentCostCacheGlobalT< Types >::PfNodeCacheFlush ( Node n  )  [inline]

Called by YAPF to flush the cached segment cost data back into cache storage.

Current cache implementation doesn't use that.

Reimplemented from CYapfSegmentCostCacheLocalT< Types >.

Definition at line 230 of file yapf_costcache.hpp.


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

Generated on Fri Dec 31 17:16:26 2010 for OpenTTD by  doxygen 1.6.1