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 00042 #ifdef _MSC_VER 00043 #pragma once 00044 #endif 00045 00046 #ifndef OGDF_ACYCLIC_SUBGRAPH_MODULE_H 00047 #define OGDF_ACYCLIC_SUBGRAPH_MODULE_H 00048 00049 00050 00051 #include <ogdf/basic/Graph.h> 00052 00053 namespace ogdf { 00054 00060 class OGDF_EXPORT AcyclicSubgraphModule { 00061 public: 00063 AcyclicSubgraphModule() { } 00064 00065 // destruction 00066 virtual ~AcyclicSubgraphModule() { } 00067 00076 virtual void call(const Graph &G, List<edge> &arcSet) = 0; 00077 00084 void operator()(const Graph &G, List<edge> &arcSet) { 00085 call(G,arcSet); 00086 } 00087 00096 void callAndReverse(Graph &G, List<edge> &reversed); 00097 00098 // makes G acyclic (except for self-loops!) by reversing edges 00107 void callAndReverse(Graph &G); 00108 00109 // makes G acyclic by deleting edges 00116 void callAndDelete(Graph &G); 00117 00118 OGDF_MALLOC_NEW_DELETE 00119 }; 00120 00121 } // end namespace ogdf 00122 00123 #endif