Open
Graph Drawing
Framework

 v.2010.10
 

LayoutPlanRepModule.h

Go to the documentation of this file.
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  
00054 #ifdef _MSC_VER
00055 #pragma once
00056 #endif
00057 
00058 #ifndef OGDF_UML_PLANAR_LAYOUT_MODULE_H
00059 #define OGDF_UML_PLANAR_LAYOUT_MODULE_H
00060 
00061 
00062 
00063 #include <ogdf/planarity/PlanRepUML.h>
00064 #include <ogdf/basic/Layout.h>
00065 
00066 
00067 
00068 namespace ogdf {
00069 
00070     
00071 enum UMLOpt {umlOpAlign = 0x0001, umlOpScale = 0x0002, umlOpProg = 0x0004};
00072 
00073 
00079 class OGDF_EXPORT LayoutPlanRepModule {
00080 public:
00082     LayoutPlanRepModule() { }
00083 
00084     virtual ~LayoutPlanRepModule() { }
00085 
00093     virtual void call(PlanRepUML &PG,
00094         adjEntry adjExternal,
00095         Layout &drawing) = 0;
00096 
00098     void operator()(PlanRepUML &PG, adjEntry adjExternal, Layout &drawing) {
00099         call(PG,adjExternal,drawing);
00100     }
00101 
00103     const DPoint &getBoundingBox() const {
00104         return m_boundingBox;
00105     }
00106 
00108     virtual void setOptions(int /* optionField */) { } //don't make it abstract
00109 
00111     virtual int getOptions() { return 0; } //don't make it abstract
00112 
00114     virtual double separation() const = 0;
00115 
00117     virtual void separation(double sep) = 0;
00118 
00119 protected:
00124     DPoint m_boundingBox;
00125 
00131     void setBoundingBox(PlanRepUML &PG, Layout &drawing);
00132 
00133     OGDF_MALLOC_NEW_DELETE
00134 };
00135 
00136 
00137 } // end namespace ogdf
00138 
00139 
00140 #endif