ProteoWizard
Classes | Public Member Functions | Public Attributes | List of all members
Reader2 Class Reference
Inheritance diagram for Reader2:
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
 
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
 
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
 
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
 
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 77 of file ReaderTest.cpp.

Member Function Documentation

◆ identify() [1/4]

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

Definition at line 89 of file ReaderTest.cpp.

90 {
91 bool result = (filename == "2");
92 if (os_) *os_ << "Reader2::identify(): " << boolalpha << result << endl;
93 return result ? filename : std::string("");
94 }
ostream * os_

References os_.

◆ read() [1/7]

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

Definition at line 96 of file ReaderTest.cpp.

100 {
101 if (os_) *os_ << "Reader2::read()\n";
102 config.done = true;
103 }
Config config

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

Referenced by read(), and read().

◆ read() [2/7]

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

Definition at line 105 of file ReaderTest.cpp.

108 {
109 results.push_back(TraDataPtr(new TraData));
110 read(filename, head, *results.back());
111 }
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]

const char * Reader2::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 113 of file ReaderTest.cpp.

113{return "Reader2";} // satisfy inheritance

◆ identify() [2/4]

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

Definition at line 98 of file ReaderTest.cpp.

99 {
100 bool result = (filename == "2");
101 if (os_) *os_ << "Reader2::identify(): " << boolalpha << result << endl;
102 return std::string (result?filename:std::string(""));
103 }
STL namespace.

References os_.

◆ read() [3/7]

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

Definition at line 105 of file ReaderTest.cpp.

110 {
111 if (os_) *os_ << "Reader2::read()\n";
112 readerConfig.done = true;
113 }
ReaderConfig readerConfig

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

◆ read() [4/7]

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

Definition at line 115 of file ReaderTest.cpp.

119 {
120 results.push_back(MSDataPtr(new MSData));
121 read(filename, head, *results.back(), 0, config);
122 }
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]

const char * Reader2::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 124 of file ReaderTest.cpp.

124{return "Reader2";} // satisfy inheritance

◆ identify() [3/4]

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

Definition at line 80 of file ReaderTest.cpp.

81 {
82 bool result = (uri == "2");
83 if (os_) *os_ << "Reader2::identify(): " << boolalpha << result << endl;
84 return std::string (result?uri:std::string(""));
85 }

References os_.

◆ read() [5/7]

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

Definition at line 87 of file ReaderTest.cpp.

90 {
91 if (os_) *os_ << "Reader2::read()\n";
92 config.done = true;
93 }

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

◆ getType() [3/4]

const char * Reader2::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 95 of file ReaderTest.cpp.

95{return "Reader2";} // satisfy inheritance

◆ identify() [4/4]

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

Definition at line 89 of file ReaderTest.cpp.

90 {
91 bool result = (filename == "2");
92 if (os_) *os_ << "Reader2::identify(): " << boolalpha << result << endl;
93 return result ? filename : std::string("");
94 }

References os_.

◆ read() [6/7]

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

Definition at line 96 of file ReaderTest.cpp.

100 {
101 if (os_) *os_ << "Reader2::read()\n";
102 config.done = true;
103 }

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

◆ read() [7/7]

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

Definition at line 105 of file ReaderTest.cpp.

108 {
109 results.push_back(TraDataPtr(new TraData));
110 read(filename, head, *results.back());
111 }

References read().

◆ getType() [4/4]

const char * Reader2::getType ( ) const
inlinevirtual

Implements pwiz::proteome::Reader.

Definition at line 113 of file ReaderTest.cpp.

113{return "Reader2";} // satisfy inheritance

Member Data Documentation

◆ config

Config Reader2::config

Definition at line 87 of file ReaderTest.cpp.

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

◆ readerConfig

ReaderConfig Reader2::readerConfig

Definition at line 96 of file ReaderTest.cpp.

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


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