#include <OpenMS/FORMAT/FastaIterator.h>
iterates over FASTA file without loading it into memory. It just holds just one entry in memory.
Public Types | |
typedef std::pair< String, String > | FASTAEntry |
Public Member Functions | |
FastaIterator () | |
constructor | |
FastaIterator (const FastaIterator &) | |
copy constructor | |
virtual | ~FastaIterator () |
destructor | |
virtual FASTAEntry | operator * () throw (Exception::InvalidIterator) |
* operator for getting the iterator's value | |
virtual PepIterator & | operator++ () throw (Exception::InvalidIterator) |
postincrement Operator for the iterator | |
virtual PepIterator * | operator++ (int i) throw (Exception::InvalidIterator) |
preincrement Operator for the iterator | |
virtual void | setFastaFile (const String &f) throw (Exception::FileNotFound, Exception::ParseError) |
setter for FASTAfile | |
virtual String | getFastaFile () |
getter for FASTA file | |
virtual void | setSpectrum (const std::vector< float > &) throw (Exception::InvalidValue, Exception::NotImplemented) |
setter for spectrum | |
virtual const std::vector < float > & | getSpectrum () throw (Exception::NotImplemented) |
getter for spectrum | |
virtual void | setTolerance (float) throw (Exception::InvalidValue, Exception::NotImplemented) |
setter for tolerance | |
virtual float | getTolerance () throw (Exception::NotImplemented) |
getter for tolerance | |
virtual bool | begin () throw (Exception::InvalidIterator) |
initializing of iterator | |
virtual bool | isAtEnd () |
indicates whether iterator is at end | |
Static Public Member Functions | |
static const std::string | getName () |
needed by FactoryProduct | |
static PepIterator * | create () |
needed by FactoryProduct | |
Protected Member Functions | |
virtual std::string | next_ () |
gets the next string | |
Protected Attributes | |
bool | is_at_end_ |
bool indicated whether iterator is at end | |
std::ifstream * | input_file_ |
input file | |
String | fasta_file_ |
fasta file location | |
std::string | actual_seq_ |
actual sequence | |
std::string | header_ |
actual fasta header | |
std::string | last_header_ |
last fasta header |
typedef std::pair<String, String> FASTAEntry |
Reimplemented from PepIterator.
FastaIterator | ( | ) |
constructor
FastaIterator | ( | const FastaIterator & | ) |
copy constructor
virtual ~FastaIterator | ( | ) | [virtual] |
destructor
virtual FASTAEntry operator * | ( | ) | throw (Exception::InvalidIterator) [virtual] |
* operator for getting the iterator's value
Exception::InvalidIterator | if iterator was not initialized |
Implements PepIterator.
virtual PepIterator& operator++ | ( | ) | throw (Exception::InvalidIterator) [virtual] |
postincrement Operator for the iterator
Exception::InvalidIterator | if iterator was not initialized |
Implements PepIterator.
virtual PepIterator* operator++ | ( | int | i | ) | throw (Exception::InvalidIterator) [virtual] |
preincrement Operator for the iterator
Exception::InvalidIterator | if iterator was not initialized |
Implements PepIterator.
virtual void setFastaFile | ( | const String & | f | ) | throw (Exception::FileNotFound, Exception::ParseError) [virtual] |
virtual String getFastaFile | ( | ) | [virtual] |
virtual void setSpectrum | ( | const std::vector< float > & | ) | throw (Exception::InvalidValue, Exception::NotImplemented) [inline, virtual] |
setter for spectrum
Exception::NotImplemented |
Implements PepIterator.
virtual const std::vector<float>& getSpectrum | ( | ) | throw (Exception::NotImplemented) [inline, virtual] |
getter for spectrum
Exception::NotImplemented |
Implements PepIterator.
virtual void setTolerance | ( | float | ) | throw (Exception::InvalidValue, Exception::NotImplemented) [inline, virtual] |
setter for tolerance
t | tolerance value |
Exception::NotImplemented |
Implements PepIterator.
virtual float getTolerance | ( | ) | throw (Exception::NotImplemented) [inline, virtual] |
getter for tolerance
Exception::NotImplemented |
Implements PepIterator.
virtual bool begin | ( | ) | throw (Exception::InvalidIterator) [virtual] |
initializing of iterator
Exception::InvalidIterator | if fastaFile was not set |
Implements PepIterator.
virtual bool isAtEnd | ( | ) | [virtual] |
indicates whether iterator is at end
Implements PepIterator.
static const std::string getName | ( | ) | [inline, static] |
static PepIterator* create | ( | ) | [inline, static] |
virtual std::string next_ | ( | ) | [protected, virtual] |
gets the next string
bool is_at_end_ [protected] |
bool indicated whether iterator is at end
std::ifstream* input_file_ [protected] |
input file
String fasta_file_ [protected] |
fasta file location
std::string actual_seq_ [protected] |
actual sequence
std::string header_ [protected] |
actual fasta header
std::string last_header_ [protected] |
last fasta header
Generated Tue Apr 1 15:36:44 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |