31 #if defined(GraphVisitorRange_RECURSES)
32 #error Recursive header files inclusion detected in GraphVisitorRange.h
33 #else // defined(GraphVisitorRange_RECURSES)
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"
334 #endif // !defined GraphVisitorRange_h
336 #undef GraphVisitorRange_RECURSES
337 #endif // else defined(GraphVisitorRange_RECURSES)
ConstIterator begin() const
const typedef Node value_type
std::input_iterator_tag iterator_category
const typedef Vertex value_type
GraphVisitor::Graph Graph
Aim: Transforms a graph visitor into a single pass input range.
static reference get(const Node &node)
const typedef Vertex & reference
GenericConstIterator< TAccessor > Self
CountedPtr< GraphVisitor > myVisitor
A smart pointer on a graph visitor.
const typedef Vertex value
NodeConstIterator endNode() const
GraphVisitorRange & operator=(const GraphVisitorRange &other)
HalfEdgeDataStructure::Size Size
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Accessor::pointer pointer
TGraphVisitor GraphVisitor
const typedef Node * pointer
DGtal is the top-level namespace which contains all DGtal functions and types.
pointer operator->() const
GraphVisitor::Vertex Vertex
const typedef Vertex * pointer
std::ptrdiff_t difference_type
static reference get(const Node &node)
const typedef Node & reference
VertexConstIterator ConstIterator
void selfDisplay(std::ostream &out) const
reference operator*() const
GenericConstIterator< NodeAccessor > NodeConstIterator
Self & operator=(const Self &other)
bool operator==(const Self &other) const
CountedPtr< GraphVisitor > myVisitor
Smart pointer to a Visitor.
bool operator!=(const Self &other) const
GenericConstIterator(const Self &other)
GenericConstIterator(CountedPtr< GraphVisitor > ptrV)
Accessor::reference reference
ConstIterator const_iterator
Accessor::value value_type
NodeConstIterator beginNode() const
ConstIterator end() const
GenericConstIterator< VertexAccessor > VertexConstIterator