Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PQBasicKey.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 #include <iosfwd>
37 
38 namespace ogdf {
39 
110 template<class T, class X, class Y>
111 class PQNode;
112 
113 template<class T, class X, class Y>
114 class PQBasicKey : public PQBasicKeyRoot {
115 public:
117  PQBasicKey() : m_nodePointer(nullptr) { }
118 
139 
147  virtual std::ostream& print(std::ostream& os) { return os; }
148 
156  void setNodePointer(PQNode<T, X, Y>* pqNode) { m_nodePointer = pqNode; }
157 
159  virtual T userStructKey() = 0;
160 
162  virtual X userStructInfo() = 0;
163 
165  virtual Y userStructInternal() = 0;
166 
167 private:
172 };
173 
174 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::PQBasicKey::userStructInfo
virtual X userStructInfo()=0
Returns the information of any node.
ogdf::PQBasicKey::m_nodePointer
PQNode< T, X, Y > * m_nodePointer
Stores the adress of a node.
Definition: PQBasicKey.h:171
PQBasicKeyRoot.h
Declaration and implementation of the class PQBasicKeyRoot.
ogdf::PQBasicKey::setNodePointer
void setNodePointer(PQNode< T, X, Y > *pqNode)
The function setNodePointer() sets the private member m_nodePointer.
Definition: PQBasicKey.h:156
ogdf::PQBasicKey::userStructInternal
virtual Y userStructInternal()=0
Returns the information of any internal node.
ogdf::PQBasicKey::print
virtual std::ostream & print(std::ostream &os)
The function print() is a virtual function, that can be overloaded by the user in order to print out ...
Definition: PQBasicKey.h:147
ogdf::PQBasicKey::userStructKey
virtual T userStructKey()=0
Returns the key of a leaf.
ogdf::PQBasicKey::nodePointer
PQNode< T, X, Y > * nodePointer()
The function nodePointer() returns a pointer to an element of type PQNode.
Definition: PQBasicKey.h:138
ogdf::PQBasicKey::PQBasicKey
PQBasicKey()
Constructor.
Definition: PQBasicKey.h:117
ogdf::PQBasicKey
Definition: PQBasicKey.h:114
ogdf::PQBasicKeyRoot
The class PQBasicKeyRoot is used as a base class of the class template basicKey.
Definition: PQBasicKeyRoot.h:43
ogdf::PQNode
The class template PQBasicKey is an abstract base class.
Definition: PQBasicKey.h:111