Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
46namespace ogdf {
47
48// HypergraphObserver
49class OGDF_EXPORT HypergraphObserver : public Observer<Hypergraph, HypergraphObserver> {
50public:
52 HypergraphObserver() = default;
53
55 OGDF_DEPRECATED("calls registrationChanged with only partially-constructed child classes, "
56 "see copy constructor of Observer for fix")
57
58 explicit HypergraphObserver(const Hypergraph* pH) { reregister(pH); }
59
61 OGDF_DEPRECATED("reregister() should be used instead.")
62
63 void init(const Hypergraph* pH) { reregister(pH); }
64
66 virtual void hypernodeDeleted(hypernode v) = 0;
67
69 virtual void hypernodeAdded(hypernode v) = 0;
70
72 virtual void hyperedgeDeleted(hyperedge e) = 0;
73
75 virtual void hyperedgeAdded(hyperedge e) = 0;
76
78 virtual void cleared() = 0;
79
81 const Hypergraph* hypergraph() const { return getObserved(); }
82};
83
84}
Declaration and a partial implementation of a Hypergraph class partly based on the original classes f...
Simple, safe base classes for C++ observables and observers.
Basic declarations, included by all source files.
Class for the representation of hyperedges.
Definition Hypergraph.h:148
virtual void hyperedgeDeleted(hyperedge e)=0
Called by an observed hypergraph when a hyperedge is deleted.
virtual void hypernodeDeleted(hypernode v)=0
Called by an observed hypergraph when a hypernode is deleted.
virtual void hyperedgeAdded(hyperedge e)=0
Called by an observed hypergraph when a hyperedge is added.
virtual void cleared()=0
Called by the observed hypergraph when it is cleared.
const Hypergraph * hypergraph() const
Returns the observer hypergraph.
virtual void hypernodeAdded(hypernode v)=0
Called by an observed hypergraph when a hypernode is added.
HypergraphObserver()=default
Constructor.
Class for the representation of hypernodes.
Definition Hypergraph.h:228
Base class for an observer for a single Observable object.
Definition Observer.h:53
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
#define OGDF_DEPRECATED(reason)
Mark a class / member / function as deprecated.
Definition config.h:206
The namespace for all OGDF objects.