2019-08-03 13:10:44 +00:00
|
|
|
#ifndef GRAPHVIZLAYOUT_H
|
|
|
|
#define GRAPHVIZLAYOUT_H
|
|
|
|
|
|
|
|
#include "core/Cutter.h"
|
|
|
|
#include "GraphLayout.h"
|
|
|
|
|
|
|
|
class GraphvizLayout : public GraphLayout
|
|
|
|
{
|
|
|
|
public:
|
2020-07-16 08:05:10 +00:00
|
|
|
enum class LayoutType {
|
|
|
|
DotOrtho,
|
|
|
|
DotPolyline,
|
|
|
|
Sfdp,
|
|
|
|
Neato,
|
|
|
|
TwoPi,
|
|
|
|
Circo,
|
2019-08-03 13:10:44 +00:00
|
|
|
};
|
2021-01-24 14:50:13 +00:00
|
|
|
enum class Direction { TB, LR };
|
2020-07-16 08:05:10 +00:00
|
|
|
GraphvizLayout(LayoutType layoutType, Direction direction = Direction::TB);
|
2021-01-24 14:50:13 +00:00
|
|
|
virtual void CalculateLayout(std::unordered_map<ut64, GraphBlock> &blocks, ut64 entry,
|
|
|
|
int &width, int &height) const override;
|
|
|
|
|
2019-08-03 13:10:44 +00:00
|
|
|
private:
|
|
|
|
Direction direction;
|
2020-07-16 08:05:10 +00:00
|
|
|
LayoutType layoutType;
|
2019-08-03 13:10:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GRAPHVIZLAYOUT_H
|