Open
Graph Drawing
Framework

 v.2012.05
 

MixedModelCrossingsBeautifierModule.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_MIXED_MODEL_CROSSINGS_BEAUTIFIER_MODULE_H
00048 #define OGDF_MIXED_MODEL_CROSSINGS_BEAUTIFIER_MODULE_H
00049 
00050 
00051 
00052 #include <ogdf/planarity/PlanRep.h>
00053 #include <ogdf/basic/GridLayout.h>
00054 
00055 
00056 namespace ogdf {
00057 
00072 class OGDF_EXPORT MixedModelCrossingsBeautifierModule {
00073 public:
00075     MixedModelCrossingsBeautifierModule() { }
00076 
00077     // destruction
00078     virtual ~MixedModelCrossingsBeautifierModule() { }
00079 
00080 
00081     /*
00082      * \brief Calls the Mixed-Model crossings beautifier module for graph \a PG and grid layout \a gl.
00083      *
00084      * @param PG is the input graph.
00085      * @param gl is the grid layout of \a PG.
00086      */
00087     void call(const PlanRep &PG, GridLayout &gl);
00088 
00090     int numberOfCrossings() const {
00091         return m_nCrossings;
00092     }
00093 
00094 
00095 protected:
00103     virtual void doCall(const PlanRep &PG, GridLayout &gl, const List<node> &L) = 0;
00104 
00105 private:
00106     int m_nCrossings; 
00107 
00108     OGDF_MALLOC_NEW_DELETE
00109 };
00110 
00111 
00113 
00117 class MMDummyCrossingsBeautifier : public MixedModelCrossingsBeautifierModule
00118 {
00119 protected:
00121     void doCall(const PlanRep &, GridLayout &, const List<node> &) { }
00122 };
00123 
00124 
00125 } // end namespace ogdf
00126 
00127 #endif