Open
Graph Drawing
Framework

 v.2012.05
 

ogdf::PQBasicKey< T, X, Y > Class Template Reference

#include <ogdf/internal/planarity/PQBasicKey.h>

Inheritance diagram for ogdf::PQBasicKey< T, X, Y >:
ogdf::PQBasicKeyRoot ogdf::PQInternalKey< T, X, Y > ogdf::PQLeafKey< T, X, Y > ogdf::PQNodeKey< T, X, Y > ogdf::PQLeafKey< edge, X, bool > ogdf::PQNodeKey< edge, indInfo *, bool > ogdf::PQNodeKey< edge, whaInfo *, bool > ogdf::PQNodeKey< edge, X, bool > ogdf::PQNodeKey< T, whaInfo *, Y >

List of all members.

Public Member Functions

 PQBasicKey ()
virtual ~PQBasicKey ()
PQNode< T, X, Y > * nodePointer ()
virtual const char * print ()
void setNodePointer (PQNode< T, X, Y > *node)
virtual T userStructKey ()=0
 Returns the key of a leaf.
virtual X userStructInfo ()=0
 Returns the information of any node.
virtual Y userStructInternal ()=0
 Returns the information of any internal node.

Protected Attributes

char * m_printString
 A pointer to a string that can be used within the function print()

Private Attributes

PQNode< T, X, Y > * m_nodePointer

Detailed Description

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

Definition at line 135 of file PQBasicKey.h.


Constructor & Destructor Documentation

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

Definition at line 140 of file PQBasicKey.h.

template<class T, class X, class Y>
virtual ogdf::PQBasicKey< T, X, Y >::~PQBasicKey ( ) [inline, virtual]

Definition at line 147 of file PQBasicKey.h.


Member Function Documentation

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 170 of file PQBasicKey.h.

template<class T, class X, class Y>
virtual const char* ogdf::PQBasicKey< T, X, Y >::print ( ) [inline, virtual]

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::whaKey, ogdf::embedKey, ogdf::PlanarLeafKey< X >, and ogdf::PlanarLeafKey< indInfo * >.

Definition at line 180 of file PQBasicKey.h.

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


Member Data Documentation

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 210 of file PQBasicKey.h.

template<class T, class X, class Y>
char* ogdf::PQBasicKey< T, X, Y >::m_printString [protected]

A pointer to a string that can be used within the function print()

Definition at line 203 of file PQBasicKey.h.


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