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;
77 typedef typename GraphVisitor::Node
Node;
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 & operator=(const GraphVisitorRange &other)
GraphVisitorRange(const GraphVisitorRange &other)
GenericConstIterator< VertexAccessor > VertexConstIterator
ConstIterator begin() const
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 ATu0v1< TKSpace, TLinearAlgebra > &object)
Accessor::pointer pointer
GenericConstIterator(const Self &other)
Accessor::value value_type
bool operator==(const Self &other) const
Self & operator=(const Self &other)
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)
Accessor::reference reference
static reference get(const Node &node)
static reference get(const Node &node)
HalfEdgeDataStructure::Size Size