Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ForceLayoutModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
37 #include <ogdf/basic/basic.h>
38 #include <ogdf/basic/memory.h>
40 
41 namespace ogdf {
42 
48  // holds index of the current level in multilevel hierarchy
50 
51 public:
54 
55  virtual ~ForceLayoutModule() { }
56 
57  virtual void call(GraphAttributes& GA) override = 0;
58 
81  virtual void call(MultilevelGraph& MLG) {
82  m_currentLevel = MLG.getLevel();
83  GraphAttributes GA(MLG.getGraph());
84  MLG.exportAttributesSimple(GA);
85  call(GA);
86  MLG.importAttributesSimple(GA);
87  };
88 
90 };
91 
92 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
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:53
ogdf::MultilevelGraph::getGraph
Graph & getGraph()
Definition: MultilevelGraph.h:140
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:47
ogdf::MultilevelGraph
Definition: MultilevelGraph.h:69
ogdf::ForceLayoutModule::call
virtual void call(MultilevelGraph &MLG)
Computes a layout of graph MLG.
Definition: ForceLayoutModule.h:81
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:92
ogdf::ForceLayoutModule::~ForceLayoutModule
virtual ~ForceLayoutModule()
Definition: ForceLayoutModule.h:55
ogdf::ForceLayoutModule::m_currentLevel
int m_currentLevel
Definition: ForceLayoutModule.h:49
ogdf::MultilevelGraph::getLevel
int getLevel()
MultilevelGraph.h
MLG is the main data structure for ModularMultilevelMixer.
basic.h
Basic declarations, included by all source files.
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)
memory.h
Declaration of memory manager for allocating small pieces of memory.
ogdf::LayoutModule
Interface of general layout algorithms.
Definition: LayoutModule.h:45