Open
Graph Drawing
Framework

 v.2012.05
 

CCLayoutPackModule.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  
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046 
00047 #ifndef OGDF_CC_LAYOUT_PACK_MODULE_H
00048 #define OGDF_CC_LAYOUT_PACK_MODULE_H
00049 
00050 
00051 
00052 #include <ogdf/basic/GraphAttributes.h>
00053 
00054 
00055 
00056 namespace ogdf {
00057 
00058 
00065 class OGDF_EXPORT CCLayoutPackModule {
00066 public:
00068     CCLayoutPackModule() { }
00069 
00070     virtual ~CCLayoutPackModule() { }
00071 
00087     virtual void call(Array<DPoint> &box,
00088         Array<DPoint> &offset,
00089         double pageRatio = 1.0) = 0;
00090 
00103     void operator()(Array<DPoint> &box,
00104         Array<DPoint> &offset,
00105         double pageRatio = 1.0)
00106     {
00107         call(box,offset,pageRatio);
00108     }
00109 
00125     virtual void call(Array<IPoint> &box,
00126         Array<IPoint> &offset,
00127         double pageRatio = 1.0) = 0;
00128 
00141     void operator()(Array<IPoint> &box,
00142         Array<IPoint> &offset,
00143         double pageRatio = 1.0)
00144     {
00145         call(box,offset,pageRatio);
00146     }
00147 
00156     static bool checkOffsets(const Array<DPoint> &box,
00157         const Array<DPoint> &offset);
00158 
00167     static bool checkOffsets(const Array<IPoint> &box,
00168         const Array<IPoint> &offset);
00169 
00170 
00171     OGDF_MALLOC_NEW_DELETE
00172 
00173 private:
00181     template<class POINT>
00182     static bool checkOffsetsTP(
00183         const Array<POINT> &box,
00184         const Array<POINT> &offset);
00185 };
00186 
00187 
00188 } // end namespace ogdf
00189 
00190 
00191 #endif