Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::Graph::InnerBasedIterator< T, isVertexInitialized > Class Template Reference

Templated iterator facade based on PrivateGraph to provide iterative access to atom indices and edge indices. More...

#include <Graph.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using difference_type = std::ptrdiff_t
 
using value_type = T
 
using pointer = T
 
using reference = T
 

Public Member Functions

 InnerBasedIterator (InnerBasedIterator &&other) noexcept
 
InnerBasedIteratoroperator= (InnerBasedIterator &&other) noexcept
 
 InnerBasedIterator (const InnerBasedIterator &other)
 
InnerBasedIteratoroperator= (const InnerBasedIterator &other)
 
template<bool Dependent = isVertexInitialized, std::enable_if_t<!Dependent, int > ...>
 InnerBasedIterator (const PrivateGraph &inner, bool begin)
 Construct an iterator from a graph and a boolean indicating begin/end. More...
 
template<bool Dependent = isVertexInitialized, std::enable_if_t< Dependent, int > ...>
 InnerBasedIterator (AtomIndex a, const PrivateGraph &inner, bool begin)
 Construct an iterator from an atom index, a graph and a boolean indicating begin/end. More...
 
InnerBasedIteratoroperator++ ()
 Prefix increment.
 
InnerBasedIterator operator++ (int)
 Postfix increment.
 
value_type operator* () const
 Dereference.
 
bool operator== (const InnerBasedIterator &other) const
 Comparison operator.
 
bool operator!= (const InnerBasedIterator &other) const
 Inverts. More...
 

Private Attributes

std::unique_ptr< Impl > pImpl_
 

Detailed Description

template<typename T, bool isVertexInitialized>
class Scine::Molassembler::Graph::InnerBasedIterator< T, isVertexInitialized >

Templated iterator facade based on PrivateGraph to provide iterative access to atom indices and edge indices.

Template Parameters
TThe type the iterator should yield
isVertexInitializedWhether this iterator accepts an atom index in its constructor.
Note
Although this is templated, there is no implementation in the header in order to hide the underlying Boost Graph types from library consumers. The required template specializations for the type defintions below are supplied in GraphIterators.cpp. Any other instantiations will fail.

Constructor & Destructor Documentation

template<typename T , bool isVertexInitialized>
template<bool Dependent = isVertexInitialized, std::enable_if_t<!Dependent, int > ...>
Scine::Molassembler::Graph::InnerBasedIterator< T, isVertexInitialized >::InnerBasedIterator ( const PrivateGraph inner,
bool  begin 
)

Construct an iterator from a graph and a boolean indicating begin/end.

Parameters
innerThe PrivateGraph (wrapper around BGL Types)
beginWhether this iterator denotes a begin or end iterator
Note
This constructor is enabled if the template parameter isVertexInitialized is false
template<typename T , bool isVertexInitialized>
template<bool Dependent = isVertexInitialized, std::enable_if_t< Dependent, int > ...>
Scine::Molassembler::Graph::InnerBasedIterator< T, isVertexInitialized >::InnerBasedIterator ( AtomIndex  a,
const PrivateGraph inner,
bool  begin 
)

Construct an iterator from an atom index, a graph and a boolean indicating begin/end.

Parameters
aAn atom index around which adjacent vertices or incident edges are to be iterated over (depending on T)
innerThe PrivateGraph (wrapper around BGL Types)
beginWhether this iterator denotes a begin or end iterator
Note
This constructor is enabled if the template parameter isVertexInitialized is true

Member Function Documentation

template<typename T , bool isVertexInitialized>
bool Scine::Molassembler::Graph::InnerBasedIterator< T, isVertexInitialized >::operator!= ( const InnerBasedIterator< T, isVertexInitialized > &  other) const

Inverts.

See Also
operator ==

The documentation for this class was generated from the following file: