summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/source/OptimalRanking_script.h
blob: f35fc67da799c7518d1e8f01944835ce0c6299ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <pgf/gd/ogdf/c/InterfaceFromOGDF.h>
#include <ogdf/layered/OptimalRanking.h>

struct OptimalRanking_script :
  scripting::declarations,
  scripting::factory<ogdf::OptimalRanking>
{
  
  ogdf::OptimalRanking* make (scripting::run_parameters* parameters) {
    using namespace ogdf;
    OptimalRanking* r = new OptimalRanking;
    
    parameters->configure_option ("OptimalRanking.separateMultiEdges",
				  &OptimalRanking::separateMultiEdges, *r);
    parameters->configure_module ("AcyclicSubgraphModule",
				  &OptimalRanking::setSubgraph, *r);
    
    return r;
  }
  
  void declare (scripting::script s) {
    using namespace scripting;
    using namespace ogdf;
    s.declare (key ("OptimalRanking")
	       .documentation_in ("pgf.gd.doc.ogdf.layered.OptimalRanking")
	       .set_module ("RankingModule", this));

    s.declare (key ("OptimalRanking.separateMultiEdges")
	       .type ("boolean")
	       .initial ("true")
	       .documentation_in ("pgf.gd.doc.ogdf.layered.OptimalRanking"));
  }
};