Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

FastaIterator Class Reference

#include <OpenMS/FORMAT/FastaIterator.h>

Inheritance diagram for FastaIterator:

PepIterator FactoryProduct

List of all members.


Detailed Description

Iterator over FASTA file.

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

See also:
FastaIteratorIntern.h

Public Types

typedef std::pair< String, StringFASTAEntry

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 PepIteratoroperator++ () throw (Exception::InvalidIterator)
 postincrement Operator for the iterator
virtual PepIteratoroperator++ (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 PepIteratorcreate ()
 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

Member Typedef Documentation

typedef std::pair<String, String> FASTAEntry

Reimplemented from PepIterator.


Constructor & Destructor Documentation

FastaIterator (  ) 

constructor

FastaIterator ( const FastaIterator  ) 

copy constructor

virtual ~FastaIterator (  )  [virtual]

destructor


Member Function Documentation

virtual FASTAEntry operator * (  )  throw (Exception::InvalidIterator) [virtual]

* operator for getting the iterator's value

Returns:
FASTAEntry
Exceptions:
Exception::InvalidIterator if iterator was not initialized

Implements PepIterator.

virtual PepIterator& operator++ (  )  throw (Exception::InvalidIterator) [virtual]

postincrement Operator for the iterator

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

Implements PepIterator.

virtual PepIterator* operator++ ( int  i  )  throw (Exception::InvalidIterator) [virtual]

preincrement Operator for the iterator

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

Implements PepIterator.

virtual void setFastaFile ( const String f  )  throw (Exception::FileNotFound, Exception::ParseError) [virtual]

setter for FASTAfile

Exceptions:
Exception::FileNotFound 

Implements PepIterator.

virtual String getFastaFile (  )  [virtual]

getter for FASTA file

Returns:
String with file location

Implements PepIterator.

virtual void setSpectrum ( const std::vector< float > &   )  throw (Exception::InvalidValue, Exception::NotImplemented) [inline, virtual]

setter for spectrum

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

Implements PepIterator.

virtual const std::vector<float>& getSpectrum (  )  throw (Exception::NotImplemented) [inline, virtual]

getter for spectrum

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

Implements PepIterator.

virtual void setTolerance ( float   )  throw (Exception::InvalidValue, Exception::NotImplemented) [inline, virtual]

setter for tolerance

Note:
note availeble for FastaIterator
Parameters:
t tolerance value
Exceptions:
Exception::NotImplemented 

Implements PepIterator.

virtual float getTolerance (  )  throw (Exception::NotImplemented) [inline, virtual]

getter for tolerance

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

Implements PepIterator.

virtual bool begin (  )  throw (Exception::InvalidIterator) [virtual]

initializing of iterator

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

Implements PepIterator.

virtual bool isAtEnd (  )  [virtual]

indicates whether iterator is at end

Returns:
bool true if interator is at end

Implements PepIterator.

static const std::string getName (  )  [inline, static]

needed by FactoryProduct

Returns:
const string name of class

static PepIterator* create (  )  [inline, static]

needed by FactoryProduct

Returns:
poiter to new object

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

gets the next string

Returns:
string


Member Data Documentation

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


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:44 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1