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 | List of all members
FastaIterator Class Reference

Iterator over FASTA file. More...

#include <OpenMS/FORMAT/FastaIterator.h>

Inheritance diagram for FastaIterator:
PepIterator

Public Types

typedef std::pair< String, StringFASTAEntry
 
- Public Types inherited from PepIterator
typedef std::pair< String, StringFASTAEntry
 

Public Member Functions

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

Static Public Member Functions

static const String getProductName ()
 needed by Factory More...
 
static PepIteratorcreate ()
 needed by Factory More...
 
- Static Public Member Functions inherited from PepIterator
static void registerChildren ()
 all children has to be registered here More...
 

Protected Member Functions

virtual std::string next_ ()
 gets the next string More...
 

Protected Attributes

bool is_at_end_
 bool indicated whether iterator is at end More...
 
std::ifstream input_file_
 input file More...
 
String fasta_file_
 fasta file location More...
 
std::string actual_seq_
 actual sequence More...
 
std::string header_
 actual fasta header More...
 
std::string last_header_
 last fasta header More...
 

Private Member Functions

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

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

◆ FASTAEntry

typedef std::pair<String, String> FASTAEntry

Constructor & Destructor Documentation

◆ FastaIterator() [1/2]

constructor

◆ ~FastaIterator()

virtual ~FastaIterator ( )
virtual

destructor

◆ FastaIterator() [2/2]

FastaIterator ( const FastaIterator )
private

copy constructor

Member Function Documentation

◆ begin()

virtual bool begin ( )
virtual

initializing of iterator

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

Implements PepIterator.

◆ create()

static PepIterator* create ( )
inlinestatic

needed by Factory

Returns
pointer to new object

◆ getFastaFile()

virtual String getFastaFile ( )
virtual

getter for FASTA file

Returns
String with file location

Implements PepIterator.

◆ getProductName()

static const String getProductName ( )
inlinestatic

needed by Factory

Returns
const string name of class

◆ getSpectrum()

virtual const std::vector<double>& getSpectrum ( )
inlinevirtual

getter for spectrum

Note
note available for FastaIterator
Exceptions
Exception::NotImplemented

Implements PepIterator.

◆ getTolerance()

virtual double getTolerance ( )
inlinevirtual

getter for tolerance

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

Implements PepIterator.

◆ isAtEnd()

virtual bool isAtEnd ( )
virtual

indicates whether iterator is at end

Returns
bool true if iterator is at end

Implements PepIterator.

◆ next_()

virtual std::string next_ ( )
protectedvirtual

gets the next string

Returns
string

◆ operator*()

virtual FASTAEntry operator* ( )
virtual

* operator for getting the iterator's value

Returns
FASTAEntry
Exceptions
InvalidIteratorif iterator was not initialized

Implements PepIterator.

◆ operator++() [1/2]

virtual PepIterator& operator++ ( )
virtual

pre-increment Operator for the iterator

Returns
reference to PepIterator
Exceptions
Exception::InvalidIteratorif iterator was not initialized

Implements PepIterator.

◆ operator++() [2/2]

virtual PepIterator* operator++ ( int  i)
virtual

post-increment Operator for the iterator

Returns
pointer to PepIterator
Exceptions
Exception::InvalidIteratorif iterator was not initialized

Implements PepIterator.

◆ operator=()

FastaIterator& operator= ( const FastaIterator )
private

Assignment.

◆ setFastaFile()

virtual void setFastaFile ( const String f)
virtual

setter for FASTAfile

Parameters
fName of the fasta file
Exceptions
Exception::FileNotFound
ParseErroris thrown if the file could not be parsed

Implements PepIterator.

◆ setSpectrum()

virtual void setSpectrum ( const std::vector< double > &  )
inlinevirtual

setter for spectrum

Note
note available for FastaIterator
Exceptions
Exception::NotImplemented

Implements PepIterator.

◆ setTolerance()

virtual void setTolerance ( double  )
inlinevirtual

setter for tolerance

Note
note available for FastaIterator
Exceptions
Exception::NotImplemented

Implements PepIterator.

Member Data Documentation

◆ actual_seq_

std::string actual_seq_
protected

actual sequence

◆ fasta_file_

String fasta_file_
protected

fasta file location

◆ header_

std::string header_
protected

actual fasta header

◆ input_file_

std::ifstream input_file_
protected

input file

◆ is_at_end_

bool is_at_end_
protected

bool indicated whether iterator is at end

◆ last_header_

std::string last_header_
protected

last fasta header


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:08 using doxygen 1.8.13