Go to the documentation of this file.
22 #ifndef _PROTEINLISTCACHE_HPP_
23 #define _PROTEINLISTCACHE_HPP_
40 ProteinListCacheMode_MetaDataAndSequence
55 ProteinListCacheMode cacheMode,
62 virtual size_t find(
const std::string&
id)
const;
69 ProteinListCacheMode
mode()
const;
86 #endif // _PROTEINLISTCACHE_HPP_
virtual size_t find(const std::string &id) const
const CacheType & cache() const
get a const-reference to the cache
Inheritable pass-through implementation for wrapping a ProteinList.
void setMode(ProteinListCacheMode mode)
set the caching mode note: if the new mode is different than the current mode, the cache will be clea...
ProteinListCacheMode mode_
ProteinListCache(ProteinListCache &)
pwiz::util::mru_list< KeyValuePair, boost::multi_index::member_offset< KeyValuePair, size_t, first_offset > > CacheType
virtual ProteinPtr protein(size_t index, bool getSequence=true) const
returns the requested spectrum which may or may not be cached depending on the current cache mode
ProteinListCacheMode mode() const
get the current caching mode
ProteinListCache & operator=(ProteinListCache &)
boost::shared_ptr< ProteinList > ProteinListPtr
std::pair< size_t, ProteinPtr > KeyValuePair
a cache mapping spectrum indices to ProteinPtrs
ProteinListCacheMode_MetaDataOnly
ProteinListCache(const ProteinListPtr &inner, ProteinListCacheMode cacheMode, size_t cacheSize)
adds a level of flexible MRU caching to a ProteinList processor chain
BOOST_STATIC_CONSTANT(unsigned, first_offset=offsetof(KeyValuePair, first))
boost::shared_ptr< Protein > ProteinPtr