21 #ifndef TULIP_GGRAPHITERATOR_H
22 #define TULIP_GGRAPHITERATOR_H
23 #include <tulip/Iterator.h>
24 #include <tulip/memorypool.h>
27 #include <tulip/MutableContainer.h>
28 #include <tulip/Observable.h>
29 #include <tulip/tulipconf.h>
32 #ifndef DOXYGEN_NOTFOR_DEVEL
39 class NodeIterator :
public Iterator<node> {
42 class EdgeIterator :
public Iterator<edge> {
46 class NodeIteratorObserver :
public NodeIterator,
public Observable {
49 void treatEvent(
const Event&);
52 class EdgeIteratorObserver :
public EdgeIterator,
public Observable {
55 void treatEvent(
const Event&);
60 class FactorNodeIterator
64 :
public NodeIteratorObserver
69 const MutableContainer<bool>& _filter;
71 FactorNodeIterator(
const Graph *sG,
const MutableContainer<bool>& filter):
72 _parentGraph(sG->getSuperGraph()),
77 class FactorEdgeIterator
81 :
public EdgeIteratorObserver
86 const MutableContainer<bool>& _filter;
88 FactorEdgeIterator(
const Graph *sG,
const MutableContainer<bool>& filter):
89 _parentGraph(sG->getSuperGraph()),
95 class SGraphNodeIterator:
public FactorNodeIterator,
public MemoryPool<SGraphNodeIterator> {
103 SGraphNodeIterator(
const Graph *sG,
const MutableContainer<bool>& filter,
105 ~SGraphNodeIterator();
113 class OutNodesIterator:
public FactorNodeIterator,
public MemoryPool<OutNodesIterator> {
120 OutNodesIterator(
const Graph *sG,
const MutableContainer<bool>& filter, node n);
127 class InNodesIterator:
public FactorNodeIterator,
public MemoryPool<InNodesIterator> {
134 InNodesIterator(
const Graph *sG,
const MutableContainer<bool>& filter ,node n);
141 class InOutNodesIterator:
public FactorNodeIterator,
public MemoryPool<InOutNodesIterator> {
149 InOutNodesIterator(
const Graph *sG,
const MutableContainer<bool>& filter,node n);
150 ~InOutNodesIterator();
156 class SGraphEdgeIterator:
public FactorEdgeIterator,
public MemoryPool<SGraphEdgeIterator> {
164 SGraphEdgeIterator(
const Graph *sG,
const MutableContainer<bool>& filter,
166 ~SGraphEdgeIterator();
174 class OutEdgesIterator:
public FactorEdgeIterator,
public MemoryPool<OutEdgesIterator> {
180 OutEdgesIterator(
const Graph *sG,
const MutableContainer<bool>& filter, node n);
189 class InEdgesIterator:
public FactorEdgeIterator,
public MemoryPool<InEdgesIterator> {
195 InEdgesIterator(
const Graph *sG,
const MutableContainer<bool>& filter,node n);
204 class InOutEdgesIterator:
public FactorEdgeIterator,
public MemoryPool<InOutEdgesIterator> {
210 InOutEdgesIterator(
const Graph *sG,
const MutableContainer<bool>& filter, node n);
211 ~InOutEdgesIterator();
221 class GraphImplNodeIterator
223 :
public NodeIterator,
public MemoryPool<GraphImplNodeIterator>
225 :
public NodeIteratorObserver
232 Iterator<node> *itId;
234 GraphImplNodeIterator(
const Graph *g, Iterator<node>* it);
235 ~GraphImplNodeIterator();
241 class GraphImplEdgeIterator
243 :
public EdgeIterator,
public MemoryPool<GraphImplEdgeIterator>
245 :
public EdgeIteratorObserver
252 Iterator<edge> *itId;
254 GraphImplEdgeIterator(
const Graph *g, Iterator<edge>* it);
255 ~GraphImplEdgeIterator();
262 #endif // DOXYGEN_NOTFOR_DEVEL