bpp-seq3
3.0.0
|
Loop over all positions in a Sequence. More...
#include <Bpp/Seq/SequencePositionIterators.h>
Public Member Functions | |
bool | hasMorePositions () const |
Tells if there is more positions in the Sequence. More... | |
unsigned int | getPosition () const |
Get the actual position of the iterator in the Sequence. More... | |
void | setPosition (unsigned int pos) |
Set the position of the iterator. More... | |
int | getValue () const |
Get the numerical value of the Sequence at current position. More... | |
std::string | getChar () const |
Get the textual value of the Sequence at current position. More... | |
const Sequence & | getSequence () const |
Get the Sequence on which the iterator loops. More... | |
Constructors and destructor | |
SimpleSequencePositionIterator (const Sequence &seq, unsigned int pos=0) | |
General constructor. More... | |
SimpleSequencePositionIterator (const SequencePositionIterator &it) | |
Copy constructor. More... | |
virtual | ~SimpleSequencePositionIterator () |
Operators | |
SimpleSequencePositionIterator & | operator++ () |
virtual SimpleSequencePositionIterator | operator++ (int i) |
SimpleSequencePositionIterator & | operator+= (int i) |
SimpleSequencePositionIterator & | operator-= (int i) |
virtual SimpleSequencePositionIterator | operator+ (int i) const |
virtual SimpleSequencePositionIterator | operator- (int i) const |
Comparison operators | |
bool | operator== (const SequencePositionIterator &it) const |
bool | operator!= (const SequencePositionIterator &it) const |
Private Attributes | |
const Sequence * | sequence_ |
unsigned int | currentPosition_ |
Loop over all positions in a Sequence.
This is the simplest implementation of SequencePositionIterator. It just loops over all positions of a Sequence.
Definition at line 126 of file SequencePositionIterators.h.
|
inline |
General constructor.
seq | A reference toward the Sequence object we want to loop over |
pos | Optional integer where to start on the Sequence object |
Definition at line 143 of file SequencePositionIterators.h.
SimpleSequencePositionIterator::SimpleSequencePositionIterator | ( | const SequencePositionIterator & | it | ) |
Copy constructor.
it | A reference toward a SequencePositionIterator |
Definition at line 65 of file SequencePositionIterators.cpp.
|
inlinevirtual |
Definition at line 151 of file SequencePositionIterators.h.
|
virtualinherited |
Get the textual value of the Sequence at current position.
Implements bpp::SequencePositionIterator.
Definition at line 54 of file SequencePositionIterators.cpp.
|
virtualinherited |
Get the actual position of the iterator in the Sequence.
Implements bpp::SequencePositionIterator.
Definition at line 40 of file SequencePositionIterators.cpp.
Referenced by hasMorePositions(), operator++(), and operator+=().
|
virtualinherited |
Get the Sequence on which the iterator loops.
Implements bpp::SequencePositionIterator.
Definition at line 33 of file SequencePositionIterators.cpp.
Referenced by hasMorePositions().
|
virtualinherited |
Get the numerical value of the Sequence at current position.
Implements bpp::SequencePositionIterator.
Definition at line 47 of file SequencePositionIterators.cpp.
|
virtual |
Tells if there is more positions in the Sequence.
Implements bpp::SequencePositionIterator.
Definition at line 127 of file SequencePositionIterators.cpp.
References bpp::AbstractSequencePositionIterator::getPosition(), bpp::AbstractSequencePositionIterator::getSequence(), and bpp::AbstractTemplateSymbolList< T >::size().
|
virtualinherited |
Implements bpp::SequencePositionIterator.
Definition at line 19 of file SequencePositionIterators.cpp.
References bpp::SequencePositionIterator::getPosition().
|
virtual |
Definition at line 111 of file SequencePositionIterators.cpp.
|
virtual |
Implements bpp::SequencePositionIterator.
Definition at line 70 of file SequencePositionIterators.cpp.
References bpp::AbstractSequencePositionIterator::getPosition(), and bpp::AbstractSequencePositionIterator::setPosition().
|
virtual |
Definition at line 78 of file SequencePositionIterators.cpp.
|
virtual |
Implements bpp::SequencePositionIterator.
Definition at line 87 of file SequencePositionIterators.cpp.
References bpp::AbstractSequencePositionIterator::getPosition(), and bpp::AbstractSequencePositionIterator::setPosition().
|
virtual |
Definition at line 120 of file SequencePositionIterators.cpp.
|
virtual |
Implements bpp::SequencePositionIterator.
Definition at line 104 of file SequencePositionIterators.cpp.
|
virtualinherited |
Implements bpp::SequencePositionIterator.
Definition at line 12 of file SequencePositionIterators.cpp.
References bpp::SequencePositionIterator::getPosition().
|
virtualinherited |
Set the position of the iterator.
pos | The position on the Sequence |
Implements bpp::SequencePositionIterator.
Definition at line 26 of file SequencePositionIterators.cpp.
Referenced by operator++(), and operator+=().
|
privateinherited |
Definition at line 76 of file SequencePositionIterators.h.
Referenced by bpp::AbstractSequencePositionIterator::operator=().
|
privateinherited |
Definition at line 75 of file SequencePositionIterators.h.
Referenced by bpp::AbstractSequencePositionIterator::operator=().