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

Classes

struct  Config
 
struct  ReaderConfig
 

Public Member Functions

virtual std::string identify (const std::string &filename, const std::string &head) const
 return file type iff Reader recognizes the file, else empty; More...
 
virtual void read (const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
 fill in the TraData structure from the first (or only) sample More...
 
virtual void read (const std::string &filename, const std::string &head, std::vector< TraDataPtr > &results) const
 fill in a vector of TraData structures; provides support for multi-run input files More...
 
const char * getType () const
 fill in a vector of MSData.Id values; provides support for multi-run input files More...
 
virtual std::string identify (const std::string &filename, const std::string &head) const
 return file type iff Reader recognizes the file, else empty; More...
 
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
 fill in a vector of MSData.Id values; provides support for multi-run input files More...
 
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
 fill in a vector of MSData.Id values; provides support for multi-run input files More...
 
virtual std::string identify (const std::string &filename, const std::string &head) const
 return file type iff Reader recognizes the file, else empty; More...
 
virtual void read (const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
 fill in the TraData structure from the first (or only) sample More...
 
virtual void read (const std::string &filename, const std::string &head, std::vector< TraDataPtr > &results) const
 fill in a vector of TraData structures; provides support for multi-run input files More...
 
const char * getType () const
 fill in a vector of MSData.Id values; provides support for multi-run input files More...
 
- Public Member Functions inherited from pwiz::tradata::Reader
bool accept (const std::string &filename, const std::string &head) const
 return true iff Reader recognizes the file as one it should handle More...
 
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

return file type iff Reader recognizes the file, else empty;

note: for formats requiring a 3rd party DLL identify() should return true if it recognized the format, even though reading may fail if the 3rd party DLL isn't actually present Reader may filter based on filename and/or head of the file

Implements pwiz::tradata::Reader.

Definition at line 89 of file ReaderTest.cpp.

References os_.

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

§ read() [1/7]

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

fill in the TraData structure from the first (or only) sample

Implements pwiz::tradata::Reader.

Definition at line 96 of file ReaderTest.cpp.

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

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

§ read() [2/7]

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

fill in a vector of TraData structures; provides support for multi-run input files

Implements pwiz::tradata::Reader.

Definition at line 105 of file ReaderTest.cpp.

References pwiz::identdata::IO::read().

108  {
109  results.push_back(TraDataPtr(new TraData));
110  read(filename, head, *results.back());
111  }
boost::shared_ptr< TraData > TraDataPtr
Definition: TraData.hpp:406
virtual void read(const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
fill in the TraData structure from the first (or only) sample
Definition: ReaderTest.cpp:96

§ getType() [1/4]

const char* Reader2::getType ( ) const
inlinevirtual

fill in a vector of MSData.Id values; provides support for multi-run input files

Implements pwiz::tradata::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

return file type iff Reader recognizes the file, else empty;

note: for formats requiring a 3rd party DLL identify() should return true if it recognized the format, even though reading may fail if the 3rd party DLL isn't actually present Reader may filter based on filename and/or head of the file

Implements pwiz::tradata::Reader.

Definition at line 98 of file ReaderTest.cpp.

References os_.

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

§ 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.

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

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

§ 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.

References pwiz::identdata::IO::read().

119  {
120  results.push_back(MSDataPtr(new MSData));
121  read(filename, head, *results.back(), 0, config);
122  }
Config config
Definition: ReaderTest.cpp:87
boost::shared_ptr< MSData > MSDataPtr
Definition: MSData.hpp:909
virtual void read(const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
fill in the TraData structure from the first (or only) sample
Definition: ReaderTest.cpp:96
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:845

§ getType() [2/4]

const char* Reader2::getType ( ) const
inlinevirtual

fill in a vector of MSData.Id values; provides support for multi-run input files

Implements pwiz::tradata::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.

References os_.

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

§ 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.

References os_.

90  {
91  if (os_) *os_ << "Reader2::read()\n";
92  config.done = true;
93  }
Config config
Definition: ReaderTest.cpp:87
ostream * os_
Definition: ReaderTest.cpp:34

§ getType() [3/4]

const char* Reader2::getType ( ) const
inlinevirtual

fill in a vector of MSData.Id values; provides support for multi-run input files

Implements pwiz::tradata::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

return file type iff Reader recognizes the file, else empty;

note: for formats requiring a 3rd party DLL identify() should return true if it recognized the format, even though reading may fail if the 3rd party DLL isn't actually present Reader may filter based on filename and/or head of the file

Implements pwiz::tradata::Reader.

Definition at line 89 of file ReaderTest.cpp.

References os_.

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

§ read() [6/7]

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

fill in the TraData structure from the first (or only) sample

Implements pwiz::tradata::Reader.

Definition at line 96 of file ReaderTest.cpp.

References os_.

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

§ read() [7/7]

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

fill in a vector of TraData structures; provides support for multi-run input files

Implements pwiz::tradata::Reader.

Definition at line 105 of file ReaderTest.cpp.

References pwiz::identdata::IO::read().

108  {
109  results.push_back(TraDataPtr(new TraData));
110  read(filename, head, *results.back());
111  }
boost::shared_ptr< TraData > TraDataPtr
Definition: TraData.hpp:406
virtual void read(const std::string &filename, const std::string &head, TraData &result, int runIndex=0) const
fill in the TraData structure from the first (or only) sample
Definition: ReaderTest.cpp:96

§ getType() [4/4]

const char* Reader2::getType ( ) const
inlinevirtual

fill in a vector of MSData.Id values; provides support for multi-run input files

Implements pwiz::tradata::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 testGet(), and testRead().

§ readerConfig

ReaderConfig Reader2::readerConfig

Definition at line 96 of file ReaderTest.cpp.

Referenced by testGet(), and testRead().


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