ProteoWizard
Classes | Public Member Functions | Public Attributes | List of all members
Reader1 Class Reference
Inheritance diagram for Reader1:
pwiz::proteome::Reader pwiz::proteome::Reader pwiz::proteome::Reader pwiz::proteome::Reader

Classes

struct  Config
 
struct  ReaderConfig
 

Public Member Functions

virtual std::string identify (const std::string &filename, const std::string &head) const
 
virtual void read (const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
 
virtual void read (const std::string &filename, const std::string &head, std::vector< TraDataPtr > &results) const
 
virtual const char * getType () const
 
virtual std::string identify (const std::string &filename, const std::string &head) const
 
virtual void read (const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
 
virtual void read (const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
 
virtual const char * getType () const
 
virtual std::string identify (const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr) const
 
virtual void read (const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr, ProteomeData &result) const
 
virtual const char * getType () const
 
virtual std::string identify (const std::string &filename, const std::string &head) const
 
virtual void read (const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
 
virtual void read (const std::string &filename, const std::string &head, std::vector< TraDataPtr > &results) const
 
virtual const char * getType () const
 
- Public Member Functions inherited from pwiz::proteome::Reader
bool accept (const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr) const
 return true iff Reader recognizes the file as one it should handle
 
virtual std::string identify (const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr) const =0
 return file type iff Reader recognizes the file, else empty;
 
virtual void read (const std::string &uri, ProteomeData &result) const
 fill in the ProteomeData structure from a new URI stream
 
virtual void read (const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr, ProteomeData &result) const =0
 fill in the ProteomeData structure from a shared URI stream
 
virtual ~Reader ()
 

Public Attributes

Config config
 
ReaderConfig readerConfig
 

Detailed Description

Definition at line 37 of file ReaderTest.cpp.

Member Function Documentation

◆ identify() [1/4]

virtual std::string Reader1::identify ( const std::string &  filename,
const std::string &  head 
) const
inlinevirtual

Definition at line 49 of file ReaderTest.cpp.

50 {
51 bool result = (filename == "1");
52 if (os_) *os_ << "Reader1::identify(): " << boolalpha << result << endl;
53 return result ? filename : std::string("");
54 }
ostream * os_

References os_.

◆ read() [1/7]

virtual void Reader1::read ( const std::string &  filename,
const std::string &  head,
TraData result,
int  runIndex = 0 
) const
inlinevirtual

Definition at line 56 of file ReaderTest.cpp.

60 {
61 if (os_) *os_ << "Reader1::read()\n";
62 config.done = true;
63 }
Config config

References config, Reader1::Config::done, and os_.

Referenced by read(), and read().

◆ read() [2/7]

virtual void Reader1::read ( const std::string &  filename,
const std::string &  head,
std::vector< TraDataPtr > &  results 
) const
inlinevirtual

Definition at line 65 of file ReaderTest.cpp.

68 {
69 results.push_back(TraDataPtr(new TraData));
70 read(filename, head, *results.back());
71 }
virtual void read(const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
boost::shared_ptr< TraData > TraDataPtr
Definition TraData.hpp:406

References read().

◆ getType() [1/4]

virtual const char * Reader1::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 73 of file ReaderTest.cpp.

73{return "Reader1";} // satisfy inheritance

◆ identify() [2/4]

virtual std::string Reader1::identify ( const std::string &  filename,
const std::string &  head 
) const
inlinevirtual

Definition at line 55 of file ReaderTest.cpp.

56 {
57 bool result = (filename == "1");
58 if (os_) *os_ << "Reader1::identify(): " << boolalpha << result << endl;
59 return std::string (result?filename:std::string(""));
60 }
STL namespace.

References os_.

◆ read() [3/7]

virtual void Reader1::read ( const std::string &  filename,
const std::string &  head,
MSData result,
int  runIndex = 0,
const Config config = Config() 
) const
inlinevirtual

Definition at line 62 of file ReaderTest.cpp.

67 {
68 if (os_) *os_ << "Reader1::read()\n";
69 readerConfig.done = true;
70 }
ReaderConfig readerConfig

References Reader1::ReaderConfig::done, os_, and readerConfig.

◆ read() [4/7]

virtual void Reader1::read ( const std::string &  filename,
const std::string &  head,
std::vector< MSDataPtr > &  results,
const Config config = Config() 
) const
inlinevirtual

Definition at line 72 of file ReaderTest.cpp.

76 {
77 results.push_back(MSDataPtr(new MSData));
78 read(filename, head, *results.back(), 0, config);
79 }
boost::shared_ptr< MSData > MSDataPtr
Definition MSData.hpp:913
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition MSData.hpp:850

References config, and read().

◆ getType() [2/4]

virtual const char * Reader1::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 81 of file ReaderTest.cpp.

81{return "Reader1";} // satisfy inheritance

◆ identify() [3/4]

virtual std::string Reader1::identify ( const std::string &  uri,
boost::shared_ptr< std::istream >  uriStreamPtr 
) const
inlinevirtual

Definition at line 48 of file ReaderTest.cpp.

49 {
50 bool result = (uri == "1");
51 if (os_) *os_ << "Reader1::identify(): " << boolalpha << result << endl;
52 return std::string (result?uri:std::string(""));
53 }

References os_.

◆ read() [5/7]

virtual void Reader1::read ( const std::string &  uri,
boost::shared_ptr< std::istream >  uriStreamPtr,
ProteomeData result 
) const
inlinevirtual

Definition at line 55 of file ReaderTest.cpp.

58 {
59 if (os_) *os_ << "Reader1::read()\n";
60 config.done = true;
61 }

References config, Reader1::Config::done, and os_.

◆ getType() [3/4]

virtual const char * Reader1::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 63 of file ReaderTest.cpp.

63{return "Reader1";} // satisfy inheritance

◆ identify() [4/4]

virtual std::string Reader1::identify ( const std::string &  filename,
const std::string &  head 
) const
inlinevirtual

Definition at line 49 of file ReaderTest.cpp.

50 {
51 bool result = (filename == "1");
52 if (os_) *os_ << "Reader1::identify(): " << boolalpha << result << endl;
53 return result ? filename : std::string("");
54 }

References os_.

◆ read() [6/7]

virtual void Reader1::read ( const std::string &  filename,
const std::string &  head,
TraData result,
int  runIndex = 0 
) const
inlinevirtual

Definition at line 56 of file ReaderTest.cpp.

60 {
61 if (os_) *os_ << "Reader1::read()\n";
62 config.done = true;
63 }

References config, Reader1::Config::done, and os_.

◆ read() [7/7]

virtual void Reader1::read ( const std::string &  filename,
const std::string &  head,
std::vector< TraDataPtr > &  results 
) const
inlinevirtual

Definition at line 65 of file ReaderTest.cpp.

68 {
69 results.push_back(TraDataPtr(new TraData));
70 read(filename, head, *results.back());
71 }

References read().

◆ getType() [4/4]

virtual const char * Reader1::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 73 of file ReaderTest.cpp.

73{return "Reader1";} // satisfy inheritance

Member Data Documentation

◆ config

Config Reader1::config

Definition at line 47 of file ReaderTest.cpp.

Referenced by read(), read(), read(), testGet(), and testRead().

◆ readerConfig

ReaderConfig Reader1::readerConfig

Definition at line 53 of file ReaderTest.cpp.

Referenced by read(), testGet(), and testRead().


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