OpenMS
NASequence::ConstIterator Class Reference

ConstIterator of NASequence class. More...

#include <OpenMS/CHEMISTRY/NASequence.h>

Collaboration diagram for NASequence::ConstIterator:
[legend]

Public Types

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

Public Member Functions

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

Operators

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

Detailed Description

ConstIterator 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

◆ iterator_category

typedef std::random_access_iterator_tag iterator_category

◆ pointer

typedef const value_type* pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ ConstIterator() [1/4]

ConstIterator ( )
default

default constructor

◆ ConstIterator() [2/4]

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

detailed constructor with pointer to the vector and offset position

◆ ConstIterator() [3/4]

ConstIterator ( const ConstIterator rhs)
inline

copy constructor

◆ ConstIterator() [4/4]

ConstIterator ( const NASequence::Iterator rhs)
inline

copy constructor from Iterator

◆ ~ConstIterator()

virtual ~ConstIterator ( )
inlinevirtual

destructor

Member Function Documentation

◆ operator!=()

bool operator!= ( const ConstIterator rhs) const
inline

inequality operator

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

◆ operator*()

const_reference operator* ( ) const
inline

dereference operator

◆ operator+()

const ConstIterator operator+ ( difference_type  diff) const
inline

forward jump operator

◆ operator++()

ConstIterator& operator++ ( )
inline

increment operator

◆ operator-() [1/2]

difference_type operator- ( ConstIterator  rhs) const
inline

◆ operator-() [2/2]

const ConstIterator operator- ( difference_type  diff) const
inline

backward jump operator

◆ operator--()

ConstIterator& operator-- ( )
inline

decrement operator

◆ operator->()

const_pointer operator-> ( ) const
inline

dereference operator

◆ operator=()

ConstIterator& operator= ( const ConstIterator rhs)
inline

◆ operator==()

bool operator== ( const ConstIterator rhs) const
inline

Member Data Documentation

◆ position_

◆ vector_

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