Point Cloud Library (PCL)  1.7.2
List of all members | Public Types | Public Member Functions | Public Attributes
LRUCache< KeyT, CacheItemT > Class Template Reference

#include <pcl/outofcore/impl/lru_cache.hpp>

Public Types

typedef std::list< KeyT > KeyIndex
typedef KeyIndex::iterator KeyIndexIterator
typedef std::map< KeyT,
std::pair< CacheItemT,
typename KeyIndex::iterator > > 
Cache
typedef Cache::iterator CacheIterator

Public Member Functions

 LRUCache (size_t c)
bool hasKey (const KeyT &k)
CacheItemT & get (const KeyT &k)
void touch (const KeyT &key)
bool insert (const KeyT &key, const CacheItemT &value)
void setCapacity (size_t capacity)
CacheItemT & tailItem ()
size_t sizeOf (const CacheItemT &value)
bool evict (int item_count=1)

Public Attributes

size_t capacity_
size_t size_
KeyIndex key_index_
Cache cache_

Detailed Description

template<typename KeyT, typename CacheItemT>
class LRUCache< KeyT, CacheItemT >

Definition at line 27 of file lru_cache.hpp.

Member Typedef Documentation

template<typename KeyT , typename CacheItemT >
typedef std::map<KeyT, std::pair<CacheItemT, typename KeyIndex::iterator> > LRUCache< KeyT, CacheItemT >::Cache

Definition at line 34 of file lru_cache.hpp.

template<typename KeyT , typename CacheItemT >
typedef Cache::iterator LRUCache< KeyT, CacheItemT >::CacheIterator

Definition at line 35 of file lru_cache.hpp.

template<typename KeyT , typename CacheItemT >
typedef std::list<KeyT> LRUCache< KeyT, CacheItemT >::KeyIndex

Definition at line 31 of file lru_cache.hpp.

template<typename KeyT , typename CacheItemT >
typedef KeyIndex::iterator LRUCache< KeyT, CacheItemT >::KeyIndexIterator

Definition at line 32 of file lru_cache.hpp.

Constructor & Destructor Documentation

template<typename KeyT , typename CacheItemT >
LRUCache< KeyT, CacheItemT >::LRUCache ( size_t  c)
inline

Definition at line 37 of file lru_cache.hpp.

References LRUCache< KeyT, CacheItemT >::capacity_.

Member Function Documentation

template<typename KeyT , typename CacheItemT >
bool LRUCache< KeyT, CacheItemT >::evict ( int  item_count = 1)
inline
template<typename KeyT , typename CacheItemT >
CacheItemT& LRUCache< KeyT, CacheItemT >::get ( const KeyT &  k)
inline
template<typename KeyT , typename CacheItemT >
bool LRUCache< KeyT, CacheItemT >::hasKey ( const KeyT &  k)
inline

Definition at line 44 of file lru_cache.hpp.

References LRUCache< KeyT, CacheItemT >::cache_.

template<typename KeyT , typename CacheItemT >
bool LRUCache< KeyT, CacheItemT >::insert ( const KeyT &  key,
const CacheItemT &  value 
)
inline
template<typename KeyT , typename CacheItemT >
void LRUCache< KeyT, CacheItemT >::setCapacity ( size_t  capacity)
inline

Definition at line 125 of file lru_cache.hpp.

References LRUCache< KeyT, CacheItemT >::capacity_.

template<typename KeyT , typename CacheItemT >
size_t LRUCache< KeyT, CacheItemT >::sizeOf ( const CacheItemT &  value)
inline

Definition at line 138 of file lru_cache.hpp.

template<typename KeyT , typename CacheItemT >
CacheItemT& LRUCache< KeyT, CacheItemT >::tailItem ( )
inline
template<typename KeyT , typename CacheItemT >
void LRUCache< KeyT, CacheItemT >::touch ( const KeyT &  key)
inline

Member Data Documentation

template<typename KeyT , typename CacheItemT >
Cache LRUCache< KeyT, CacheItemT >::cache_
template<typename KeyT , typename CacheItemT >
size_t LRUCache< KeyT, CacheItemT >::capacity_
template<typename KeyT , typename CacheItemT >
KeyIndex LRUCache< KeyT, CacheItemT >::key_index_
template<typename KeyT , typename CacheItemT >
size_t LRUCache< KeyT, CacheItemT >::size_

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