60 this->currentPosition_ = pos;
66 return * (this->sequence_);
72 return this->currentPosition_;
78 return this->sequence_->getValue(this->currentPosition_);
84 return this->sequence_->getChar(this->currentPosition_);
117 unsigned int d =
static_cast<unsigned int>(-i);
119 throw Exception(
"SimpleSequencePositionIterator::operator+=. Negative increment too large.");
129 return (*
this) += -i;
143 return (*
this) + (- i);
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.
SimpleSequencePositionIterator(const Sequence &seq, unsigned int pos=0)
General constructor.
This alphabet is used to deal NumericAlphabet.
virtual SimpleSequencePositionIterator operator-(int i) const
SimpleSequencePositionIterator & operator+=(int i)
std::string getChar() const
Get the textual value of the Sequence at current position.
void setPosition(unsigned int pos)
Set the position of the iterator.
bool hasMorePositions() const
Tells if there is more positions in the Sequence.
SimpleSequencePositionIterator & operator++()
SimpleSequencePositionIterator & operator-=(int i)
const Sequence & getSequence() const
Get the Sequence on which the iterator loops.
virtual SimpleSequencePositionIterator operator+(int i) const
bool operator!=(const SequencePositionIterator &it) const
Loop over all positions in a Sequence.
Partial implementation of the SequencePositionIterator interface.
virtual unsigned int getPosition() const =0
Get the actual position of the iterator in the Sequence.