ProteoWizard
Public Member Functions | List of all members
pwiz::proteome::Reader Class Referenceabstract

interface for file readers More...

#include <Reader.hpp>

Inheritance diagram for pwiz::proteome::Reader:
pwiz::proteome::Reader_FASTA pwiz::proteome::ReaderList pwiz::tradata::ReaderList TestReader TestReader pwiz::proteome::DefaultReaderList pwiz::tradata::DefaultReaderList

Public Member Functions

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 More...
 
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; More...
 
virtual void read (const std::string &uri, ProteomeData &result) const
 fill in the ProteomeData structure from a new URI stream More...
 
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 More...
 
virtual const char * getType () const =0
 
virtual ~Reader ()
 

Detailed Description

interface for file readers

Definition at line 36 of file Reader.hpp.

Constructor & Destructor Documentation

§ ~Reader()

virtual pwiz::proteome::Reader::~Reader ( )
inlinevirtual

Definition at line 70 of file Reader.hpp.

70 {}

Member Function Documentation

§ accept()

bool pwiz::proteome::Reader::accept ( const std::string &  uri,
boost::shared_ptr< std::istream >  uriStreamPtr 
) const
inline

return true iff Reader recognizes the file as one it should handle

that's not to say one it CAN handle, necessarily, as in Thermo on linux, see comment for identify() below

Definition at line 44 of file Reader.hpp.

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

Referenced by testAccept(), and testRead().

46  {
47  return (identify(uri, uriStreamPtr).length() != 0);
48  }
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;

§ identify()

virtual std::string pwiz::proteome::Reader::identify ( const std::string &  uri,
boost::shared_ptr< std::istream >  uriStreamPtr 
) const
pure virtual

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

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

Implemented in pwiz::proteome::ReaderList, and pwiz::proteome::Reader_FASTA.

§ read() [1/2]

virtual void pwiz::proteome::Reader::read ( const std::string &  uri,
ProteomeData result 
) const
virtual

fill in the ProteomeData structure from a new URI stream

Reimplemented in pwiz::proteome::ReaderList.

§ read() [2/2]

virtual void pwiz::proteome::Reader::read ( const std::string &  uri,
boost::shared_ptr< std::istream >  uriStreamPtr,
ProteomeData result 
) const
pure virtual

fill in the ProteomeData structure from a shared URI stream

Implemented in pwiz::proteome::ReaderList, and pwiz::proteome::Reader_FASTA.

§ getType()

virtual const char* pwiz::proteome::Reader::getType ( ) const
pure virtual

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