ProteoWizard
Classes | Public Member Functions | Public Attributes | List of all members
Reader1 Class Reference
Inheritance diagram for Reader1:
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...
 
virtual 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
 
virtual 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
 
virtual 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...
 
virtual 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 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

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 49 of file ReaderTest.cpp.

References os_.

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

§ read() [1/7]

virtual void Reader1::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 56 of file ReaderTest.cpp.

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

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

§ read() [2/7]

virtual void Reader1::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 65 of file ReaderTest.cpp.

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

68  {
69  results.push_back(TraDataPtr(new TraData));
70  read(filename, head, *results.back());
71  }
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:56

§ getType() [1/4]

virtual const char* Reader1::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 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

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 55 of file ReaderTest.cpp.

References os_.

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

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

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

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

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

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

76  {
77  results.push_back(MSDataPtr(new MSData));
78  read(filename, head, *results.back(), 0, config);
79  }
Config config
Definition: ReaderTest.cpp:47
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:56
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:845

§ getType() [2/4]

virtual const char* Reader1::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 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.

References os_.

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

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

References os_.

58  {
59  if (os_) *os_ << "Reader1::read()\n";
60  config.done = true;
61  }
Config config
Definition: ReaderTest.cpp:47
ostream * os_
Definition: ReaderTest.cpp:34

§ getType() [3/4]

virtual const char* Reader1::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 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

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 49 of file ReaderTest.cpp.

References os_.

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

§ read() [6/7]

virtual void Reader1::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 56 of file ReaderTest.cpp.

References os_.

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

§ read() [7/7]

virtual void Reader1::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 65 of file ReaderTest.cpp.

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

68  {
69  results.push_back(TraDataPtr(new TraData));
70  read(filename, head, *results.back());
71  }
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:56

§ getType() [4/4]

virtual const char* Reader1::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 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 testRead().

§ readerConfig

ReaderConfig Reader1::readerConfig

Definition at line 53 of file ReaderTest.cpp.

Referenced by testRead().


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