40 os <<
"Protein cache indices (from MRU to LRU):";
42 os <<
" " << itr->second->index;
62 boost::shared_ptr<stringstream> ss(
new stringstream);
64 serializer.
write(*ss, pd, 0);
65 serializer.
read(ss, pd);
84 if (
os_) *
os_ << cache << endl;
102 boost::shared_ptr<stringstream> ss(
new stringstream);
104 serializer.
write(*ss, pd, 0);
105 serializer.
read(ss, pd);
125 if (
os_) *
os_ << cache << endl;
136 if (
os_) *
os_ << cache << endl;
147 if (
os_) *
os_ << cache << endl;
156 if (
os_) *
os_ << cache << endl;
165 if (
os_) *
os_ << cache << endl;
186 boost::shared_ptr<stringstream> ss(
new stringstream);
188 serializer.
write(*ss, pd, 0);
189 serializer.
read(ss, pd);
207 if (
os_) *
os_ << cache << endl;
216 if (
os_) *
os_ << cache << endl;
225 if (
os_) *
os_ << cache << endl;
235 if (
os_) *
os_ << cache << endl;
243 if (
os_) *
os_ << cache << endl;
259 int main(
int argc,
char* argv[])
265 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
void testModeMetaDataAndSequence()
void write(std::ostream &os, const ProteomeData &pd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry) const
write ProteomeData object to ostream as FASTA
void testModeMetaDataOnly()
adds a level of flexible MRU caching to a ProteinList processor chain
const CacheType & cache() const
get a const-reference to the cache
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 ...
const item_type & lru() const
#define unit_assert_operator_equal(expected, actual)
std::size_t max_size() const
void read(boost::shared_ptr< std::istream > is, ProteomeData &pd) const
read in ProteomeData object from a FASTA istream
ProteinListCacheMode_MetaDataOnly
ProteinListPtr proteinListPtr
const item_type & mru() const
item_list::const_iterator const_iterator
#define TEST_PROLOG(argc, argv)
boost::shared_ptr< Protein > ProteinPtr
ProteomeData <-> FASTA stream serialization.
int main(int argc, char *argv[])