OpenTTD
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
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 >

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 Types inherited from CYapfSegmentCostCacheLocalT< Types >
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 SmallArray< CachedData > LocalCache
 

Public Member Functions

bool PfNodeCacheFetch (Node &n)
 Called by YAPF to attach cached or local segment cost data to the given node. More...
 
void PfNodeCacheFlush (Node &n)
 Called by YAPF to flush the cached segment cost data back into cache storage. More...
 
- Public Member Functions inherited from CYapfSegmentCostCacheLocalT< Types >
bool PfNodeCacheFetch (Node &n)
 Called by YAPF to attach cached or local segment cost data to the given node. More...
 
void PfNodeCacheFlush (Node &n)
 Called by YAPF to flush the cached segment cost data back into cache storage. More...
 

Protected Member Functions

TpfYapf ()
 to access inherited path finder
 
- Protected Member Functions inherited from CYapfSegmentCostCacheLocalT< Types >
TpfYapf ()
 to access inherited path finder
 

Static Protected Member Functions

static CachestGetGlobalCache ()
 

Protected Attributes

Cachem_global_cache
 
- Protected Attributes inherited from CYapfSegmentCostCacheLocalT< Types >
LocalCache m_local_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 163 of file yapf_costcache.hpp.

Member Function Documentation

◆ PfNodeCacheFetch()

template<class Types >
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

Definition at line 210 of file yapf_costcache.hpp.

◆ PfNodeCacheFlush()

template<class Types >
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.

Definition at line 226 of file yapf_costcache.hpp.


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