Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / internal / planarity / PQNodeKey.h
blob32116c8353d5ae7f844e3704058c9e7870ea166c
1 /*
2 * $Revision: 2564 $
4 * last checkin:
5 * $Author: gutwenger $
6 * $Date: 2012-07-07 00:03:48 +0200 (Sa, 07. Jul 2012) $
7 ***************************************************************/
9 /** \file
10 * \brief Declaration and implementation of the class PQNodeKey.
12 * \author Sebastian Leipert
14 * \par License:
15 * This file is part of the Open Graph Drawing Framework (OGDF).
17 * \par
18 * Copyright (C)<br>
19 * See README.txt in the root directory of the OGDF installation for details.
21 * \par
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * Version 2 or 3 as published by the Free Software Foundation;
25 * see the file LICENSE.txt included in the packaging of this file
26 * for details.
28 * \par
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
34 * \par
35 * You should have received a copy of the GNU General Public
36 * License along with this program; if not, write to the Free
37 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
38 * Boston, MA 02110-1301, USA.
40 * \see http://www.gnu.org/copyleft/gpl.html
41 ***************************************************************/
44 #ifdef _MSC_VER
45 #pragma once
46 #endif
49 #ifndef OGDF_PQ_NODE_KEY_H
50 #define OGDF_PQ_NODE_KEY_H
54 #include <stdlib.h>
55 #include <ogdf/internal/planarity/PQBasicKey.h>
57 namespace ogdf {
60 template<class T,class X,class Y> class PQNode;
62 /**
63 * The class template PQNodeKey is a derived class of class template
64 * PQBasicKey. PQNodeKey is a concrete class.
65 * It is constructed to store any kind of information of nodes of the
66 * PQ-tree. It may be used for both internal nodes as well as leaves.
68 * The information is stored in \a m_userStructInfo and
69 * is assigned to a unique node in the PQ-tree. This
70 * unique node can be identified with the \a m_nodePointer of the
71 * astract base class PQBasicKey. The
72 * maintainance of this pointer is left to the user. By keeping the
73 * responsibillity by the user, nodes with certain informations can
74 * be identified and accessed by her in constant time. This makes
75 * the adaption of algorithms fast and easy.
78 template<class T,class X,class Y>
79 class PQNodeKey : public PQBasicKey<T,X,Y>
81 public:
83 //! Stores the information. Has to be overloaded by the client.
84 X m_userStructInfo;
86 // Constructor
87 PQNodeKey(X info):PQBasicKey<T,X,Y>() { m_userStructInfo = info; }
89 // Destructor
90 virtual ~PQNodeKey() { }
92 //! Returns 0.
93 virtual T userStructKey() { return 0; }
95 //! Returns \a m_userStructInfo.
96 virtual X userStructInfo() { return m_userStructInfo; }
98 //! Returns 0.
99 virtual Y userStructInternal() { return 0; }
104 #endif