Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ForceLayoutModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
38 
39 namespace ogdf {
40 
46  // holds index of the current level in multilevel hierarchy
48 
49 public:
52 
53  virtual ~ForceLayoutModule() { }
54 
55  virtual void call(GraphAttributes& GA) override = 0;
56 
79  virtual void call(MultilevelGraph& MLG) {
80  m_currentLevel = MLG.getLevel();
81  GraphAttributes GA(MLG.getGraph());
82  MLG.exportAttributesSimple(GA);
83  call(GA);
84  MLG.importAttributesSimple(GA);
85  };
86 
88 };
89 
90 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:66
GraphAttributes.h
Declaration of class GraphAttributes which extends a Graph by additional attributes.
ogdf::ForceLayoutModule::ForceLayoutModule
ForceLayoutModule()
Initializes a force layout module.
Definition: ForceLayoutModule.h:51
ogdf::MultilevelGraph::getGraph
Graph & getGraph()
Definition: MultilevelGraph.h:137
ogdf::MultilevelGraph::exportAttributesSimple
void exportAttributesSimple(GraphAttributes &GA) const
LayoutModule.h
Declaration of interface for layout algorithms (class LayoutModule)
ogdf::ForceLayoutModule
Interface of general layout algorithms.
Definition: ForceLayoutModule.h:45
ogdf::MultilevelGraph
Definition: MultilevelGraph.h:66
ogdf::ForceLayoutModule::call
virtual void call(MultilevelGraph &MLG)
Computes a layout of graph MLG.
Definition: ForceLayoutModule.h:79
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
ogdf::ForceLayoutModule::~ForceLayoutModule
virtual ~ForceLayoutModule()
Definition: ForceLayoutModule.h:53
ogdf::ForceLayoutModule::m_currentLevel
int m_currentLevel
Definition: ForceLayoutModule.h:47
ogdf::MultilevelGraph::getLevel
int getLevel()
MultilevelGraph.h
MLG is the main data structure for ModularMultilevelMixer.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::MultilevelGraph::importAttributesSimple
void importAttributesSimple(const GraphAttributes &GA)
ogdf::LayoutModule
Interface of general layout algorithms.
Definition: LayoutModule.h:44