Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

FastaIterator Class Reference

Iterator over FASTA file. More...

#include <OpenMS/FORMAT/FastaIterator.h>

Inheritance diagram for FastaIterator:
PepIterator

List of all members.

Public Types

typedef std::pair< String, StringFASTAEntry

Public Member Functions

 FastaIterator ()
 constructor
virtual ~FastaIterator ()
 destructor
virtual FASTAEntry operator* ()
 * operator for getting the iterator's value
virtual PepIteratoroperator++ ()
 pre-increment Operator for the iterator
virtual PepIteratoroperator++ (int i)
 post-increment Operator for the iterator
virtual void setFastaFile (const String &f)
 setter for FASTAfile
virtual String getFastaFile ()
 getter for FASTA file
virtual void setSpectrum (const std::vector< DoubleReal > &)
 setter for spectrum
virtual const std::vector
< DoubleReal > & 
getSpectrum ()
 getter for spectrum
virtual void setTolerance (DoubleReal)
 setter for tolerance
virtual DoubleReal getTolerance ()
 getter for tolerance
virtual bool begin ()
 initializing of iterator
virtual bool isAtEnd ()
 indicates whether iterator is at end

Static Public Member Functions

static const String getProductName ()
 needed by Factory
static PepIteratorcreate ()
 needed by Factory

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

Private Member Functions

 FastaIterator (const FastaIterator &)
 copy constructor
FastaIteratoroperator= (const FastaIterator &)
 Assignment.

Detailed Description

Iterator over FASTA file.

Iterates over FASTA file without loading it into memory. It holds just one entry in memory.

See also:
FastaIteratorIntern.h

Member Typedef Documentation

typedef std::pair<String, String> FASTAEntry

Reimplemented from PepIterator.


Constructor & Destructor Documentation

FastaIterator (  ) 

constructor

virtual ~FastaIterator (  )  [virtual]

destructor

FastaIterator ( const FastaIterator  )  [private]

copy constructor


Member Function Documentation

virtual bool begin (  )  [virtual]

initializing of iterator

Returns:
true if everything went right
Exceptions:
Exception::InvalidIterator if fastaFile was not set

Implements PepIterator.

static PepIterator* create (  )  [inline, static]

needed by Factory

Returns:
pointer to new object
virtual String getFastaFile (  )  [virtual]

getter for FASTA file

Returns:
String with file location

Implements PepIterator.

static const String getProductName (  )  [inline, static]

needed by Factory

Returns:
const string name of class
virtual const std::vector<DoubleReal>& getSpectrum (  )  [inline, virtual]

getter for spectrum

Note:
note available for FastaIterator
Exceptions:
Exception::NotImplemented 

Implements PepIterator.

virtual DoubleReal getTolerance (  )  [inline, virtual]

getter for tolerance

Note:
note available for FastaIterator
Returns:
tolerance
Exceptions:
Exception::NotImplemented 

Implements PepIterator.

virtual bool isAtEnd (  )  [virtual]

indicates whether iterator is at end

Returns:
bool true if iterator is at end

Implements PepIterator.

virtual std::string next_ (  )  [protected, virtual]

gets the next string

Returns:
string
virtual FASTAEntry operator* (  )  [virtual]

* operator for getting the iterator's value

Returns:
FASTAEntry
Exceptions:
InvalidIterator if iterator was not initialized

Implements PepIterator.

virtual PepIterator& operator++ (  )  [virtual]

pre-increment Operator for the iterator

Returns:
reference to PepIterator
Exceptions:
Exception::InvalidIterator if iterator was not initialized

Implements PepIterator.

virtual PepIterator* operator++ ( int  i  )  [virtual]

post-increment Operator for the iterator

Returns:
pointer to PepIterator
Exceptions:
Exception::InvalidIterator if iterator was not initialized

Implements PepIterator.

FastaIterator& operator= ( const FastaIterator  )  [private]

Assignment.

virtual void setFastaFile ( const String f  )  [virtual]

setter for FASTAfile

Parameters:
f Name of the fasta file
Exceptions:
Exception::FileNotFound 
ParseError is thrown if the file could not be parsed

Implements PepIterator.

virtual void setSpectrum ( const std::vector< DoubleReal > &   )  [inline, virtual]

setter for spectrum

Note:
note available for FastaIterator
Exceptions:
Exception::NotImplemented 

Implements PepIterator.

virtual void setTolerance ( DoubleReal   )  [inline, virtual]

setter for tolerance

Note:
note available for FastaIterator
Exceptions:
Exception::NotImplemented 

Implements PepIterator.


Member Data Documentation

std::string actual_seq_ [protected]

actual sequence

String fasta_file_ [protected]

fasta file location

std::string header_ [protected]

actual fasta header

std::ifstream input_file_ [protected]

input file

bool is_at_end_ [protected]

bool indicated whether iterator is at end

std::string last_header_ [protected]

last fasta header


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1