Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

PQBasicKey.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 
108 template<class T,class X, class Y> class PQNode;
109 
110 template<class T,class X,class Y>
111 class PQBasicKey: public PQBasicKeyRoot {
112 public:
114  PQBasicKey() : m_nodePointer(nullptr) { }
115 
136 
144  virtual std::ostream &print(std::ostream &os) { return os; }
145 
153  void setNodePointer(PQNode<T,X,Y>* pqNode) { m_nodePointer = pqNode; }
154 
156  virtual T userStructKey() = 0;
157 
159  virtual X userStructInfo() = 0;
160 
162  virtual Y userStructInternal() = 0;
163 
164 private:
169 };
170 
171 }
PQNode< T, X, Y > * nodePointer()
The function nodePointer() returns a pointer to an element of type PQNode.
Definition: PQBasicKey.h:135
PQNode< T, X, Y > * m_nodePointer
Stores the adress of a node.
Definition: PQBasicKey.h:168
The class PQBasicKeyRoot is used as a base class of the class template basicKey.
virtual T userStructKey()=0
Returns the key of a leaf.
virtual X userStructInfo()=0
Returns the information of any node.
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:144
PQBasicKey()
Constructor.
Definition: PQBasicKey.h:114
Declaration and implementation of the class PQBasicKeyRoot.
The class template PQBasicKey is an abstract base class.
Definition: PQBasicKey.h:108
void setNodePointer(PQNode< T, X, Y > *pqNode)
The function setNodePointer() sets the private member m_nodePointer.
Definition: PQBasicKey.h:153
The namespace for all OGDF objects.
virtual Y userStructInternal()=0
Returns the information of any internal node.