00001 /* 00002 * $Revision: 2299 $ 00003 * 00004 * last checkin: 00005 * $Author: gutwenger $ 00006 * $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 00007 ***************************************************************/ 00008 00043 #ifdef _MSC_VER 00044 #pragma once 00045 #endif 00046 00047 #ifndef OGDF_LAYOUT_H 00048 #define OGDF_LAYOUT_H 00049 00050 00051 #include <ogdf/basic/GraphAttributes.h> 00052 00053 00054 namespace ogdf { 00055 00056 class OGDF_EXPORT GraphCopy; 00057 class OGDF_EXPORT PlanRep; 00058 00059 00065 class OGDF_EXPORT Layout 00066 { 00067 public: 00071 Layout() { } 00072 00081 Layout(const Graph &G) : m_x(G,0), m_y(G,0), m_bends(G) { } 00082 00083 // destruction 00084 ~Layout() { } 00085 00086 00090 const NodeArray<double> &x() const { return m_x; } 00091 00095 NodeArray<double> &x() { return m_x; } 00096 00100 const NodeArray<double> &y() const { return m_y; } 00101 00105 NodeArray<double> &y() { return m_y; } 00106 00107 00111 const double &x(node v) const { return m_x[v]; } 00112 00116 double &x(node v) { return m_x[v]; } 00117 00121 const double &y(node v) const { return m_y[v]; } 00122 00126 double &y(node v) { return m_y[v]; } 00127 00131 const DPolyline &bends(edge e) const { return m_bends[e]; } 00132 00136 DPolyline &bends(edge e) { return m_bends[e]; } 00137 00138 00146 void computePolyline(GraphCopy &GC, edge eOrig, DPolyline &dpl) const; 00147 00160 void computePolylineClear(PlanRep &PG, edge eOrig, DPolyline &dpl); 00161 00164 private: 00165 NodeArray<double> m_x; 00166 NodeArray<double> m_y; 00167 EdgeArray<DPolyline> m_bends; 00168 00169 OGDF_MALLOC_NEW_DELETE 00170 }; 00171 00172 00173 } // end namespace ogdf 00174 00175 #endif