Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::PQBasicKey< T, X, Y > Class Template Referenceabstract

#include <ogdf/basic/pqtree/PQBasicKey.h>

+ Inheritance diagram for ogdf::PQBasicKey< T, X, Y >:

Public Member Functions

 PQBasicKey ()
 Constructor.
 
PQNode< T, X, Y > * nodePointer ()
 The function nodePointer() returns a pointer to an element of type PQNode.
 
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.
 
void setNodePointer (PQNode< T, X, Y > *pqNode)
 The function setNodePointer() sets the private member m_nodePointer.
 
virtualuserStructInfo ()=0
 Returns the information of any node.
 
virtualuserStructInternal ()=0
 Returns the information of any internal node.
 
virtualuserStructKey ()=0
 Returns the key of a leaf.
 
- Public Member Functions inherited from ogdf::PQBasicKeyRoot
 PQBasicKeyRoot ()
 
 ~PQBasicKeyRoot ()
 

Private Attributes

PQNode< T, X, Y > * m_nodePointer
 Stores the adress of a node.
 

Detailed Description

template<class T, class X, class Y>
class ogdf::PQBasicKey< T, X, Y >

Definition at line 112 of file PQBasicKey.h.

Constructor & Destructor Documentation

◆ PQBasicKey()

template<class T , class X , class Y >
ogdf::PQBasicKey< T, X, Y >::PQBasicKey ( )
inline

Constructor.

Definition at line 115 of file PQBasicKey.h.

Member Function Documentation

◆ nodePointer()

template<class T , class X , class Y >
PQNode< T, X, Y > * ogdf::PQBasicKey< T, X, Y >::nodePointer ( )
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 136 of file PQBasicKey.h.

◆ print()

template<class T , class X , class Y >
virtual std::ostream & ogdf::PQBasicKey< T, X, Y >::print ( std::ostream &  os)
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.

Reimplemented in ogdf::booth_lueker::PlanarLeafKey< X >, and ogdf::booth_lueker::PlanarLeafKey< booth_lueker::IndInfo * >.

Definition at line 145 of file PQBasicKey.h.

◆ setNodePointer()

template<class T , class X , class Y >
void ogdf::PQBasicKey< T, X, Y >::setNodePointer ( PQNode< T, X, Y > *  pqNode)
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 154 of file PQBasicKey.h.

◆ userStructInfo()

◆ userStructInternal()

◆ userStructKey()

Member Data Documentation

◆ m_nodePointer

template<class T , class X , class Y >
PQNode<T, X, Y>* ogdf::PQBasicKey< T, X, Y >::m_nodePointer
private

Stores the adress of a node.

This node has to be specified by the client via the function setNodePointer.

Definition at line 169 of file PQBasicKey.h.


The documentation for this class was generated from the following file: