diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/pgf/base/source/LongestPathRanking_script.h |
Initial commit
Diffstat (limited to 'graphics/pgf/base/source/LongestPathRanking_script.h')
-rw-r--r-- | graphics/pgf/base/source/LongestPathRanking_script.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/graphics/pgf/base/source/LongestPathRanking_script.h b/graphics/pgf/base/source/LongestPathRanking_script.h new file mode 100644 index 0000000000..ca2e634485 --- /dev/null +++ b/graphics/pgf/base/source/LongestPathRanking_script.h @@ -0,0 +1,50 @@ +#include <pgf/gd/ogdf/c/InterfaceFromOGDF.h> +#include <ogdf/layered/LongestPathRanking.h> + +struct LongestPathRanking_script : + scripting::declarations, + scripting::factory<ogdf::LongestPathRanking> +{ + + ogdf::LongestPathRanking* make (scripting::run_parameters* parameters) { + using namespace ogdf; + LongestPathRanking* r = new LongestPathRanking; + + parameters->configure_option ("LongestPathRanking.separateDeg0Layer", + &LongestPathRanking::separateDeg0Layer, *r); + parameters->configure_option ("LongestPathRanking.separateMultiEdges", + &LongestPathRanking::separateMultiEdges, *r); + parameters->configure_option ("LongestPathRanking.optimizeEdgeLength", + &LongestPathRanking::optimizeEdgeLength, *r); + + parameters->configure_module ("AcyclicSubgraphModule", + &LongestPathRanking::setSubgraph, *r); + + return r; + } + + void declare (scripting::script s) { + using namespace scripting; + using namespace ogdf; + s.declare (key ("LongestPathRanking") + .documentation_in ("pgf.gd.doc.ogdf.layered.LongestPathRanking") + .set_module ("RankingModule", this)); + + s.declare (key ("LongestPathRanking.separateDeg0Layer") + .type ("boolean") + .initial ("true") + .documentation_in ("pgf.gd.doc.ogdf.layered.LongestPathRanking")); + + s.declare (key ("LongestPathRanking.separateMultiEdges") + .type ("boolean") + .initial ("true") + .documentation_in ("pgf.gd.doc.ogdf.layered.LongestPathRanking")); + + s.declare (key ("LongestPathRanking.optimizeEdgeLength") + .type ("boolean") + .initial ("true") + .documentation_in ("pgf.gd.doc.ogdf.layered.LongestPathRanking")); + } +}; + + |