ProteoWizard
Public Member Functions | Private Attributes | List of all members
pwiz::msdata::MemoryMRUCache< PtrType, KeyExtractor > Class Template Reference

an MRU cache for SpectrumPtrs or ChromatogramPtrs More...

#include <MemoryMRUCache.hpp>

Inheritance diagram for pwiz::msdata::MemoryMRUCache< PtrType, KeyExtractor >:
pwiz::util::mru_list< PtrType, KeyExtractor >

Public Member Functions

 MemoryMRUCache (MemoryMRUCacheMode mode, size_t size)
 
void setMode (MemoryMRUCacheMode mode)
 set the caching mode note: if the new mode is different than the current mode, the cache will be cleared More...
 
MemoryMRUCacheMode mode () const
 get the current caching mode More...
 
- Public Member Functions inherited from pwiz::util::mru_list< PtrType, KeyExtractor >
 mru_list (std::size_t max_num_items_)
 
bool insert (const item_type &item)
 
bool modify (iterator position, Modifier modifier)
 
bool empty () const
 
std::size_t size () const
 
std::size_t max_size () const
 
void clear ()
 
const item_typemru () const
 
const item_typelru () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 

Private Attributes

MemoryMRUCacheMode mode_
 

Additional Inherited Members

- Public Types inherited from pwiz::util::mru_list< PtrType, KeyExtractor >
typedef PtrType item_type
 
typedef item_list::iterator iterator
 
typedef item_list::reverse_iterator reverse_iterator
 
typedef item_list::const_iterator const_iterator
 
typedef item_list::const_reverse_iterator const_reverse_iterator
 
typedef item_list::value_type value_type
 

Detailed Description

template<typename PtrType, typename KeyExtractor = boost::multi_index::identity<PtrType>>
class pwiz::msdata::MemoryMRUCache< PtrType, KeyExtractor >

an MRU cache for SpectrumPtrs or ChromatogramPtrs

Definition at line 45 of file MemoryMRUCache.hpp.

Constructor & Destructor Documentation

§ MemoryMRUCache()

template<typename PtrType, typename KeyExtractor = boost::multi_index::identity<PtrType>>
pwiz::msdata::MemoryMRUCache< PtrType, KeyExtractor >::MemoryMRUCache ( MemoryMRUCacheMode  mode,
size_t  size 
)
inline

Definition at line 48 of file MemoryMRUCache.hpp.

Member Function Documentation

§ setMode()

template<typename PtrType, typename KeyExtractor = boost::multi_index::identity<PtrType>>
void pwiz::msdata::MemoryMRUCache< PtrType, KeyExtractor >::setMode ( MemoryMRUCacheMode  mode)
inline

set the caching mode note: if the new mode is different than the current mode, the cache will be cleared

Definition at line 54 of file MemoryMRUCache.hpp.

55  {
56  if (mode != mode_)
58  mode_ = mode;
59  }
MemoryMRUCacheMode mode() const
get the current caching mode

§ mode()

template<typename PtrType, typename KeyExtractor = boost::multi_index::identity<PtrType>>
MemoryMRUCacheMode pwiz::msdata::MemoryMRUCache< PtrType, KeyExtractor >::mode ( ) const
inline

get the current caching mode

Definition at line 62 of file MemoryMRUCache.hpp.

Referenced by pwiz::msdata::MemoryMRUCache< CacheEntry, BOOST_MULTI_INDEX_MEMBER(CacheEntry, size_t, index) >::setMode().

62 {return mode_;}

Member Data Documentation

§ mode_

template<typename PtrType, typename KeyExtractor = boost::multi_index::identity<PtrType>>
MemoryMRUCacheMode pwiz::msdata::MemoryMRUCache< PtrType, KeyExtractor >::mode_
private

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