bpp-seq3  3.0.0
bpp::SequencePositionIterator Class Referenceabstract

Loop over a Sequence. More...

#include <Bpp/Seq/SequencePositionIterators.h>

+ Inheritance diagram for bpp::SequencePositionIterator:

Public Member Functions

 SequencePositionIterator ()
 
virtual ~SequencePositionIterator ()
 
virtual unsigned int getPosition () const =0
 Get the actual position of the iterator in the Sequence. More...
 
virtual void setPosition (unsigned int pos)=0
 Set the position of the iterator. More...
 
virtual int getValue () const =0
 Get the numerical value of the Sequence at current position. More...
 
virtual std::string getChar () const =0
 Get the textual value of the Sequence at current position. More...
 
virtual bool operator== (const SequencePositionIterator &it) const =0
 
virtual bool operator!= (const SequencePositionIterator &it) const =0
 
virtual SequencePositionIteratoroperator+= (int i)=0
 
virtual SequencePositionIteratoroperator-= (int i)=0
 
virtual SequencePositionIteratoroperator++ ()=0
 
virtual bool hasMorePositions () const =0
 Tells if there is more positions in the Sequence. More...
 
virtual const SequencegetSequence () const =0
 Get the Sequence on which the iterator loops. More...
 

Detailed Description

Loop over a Sequence.

This is the SequencePositionIterator interface.

Author
Sylvain Gaillard

Definition at line 23 of file SequencePositionIterators.h.

Constructor & Destructor Documentation

◆ SequencePositionIterator()

bpp::SequencePositionIterator::SequencePositionIterator ( )
inline

Definition at line 26 of file SequencePositionIterators.h.

◆ ~SequencePositionIterator()

virtual bpp::SequencePositionIterator::~SequencePositionIterator ( )
inlinevirtual

Definition at line 27 of file SequencePositionIterators.h.

Member Function Documentation

◆ getChar()

virtual std::string bpp::SequencePositionIterator::getChar ( ) const
pure virtual

Get the textual value of the Sequence at current position.

Implemented in bpp::AbstractSequencePositionIterator.

◆ getPosition()

virtual unsigned int bpp::SequencePositionIterator::getPosition ( ) const
pure virtual

◆ getSequence()

virtual const Sequence& bpp::SequencePositionIterator::getSequence ( ) const
pure virtual

Get the Sequence on which the iterator loops.

Returns
A reference toward the Sequence object.

Implemented in bpp::AbstractSequencePositionIterator.

◆ getValue()

virtual int bpp::SequencePositionIterator::getValue ( ) const
pure virtual

Get the numerical value of the Sequence at current position.

Implemented in bpp::AbstractSequencePositionIterator.

◆ hasMorePositions()

virtual bool bpp::SequencePositionIterator::hasMorePositions ( ) const
pure virtual

Tells if there is more positions in the Sequence.

Returns
true if there is more positions in the Sequence

Implemented in bpp::SimpleSequencePositionIterator.

◆ operator!=()

virtual bool bpp::SequencePositionIterator::operator!= ( const SequencePositionIterator it) const
pure virtual

◆ operator++()

virtual SequencePositionIterator& bpp::SequencePositionIterator::operator++ ( )
pure virtual

◆ operator+=()

virtual SequencePositionIterator& bpp::SequencePositionIterator::operator+= ( int  i)
pure virtual

◆ operator-=()

virtual SequencePositionIterator& bpp::SequencePositionIterator::operator-= ( int  i)
pure virtual

◆ operator==()

virtual bool bpp::SequencePositionIterator::operator== ( const SequencePositionIterator it) const
pure virtual

◆ setPosition()

virtual void bpp::SequencePositionIterator::setPosition ( unsigned int  pos)
pure virtual

Set the position of the iterator.

Parameters
posThe position on the Sequence

Implemented in bpp::AbstractSequencePositionIterator.


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