Skip to content

Commit

Permalink
plugins/layout/OGDF: Wrap new planar layout algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
anlambert committed Jun 17, 2024
1 parent 27ef05c commit f1c1813
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/layout/OGDF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ SET(PLUGINS_SRCS
OGDFTileToRowsPacking.cpp
OGDFPlanarizationLayout.cpp
OGDFDTreeMultilevelEmbedder.cpp
OGDFRadialTreeLayout.cpp)
OGDFRadialTreeLayout.cpp
OGDFMixedModel.cpp
OGDFSchnyderLayout.cpp)

DISABLE_COMPILER_WARNINGS()

Expand Down
34 changes: 34 additions & 0 deletions plugins/layout/OGDF/OGDFMixedModel.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
*
* Copyright (C) 2024 The Talipot developers
*
* Talipot is a fork of Tulip, created by David Auber
* and the Tulip development Team from LaBRI, University of Bordeaux
*
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU General Public License version 3, or any later version
* See top-level LICENSE file for more information
*
*/

#include <ogdf/planarlayout/MixedModelLayout.h>

#include <talipot/OGDFLayoutPluginBase.h>

// static constexpr std::string_view paramHelp[] = {};

class OGDFMixedModelLayout : public tlp::OGDFLayoutPluginBase {

public:
PLUGININFORMATION("Mixed Model (OGDF)", "", "", "", "1.0", "Planar")
OGDFMixedModelLayout(const tlp::PluginContext *context)
: OGDFLayoutPluginBase(context, tlp::getOGDFLayoutModule<ogdf::MixedModelLayout>(context)),
mixedModel(static_cast<ogdf::MixedModelLayout *>(ogdfLayoutAlgo)) {}

void beforeCall() override {}

private:
ogdf::MixedModelLayout *mixedModel;
};

PLUGIN(OGDFMixedModelLayout)
34 changes: 34 additions & 0 deletions plugins/layout/OGDF/OGDFSchnyderLayout.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
*
* Copyright (C) 2024 The Talipot developers
*
* Talipot is a fork of Tulip, created by David Auber
* and the Tulip development Team from LaBRI, University of Bordeaux
*
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU General Public License version 3, or any later version
* See top-level LICENSE file for more information
*
*/

#include <ogdf/planarlayout/SchnyderLayout.h>

#include <talipot/OGDFLayoutPluginBase.h>

// static constexpr std::string_view paramHelp[] = {};

class OGDFSchnyderLayout : public tlp::OGDFLayoutPluginBase {

public:
PLUGININFORMATION("Schnyder (OGDF)", "", "", "", "1.0", "Planar")
OGDFSchnyderLayout(const tlp::PluginContext *context)
: OGDFLayoutPluginBase(context, tlp::getOGDFLayoutModule<ogdf::SchnyderLayout>(context)),
schnyder(static_cast<ogdf::SchnyderLayout *>(ogdfLayoutAlgo)) {}

void beforeCall() override {}

private:
ogdf::SchnyderLayout *schnyder;
};

PLUGIN(OGDFSchnyderLayout)

0 comments on commit f1c1813

Please sign in to comment.