31#if defined(GraphVisitorRange_RECURSES)
32#error Recursive header files inclusion detected in GraphVisitorRange.h
35#define GraphVisitorRange_RECURSES
37#if !defined GraphVisitorRange_h
39#define GraphVisitorRange_h
44#include "DGtal/base/Common.h"
45#include "DGtal/base/CountedPtr.h"
70 template <
typename TGraphVisitor >
75 typedef typename GraphVisitor::Graph
Graph;
76 typedef typename GraphVisitor::Vertex
Vertex;
77 typedef typename GraphVisitor::Node
Node;
78 typedef typename GraphVisitor::Size
Size;
79 typedef typename GraphVisitor::Data
Data;
106 {
return node.first; }
116 template <
typename TAccessor>
145 if (
this != &other )
155 &&
"DGtal::GraphVisitorRange<>::GenericConstIterator<>::operator*(): you cannot dereferenced a null visitor (i.e. end()).");
156 return Accessor::get(
myVisitor->current() );
164 &&
"DGtal::GraphVisitorRange<>::GenericConstIterator<>::operator->(): you cannot dereferenced a null visitor (i.e. end()).");
165 return & Accessor::get(
operator*() );
320 template <
typename TGraphVisitor>
329#include "DGtal/graph/GraphVisitorRange.ih"
336#undef GraphVisitorRange_RECURSES
Aim: Transforms a graph visitor into a single pass input range.
VertexConstIterator ConstIterator
GraphVisitorRange(const GraphVisitorRange &other)
GenericConstIterator< VertexAccessor > VertexConstIterator
ConstIterator begin() const
GraphVisitorRange & operator=(const GraphVisitorRange &other)
CountedPtr< GraphVisitor > myVisitor
A smart pointer on a graph visitor.
GraphVisitor::Vertex Vertex
NodeConstIterator beginNode() const
GraphVisitorRange(GraphVisitor *visitorPtr)
NodeConstIterator endNode() const
TGraphVisitor GraphVisitor
ConstIterator const_iterator
void selfDisplay(std::ostream &out) const
GraphVisitor::Graph Graph
GenericConstIterator< NodeAccessor > NodeConstIterator
ConstIterator end() const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Accessor::pointer pointer
GenericConstIterator(const Self &other)
Accessor::value value_type
bool operator==(const Self &other) const
bool operator!=(const Self &other) const
pointer operator->() const
std::input_iterator_tag iterator_category
std::ptrdiff_t difference_type
reference operator*() const
CountedPtr< GraphVisitor > myVisitor
Smart pointer to a Visitor.
GenericConstIterator< TAccessor > Self
GenericConstIterator(CountedPtr< GraphVisitor > ptrV)
Self & operator=(const Self &other)
Accessor::reference reference
static reference get(const Node &node)
static reference get(const Node &node)