Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

HypergraphObserver.h
Go to the documentation of this file.
1 
40 #pragma once
41 
42 #include <ogdf/basic/Observer.h>
43 #include <ogdf/basic/basic.h>
45 
46 namespace ogdf {
47 
48 // HypergraphObserver
49 class OGDF_EXPORT HypergraphObserver : public Observer<Hypergraph, HypergraphObserver> {
50 public:
52  HypergraphObserver() = default;
53 
55  explicit HypergraphObserver(const Hypergraph* pH) { reregister(pH); }
56 
58  OGDF_DEPRECATED("reregister() should be used instead.")
59 
60  void init(const Hypergraph* pH) { reregister(pH); }
61 
63  virtual void hypernodeDeleted(hypernode v) = 0;
64 
66  virtual void hypernodeAdded(hypernode v) = 0;
67 
69  virtual void hyperedgeDeleted(hyperedge e) = 0;
70 
72  virtual void hyperedgeAdded(hyperedge e) = 0;
73 
75  virtual void cleared() = 0;
76 
78  const Hypergraph* hypergraph() const { return getObserved(); }
79 };
80 
81 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
OGDF_DEPRECATED
#define OGDF_DEPRECATED(reason)
Mark a class / member / function as deprecated.
Definition: config.h:120
Observer.h
Simple, safe base classes for C++ observables and observers.
ogdf::HyperedgeElement
Class for the representation of hyperedges.
Definition: Hypergraph.h:146
Hypergraph.h
Declaration and a partial implementation of a Hypergraph class partly based on the original classes f...
ogdf::HypergraphObserver::HypergraphObserver
HypergraphObserver(const Hypergraph *pH)
Constructor assigning pH hypergraph to the observer.
Definition: HypergraphObserver.h:55
ogdf::HypergraphObserver::hypergraph
const Hypergraph * hypergraph() const
Returns the observer hypergraph.
Definition: HypergraphObserver.h:78
ogdf::graphics::init
void init()
Definition: graphics.h:450
ogdf::Observer
Base class for an observer for a single Observable object.
Definition: Observer.h:53
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::HypergraphObserver
Definition: HypergraphObserver.h:49
ogdf::Hypergraph
Definition: Hypergraph.h:409
ogdf::HypernodeElement
Class for the representation of hypernodes.
Definition: Hypergraph.h:226