Open
Graph Drawing
Framework

 v.2012.05
 

UpwardEdgeInserterModule.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  
00040 #ifdef _MSC_VER
00041 #pragma once
00042 #endif
00043 
00044 #ifndef OGDF_UPWARD_EDGE_INSERTER_MODULE_H
00045 #define OGDF_UPWARD_EDGE_INSERTER_MODULE_H
00046 
00047 
00048 #include <ogdf/upward/UpwardPlanRep.h>
00049 #include <ogdf/basic/Module.h>
00050 
00051 
00052 namespace ogdf {
00053 
00054 
00055 class OGDF_EXPORT UpwardEdgeInserterModule : public Module{
00056 public:
00057     
00058 
00060     UpwardEdgeInserterModule() { }
00061 
00062     // destruction
00063     virtual ~UpwardEdgeInserterModule() { }
00064 
00073     ReturnType call(UpwardPlanRep &UPR, const List<edge> &origEdges) {
00074         return doCall(UPR, origEdges, 0, 0);
00075     }
00076 
00087     ReturnType call(UpwardPlanRep &UPR,
00088         const EdgeArray<int> &costOrig,
00089         const List<edge> &origEdges)
00090     {
00091         return doCall(UPR, origEdges, &costOrig, 0);
00092     }
00093 
00094 
00106     ReturnType call(UpwardPlanRep &UPR,
00107         const EdgeArray<int>  &costOrig,
00108         const EdgeArray<bool> &forbidOriginal,
00109         const List<edge> &origEdges)
00110     {
00111         return doCall(UPR, origEdges, &costOrig, &forbidOriginal);
00112     }
00113 
00114 
00127     ReturnType call(UpwardPlanRep &UPR,
00128         const EdgeArray<bool> &forbidOriginal,
00129         const List<edge> &origEdges)
00130     {
00131         return doCall(UPR, origEdges, 0, &forbidOriginal);
00132     }
00133 
00134     
00135     
00136 
00137 
00138 protected:
00150     virtual ReturnType doCall(UpwardPlanRep &UPR,
00151         const List<edge> &origEdges,        
00152         const EdgeArray<int>  *costOrig,
00153         const EdgeArray<bool> *forbiddenEdgeOrig
00154         ) = 0;
00155 
00156 
00157     OGDF_MALLOC_NEW_DELETE
00158 };
00159 
00160 } // end namespace ogdf
00161 
00162 #endif