OpenMS  2.7.0
Public Types | Friends | List of all members
NASequence::Iterator Class Reference

Iterator of NASequence class. More...

#include <OpenMS/CHEMISTRY/NASequence.h>

Collaboration diagram for NASequence::Iterator:
[legend]

Public Types

typedef Ribonucleotide value_type
 
typedef const value_typeconst_reference
 
typedef value_typereference
 
typedef const value_typeconst_pointer
 
typedef const value_typepointer
 
typedef std::vector< const value_type * >::difference_type difference_type
 

Public Member Functions

Constructors and destructors
 Iterator ()=default
 
 Iterator (std::vector< const Ribonucleotide * > *vec_ptr, difference_type position)
 detailed constructor with pointer to the vector and offset position More...
 
 Iterator (const Iterator &rhs)
 copy constructor More...
 
virtual ~Iterator ()
 destructor More...
 
Iteratoroperator= (const Iterator &rhs)
 assignment operator More...
 

Friends

class NASequence::ConstIterator
 

Operators

std::vector< const Ribonucleotide * > * vector_
 
difference_type position_
 
const_reference operator* () const
 dereference operator More...
 
const_pointer operator-> () const
 dereference operator More...
 
pointer operator-> ()
 mutable dereference operator More...
 
const Iterator operator+ (difference_type diff) const
 forward jump operator More...
 
difference_type operator- (Iterator rhs) const
 
const Iterator operator- (difference_type diff) const
 backward jump operator More...
 
bool operator== (const Iterator &rhs) const
 equality comparator More...
 
bool operator!= (const Iterator &rhs) const
 inequality operator More...
 
Iteratoroperator++ ()
 increment operator More...
 
Iteratoroperator-- ()
 decrement operator More...
 

Detailed Description

Iterator of NASequence class.

References to the pointers are returned dereferenced. So we don't need to write (*iterator)->getCode(), but can simply use iterator->getCode().

Member Typedef Documentation

◆ const_pointer

typedef const value_type* const_pointer

◆ const_reference

typedef const value_type& const_reference

◆ difference_type

typedef std::vector<const value_type*>::difference_type difference_type

◆ pointer

typedef const value_type* pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ Iterator() [1/3]

Iterator ( )
default

◆ Iterator() [2/3]

Iterator ( std::vector< const Ribonucleotide * > *  vec_ptr,
difference_type  position 
)
inline

detailed constructor with pointer to the vector and offset position

References seqan::position().

◆ Iterator() [3/3]

Iterator ( const Iterator rhs)
inline

copy constructor

◆ ~Iterator()

virtual ~Iterator ( )
inlinevirtual

destructor

Member Function Documentation

◆ operator!=()

bool operator!= ( const Iterator rhs) const
inline

inequality operator

References OpenMS::Internal::operator==().

◆ operator*()

const_reference operator* ( ) const
inline

dereference operator

◆ operator+()

const Iterator operator+ ( difference_type  diff) const
inline

forward jump operator

◆ operator++()

Iterator& operator++ ( )
inline

increment operator

◆ operator-() [1/2]

const Iterator operator- ( difference_type  diff) const
inline

backward jump operator

◆ operator-() [2/2]

difference_type operator- ( Iterator  rhs) const
inline

◆ operator--()

Iterator& operator-- ( )
inline

decrement operator

◆ operator->() [1/2]

pointer operator-> ( )
inline

mutable dereference operator

◆ operator->() [2/2]

const_pointer operator-> ( ) const
inline

dereference operator

◆ operator=()

Iterator& operator= ( const Iterator rhs)
inline

assignment operator

References NASequence::Iterator::position_, and NASequence::Iterator::vector_.

◆ operator==()

bool operator== ( const Iterator rhs) const
inline

equality comparator

References NASequence::Iterator::position_, and NASequence::Iterator::vector_.

Friends And Related Function Documentation

◆ NASequence::ConstIterator

friend class NASequence::ConstIterator
friend

Member Data Documentation

◆ position_

difference_type position_
protected

◆ vector_

std::vector<const Ribonucleotide*>* vector_
protected