Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PQBasicKey.h
Go to the documentation of this file.
1
32#pragma once
33
35
36#include <iosfwd>
37
38namespace ogdf {
39
110template<class T, class X, class Y>
111class PQNode;
112
113template<class T, class X, class Y>
115public:
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
167private:
172};
173
174}
Declaration and implementation of the class PQBasicKeyRoot.
PQNode< T, X, Y > * m_nodePointer
Stores the adress of a node.
Definition PQBasicKey.h:171
void setNodePointer(PQNode< T, X, Y > *pqNode)
The function setNodePointer() sets the private member m_nodePointer.
Definition PQBasicKey.h:156
virtual X userStructInfo()=0
Returns the information of any node.
PQBasicKey()
Constructor.
Definition PQBasicKey.h:117
virtual Y userStructInternal()=0
Returns the information of any internal node.
virtual T userStructKey()=0
Returns the key of a leaf.
PQNode< T, X, Y > * nodePointer()
The function nodePointer() returns a pointer to an element of type PQNode.
Definition PQBasicKey.h:138
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
The class PQBasicKeyRoot is used as a base class of the class template basicKey.
The class template PQBasicKey is an abstract base class.
Definition PQNode.h:56
The namespace for all OGDF objects.