Open
Graph Drawing
Framework

 v.2012.05
 

HierarchyLayoutModule.h
Go to the documentation of this file.
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  
00044 #ifdef _MSC_VER
00045 #pragma once
00046 #endif
00047 
00048 #ifndef OGDF_HIER_LAYOUT_MODULE_H
00049 #define OGDF_HIER_LAYOUT_MODULE_H
00050 
00051 
00052 
00053 #include <ogdf/layered/Hierarchy.h>
00054 #include <ogdf/basic/GraphCopyAttributes.h>
00055 
00056 
00057 namespace ogdf {
00058 
00059 
00065 class OGDF_EXPORT HierarchyLayoutModule {
00066 public:
00068     HierarchyLayoutModule() { }
00069 
00070     virtual ~HierarchyLayoutModule() { }
00071 
00077     void call(const Hierarchy& H, GraphAttributes &AG) {
00078         GraphCopyAttributes AGC(H,AG);
00079         doCall(H,AGC);      
00080         AGC.transform();
00081     }
00082 
00088     //void call(Hierarchy& H, GraphAttributes &AG) {
00089     //  GraphCopyAttributes AGC(H,AG);
00090     //  doCall(H,AGC);
00091     //  HierarchyLayoutModule::dynLayerDistance(AGC, H);
00092     //  HierarchyLayoutModule::addBends(AGC, H);
00093     //  AGC.transform();
00094     //}
00095 
00096 
00103     //void call(const Hierarchy& H, GraphAttributes &, GraphCopyAttributes &AGC) {      
00104     //  doCall(H,AGC);
00105     //}
00106 
00107 
00108     static void addBends(GraphCopyAttributes &AGC, Hierarchy &H);
00109 
00110     static void dynLayerDistance(GraphCopyAttributes &AGC, Hierarchy &H);
00111 
00112 private:
00113     
00115     static void overlap(GraphCopyAttributes &AGC, Hierarchy &H, node s, node t, int i, int &ci, int &cj);
00116     
00117 protected:
00126     virtual void doCall(const Hierarchy& H, GraphCopyAttributes &AGC) = 0;
00127 
00128     OGDF_MALLOC_NEW_DELETE
00129 
00130 };
00131 
00132 
00133 } // end namespace ogdf
00134 
00135 
00136 #endif