00001 /* 00002 * $Revision: 2027 $ 00003 * 00004 * last checkin: 00005 * $Author: gutwenger $ 00006 * $Date: 2010-09-01 11:55:17 +0200 (Wed, 01 Sep 2010) $ 00007 ***************************************************************/ 00008 00053 #ifdef _MSC_VER 00054 #pragma once 00055 #endif 00056 00057 #ifndef OGDF_LAYOUT_H 00058 #define OGDF_LAYOUT_H 00059 00060 00061 #include <ogdf/basic/GraphAttributes.h> 00062 00063 00064 namespace ogdf { 00065 00066 class OGDF_EXPORT GraphCopy; 00067 class OGDF_EXPORT PlanRep; 00068 00069 00075 class OGDF_EXPORT Layout 00076 { 00077 public: 00081 Layout() { } 00082 00091 Layout(const Graph &G) : m_x(G,0), m_y(G,0), m_bends(G) { } 00092 00093 // destruction 00094 ~Layout() { } 00095 00096 00100 const NodeArray<double> &x() const { return m_x; } 00101 00105 NodeArray<double> &x() { return m_x; } 00106 00110 const NodeArray<double> &y() const { return m_y; } 00111 00115 NodeArray<double> &y() { return m_y; } 00116 00117 00121 const double &x(node v) const { return m_x[v]; } 00122 00126 double &x(node v) { return m_x[v]; } 00127 00131 const double &y(node v) const { return m_y[v]; } 00132 00136 double &y(node v) { return m_y[v]; } 00137 00141 const DPolyline &bends(edge e) const { return m_bends[e]; } 00142 00146 DPolyline &bends(edge e) { return m_bends[e]; } 00147 00148 00156 void computePolyline(GraphCopy &GC, edge eOrig, DPolyline &dpl) const; 00157 00170 void computePolylineClear(PlanRep &PG, edge eOrig, DPolyline &dpl); 00171 00174 private: 00175 NodeArray<double> m_x; 00176 NodeArray<double> m_y; 00177 EdgeArray<DPolyline> m_bends; 00178 00179 OGDF_MALLOC_NEW_DELETE 00180 }; 00181 00182 00183 } // end namespace ogdf 00184 00185 #endif