22 #ifndef _PROTEINLISTCACHE_HPP_ 23 #define _PROTEINLISTCACHE_HPP_ 40 ProteinListCacheMode_MetaDataAndSequence
51 BOOST_STATIC_CONSTANT(
unsigned, first_offset = offsetof(KeyValuePair, first));
55 ProteinListCacheMode cacheMode,
60 virtual ProteinPtr protein(
size_t index,
bool getSequence =
true)
const;
62 virtual size_t find(
const std::string&
id)
const;
66 void setMode(ProteinListCacheMode mode);
69 ProteinListCacheMode mode()
const;
72 const CacheType&
cache()
const {
return cache_;}
86 #endif // _PROTEINLISTCACHE_HPP_ Inheritable pass-through implementation for wrapping a ProteinList.
std::pair< size_t, ProteinPtr > KeyValuePair
a cache mapping spectrum indices to ProteinPtrs
adds a level of flexible MRU caching to a ProteinList processor chain
const CacheType & cache() const
get a const-reference to the cache
ProteinListCacheMode_MetaDataOnly
ProteinListCacheMode mode_
pwiz::util::mru_list< KeyValuePair, boost::multi_index::member_offset< KeyValuePair, size_t, first_offset > > CacheType
boost::shared_ptr< ProteinList > ProteinListPtr
boost::shared_ptr< Protein > ProteinPtr