Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

GraphCopyAttributes.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/GraphCopy.h>
37 
38 
39 namespace ogdf {
40 
47 
48  const GraphCopy *m_pGC;
51 
52 public:
53  // construction
55  m_pGC(&GC), m_pAG(&AG), m_x(GC,0), m_y(GC,0) { }
56 
59 
60  // returns width of node v
61  double getWidth(node v) const {
62  return (m_pGC->isDummy(v) ? 0.0 : m_pAG->width(m_pGC->original(v)));
63  }
64 
65  // returns height of node v
66  double getHeight(node v) const {
67  return (m_pGC->isDummy(v) ? 0.0 : m_pAG->height(m_pGC->original(v)));
68  }
69 
70  // returns reference to x-coord. of node v
71  const double &x(node v) const {
72  return m_x[v];
73  }
74 
75  // returns reference to x-coord. of node v
76  double &x(node v) {
77  return m_x[v];
78  }
79 
80  // returns reference to y-coord. of node v
81  const double &y(node v) const {
82  return m_y[v];
83  }
84 
85  // returns reference to y-coord. of node v
86  double &y(node v) {
87  return m_y[v];
88  }
89 
90  // sets attributes for the original graph in AG
91  void transform();
92 };
93 
94 
95 } // end namespace ogdf
double getWidth(node v) const
double width(node v) const
Returns the width of the bounding box of node v.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
double getHeight(node v) const
double height(node v) const
Returns the height of the bounding box of node v.
Helper class for accessing graph attributes from a copy of the graph.
Stores additional attributes of a graph (like layout information).
const double & x(node v) const
Declaration of graph copy classes.
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:250
Class for the representation of nodes.
Definition: Graph_d.h:167
const Graph & original() const
Returns a reference to the original graph.
Definition: GraphCopy.h:287
The namespace for all OGDF objects.
const double & y(node v) const
bool isDummy(node v) const
Returns true iff v has no corresponding node in the original graph.
Definition: GraphCopy.h:378
GraphCopyAttributes(const GraphCopy &GC, GraphAttributes &AG)