Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

PlanarLeafKey.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
36 
37 namespace ogdf {
38 namespace booth_lueker {
39 
40 template<class X>
41 class PlanarLeafKey : public PQLeafKey<edge,X,bool>
42 {
43 public:
44  explicit PlanarLeafKey(edge e) : PQLeafKey<edge,X,bool>(e) { }
45 
46  virtual ~PlanarLeafKey() { }
47 
48  ostream &print(ostream &os)
49  {
50  int sId = this->m_userStructKey->source()->index();
51  int tId = this->m_userStructKey->target()->index();
52 
53  os << " (" << sId << "," << tId << ")";
54 
55  return os;
56  }
57 };
58 
59 }
60 }
node target() const
Returns the target node of the edge.
Definition: Graph_d.h:327
Declaration and implementation of the class PQLeafKey.
ostream & print(ostream &os)
The function print() is a virtual function, that can be overloaded by the user in order to print out ...
Definition: PlanarLeafKey.h:48
Class for the representation of edges.
Definition: Graph_d.h:291
edge m_userStructKey
The m_userStructKey has to be overloaded by the client.
Definition: PQLeafKey.h:95
The class template PQLeafKey is a derived class of class template PQBasicKey.
Definition: PQLeafKey.h:86
Includes declaration of graph class.
int index() const
Returns the (unique) node index.
Definition: Graph_d.h:201
node source() const
Returns the source node of the edge.
Definition: Graph_d.h:325
The namespace for all OGDF objects.