5 #ifndef BPP_SEQ_SEQUENCEPOSITIONITERATORS_H
6 #define BPP_SEQ_SEQUENCEPOSITIONITERATORS_H
Partial implementation of the SequencePositionIterator interface.
AbstractSequencePositionIterator(const AbstractSequencePositionIterator &aspi)
bool operator==(const SequencePositionIterator &it) const
AbstractSequencePositionIterator & operator=(const AbstractSequencePositionIterator &aspi)
unsigned int getPosition() const
Get the actual position of the iterator in the Sequence.
bool operator!=(const SequencePositionIterator &it) const
int getValue() const
Get the numerical value of the Sequence at current position.
const Sequence & getSequence() const
Get the Sequence on which the iterator loops.
std::string getChar() const
Get the textual value of the Sequence at current position.
unsigned int currentPosition_
AbstractSequencePositionIterator(const Sequence &seq, unsigned int pos=0)
void setPosition(unsigned int pos)
Set the position of the iterator.
const Sequence * sequence_
virtual ~AbstractSequencePositionIterator()
virtual bool hasMorePositions() const =0
Tells if there is more positions in the Sequence.
virtual int getValue() const =0
Get the numerical value of the Sequence at current position.
virtual SequencePositionIterator & operator+=(int i)=0
SequencePositionIterator()
virtual SequencePositionIterator & operator-=(int i)=0
virtual ~SequencePositionIterator()
virtual SequencePositionIterator & operator++()=0
virtual bool operator!=(const SequencePositionIterator &it) const =0
virtual const Sequence & getSequence() const =0
Get the Sequence on which the iterator loops.
virtual unsigned int getPosition() const =0
Get the actual position of the iterator in the Sequence.
virtual bool operator==(const SequencePositionIterator &it) const =0
virtual std::string getChar() const =0
Get the textual value of the Sequence at current position.
virtual void setPosition(unsigned int pos)=0
Set the position of the iterator.
A basic implementation of the Sequence interface.
Loop over all positions in a Sequence.
SimpleSequencePositionIterator & operator++()
bool hasMorePositions() const
Tells if there is more positions in the Sequence.
SimpleSequencePositionIterator & operator+=(int i)
virtual SimpleSequencePositionIterator operator-(int i) const
SimpleSequencePositionIterator & operator-=(int i)
SimpleSequencePositionIterator(const Sequence &seq, unsigned int pos=0)
General constructor.
virtual ~SimpleSequencePositionIterator()
virtual SimpleSequencePositionIterator operator+(int i) const
This alphabet is used to deal NumericAlphabet.