#include <ogdf/basic/pqtree/PQBasicKey.h>
Public Member Functions | |
PQBasicKey () | |
Constructor. More... | |
PQNode< T, X, Y > * | nodePointer () |
The function nodePointer() returns a pointer to an element of type PQNode. More... | |
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 the information stored at any of the derived classes. More... | |
void | setNodePointer (PQNode< T, X, Y > *pqNode) |
The function setNodePointer() sets the private member m_nodePointer. More... | |
virtual X | userStructInfo ()=0 |
Returns the information of any node. More... | |
virtual Y | userStructInternal ()=0 |
Returns the information of any internal node. More... | |
virtual T | userStructKey ()=0 |
Returns the key of a leaf. More... | |
Public Member Functions inherited from ogdf::PQBasicKeyRoot | |
PQBasicKeyRoot () | |
~PQBasicKeyRoot () | |
Private Attributes | |
PQNode< T, X, Y > * | m_nodePointer |
Stores the adress of a node. More... | |
Definition at line 114 of file PQBasicKey.h.
|
inline |
Constructor.
Definition at line 117 of file PQBasicKey.h.
|
inline |
The function nodePointer() returns a pointer to an element of type PQNode.
This element can be either of type leaf or PQInternalNode. PQBasicKey, or rather its derived classes store informations of this PQNode. The user is able identify with the help of this function for every information its corresponding node. Nevertheless, the private member m_nodePointer that stores the pointer to this member is not set within the PQ-tree, unless it is a derived class template of type leafKey.
Setting the m_nodePointer has to be done explicitly by the client with the help of the function setNodePointer(). This offers as much freedom to the client as possible, since this enables the client to keep control over the informations stored at different nodes and to access nodes with specified informations in constant time.
Definition at line 138 of file PQBasicKey.h.
|
inlinevirtual |
The function print() is a virtual function, that can be overloaded by the user in order to print out the information stored at any of the derived classes.
Deriving this function, the user can choose any format for printing out the information. Currently, the return value of the function print() is an empty string.
Definition at line 147 of file PQBasicKey.h.
|
inline |
The function setNodePointer() sets the private member m_nodePointer.
The private member m_nodePointer stores the address of the corresponding node in the PQTree. Using this function enables the client to identify certain informations with a node in the PQ-tree.
Definition at line 156 of file PQBasicKey.h.
|
pure virtual |
Returns the information of any node.
Implemented in ogdf::PQInternalKey< T, X, Y >.
|
pure virtual |
Returns the information of any internal node.
Implemented in ogdf::PQInternalKey< T, X, Y >.
|
pure virtual |
Returns the key of a leaf.
Implemented in ogdf::PQInternalKey< T, X, Y >.
|
private |
Stores the adress of a node.
This node has to be specified by the client via the function setNodePointer.
Definition at line 171 of file PQBasicKey.h.