aGrUM  0.16.0
diGraphListener.h
Go to the documentation of this file.
1 
28 #ifndef GUM_DIGRAPH_LISTENER_H
29 #define GUM_DIGRAPH_LISTENER_H
30 
32 #include <agrum/graphs/diGraph.h>
33 
34 namespace gum {
49  class DiGraphListener : public Listener {
50  public:
51  // ############################################################################
53  // ############################################################################
55 
57 
61  DiGraphListener(const DiGraph* g);
62 
65 
67 
68  // ############################################################################
70  // ############################################################################
72 
74 
76  virtual void whenNodeAdded(const void* src, NodeId id) = 0;
77 
79 
81  virtual void whenNodeDeleted(const void* src, NodeId id) = 0;
82 
84 
87  virtual void whenArcAdded(const void* src, NodeId from, NodeId to) = 0;
88 
90 
93  virtual void whenArcDeleted(const void* src, NodeId from, NodeId to) = 0;
94 
96 
97  protected:
100 
101  private:
103 
105 
107 
109  };
110 
111 } // namespace gum
112 
113 #ifndef GUM_NO_INLINE
115 #endif // GUM_NOINLINE
116 
117 #endif // GUM_DIGRAPH_LISTENER_H
Abstract Base class for all diGraph Listener.
DiGraphListener(const DiGraph *g)
default constructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual void whenArcAdded(const void *src, NodeId from, NodeId to)=0
the action to take when a new arc is inserted into the graph
virtual void whenNodeDeleted(const void *src, NodeId id)=0
the action to take when a node has just been removed from the graph
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
Base class for all oriented graphs.
Definition: diGraph.h:111
DiGraphListener & operator=(const DiGraphListener &d)
copy operator (for the moment, this operation is forbidden)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
~DiGraphListener()
destructor
virtual void whenNodeAdded(const void *src, NodeId id)=0
the action to take when a new node is inserted into the graph
DiGraph * _graph
the graph to listen to
virtual void whenArcDeleted(const void *src, NodeId from, NodeId to)=0
the action to take when an arc has just been removed from the graph
Size NodeId
Type for node ids.
Definition: graphElements.h:98
Every class who would catch signal from signaler should derive from Listener.
Definition: listener.h:74