Open
Graph Drawing
Framework

 v.2012.05
 

LayoutPlanRepModule.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_UML_PLANAR_LAYOUT_MODULE_H
00049 #define OGDF_UML_PLANAR_LAYOUT_MODULE_H
00050 
00051 
00052 
00053 #include <ogdf/planarity/PlanRepUML.h>
00054 #include <ogdf/basic/Layout.h>
00055 
00056 
00057 
00058 namespace ogdf {
00059 
00060     
00061 enum UMLOpt {umlOpAlign = 0x0001, umlOpScale = 0x0002, umlOpProg = 0x0004};
00062 
00063 
00069 class OGDF_EXPORT LayoutPlanRepModule {
00070 public:
00072     LayoutPlanRepModule() { }
00073 
00074     virtual ~LayoutPlanRepModule() { }
00075 
00083     virtual void call(PlanRepUML &PG,
00084         adjEntry adjExternal,
00085         Layout &drawing) = 0;
00086 
00088     void operator()(PlanRepUML &PG, adjEntry adjExternal, Layout &drawing) {
00089         call(PG,adjExternal,drawing);
00090     }
00091 
00093     const DPoint &getBoundingBox() const {
00094         return m_boundingBox;
00095     }
00096 
00098     virtual void setOptions(int /* optionField */) { } //don't make it abstract
00099 
00101     virtual int getOptions() { return 0; } //don't make it abstract
00102 
00104     virtual double separation() const = 0;
00105 
00107     virtual void separation(double sep) = 0;
00108 
00109 protected:
00114     DPoint m_boundingBox;
00115 
00121     void setBoundingBox(PlanRepUML &PG, Layout &drawing);
00122 
00123     OGDF_MALLOC_NEW_DELETE
00124 };
00125 
00126 
00127 } // end namespace ogdf
00128 
00129 
00130 #endif