Go to the documentation of this file.00001 #ifndef IGRAPHVIZ_H_1356546879314
00002 #define IGRAPHVIZ_H_1356546879314
00003
00004 #include <QSharedPointer>
00005 #include <QPointF>
00006
00007 class IGVEdge
00008 {
00009 public:
00010 typedef QVector<QPoint> TCPList;
00011
00012 virtual ~IGVEdge() {}
00013
00014 virtual QString getHeadName() const = 0;
00015 virtual QString getTailName() const = 0;
00016
00017 virtual QString getLabel() const = 0;
00018 virtual QPoint getLabelPos() const = 0;
00019
00020 virtual QSharedPointer<IGVEdge> getNextOutEdge() const = 0;
00021
00022 virtual TCPList getControlPoints() const = 0;
00023 };
00024
00025 class IGVNode
00026 {
00027 public:
00028 virtual ~IGVNode() {}
00029
00030 virtual QString getName() const = 0;
00031 virtual QPoint getPos() const = 0;
00032
00033 virtual QSharedPointer<IGVNode> getPrevNode() const = 0;
00034 virtual QSharedPointer<IGVNode> getNextNode() const = 0;
00035
00036 virtual QSharedPointer<IGVEdge> getFirstOutEdge() const = 0;
00037 };
00038
00039 class IGVGraph
00040 {
00041 public:
00042 virtual ~IGVGraph() {}
00043
00044 virtual bool addNode(const QString &name) = 0;
00045 virtual int getNodeCount() const = 0;
00046 virtual QSharedPointer<IGVNode> getNode(const QString &name) const = 0;
00047 virtual QSharedPointer<IGVNode> getFirstNode() const = 0;
00048 virtual QSharedPointer<IGVNode> getLastNode() const = 0;
00049
00050 virtual bool addEdge(const QString &s1, const QString &s2, const QString &l) = 0;
00051 virtual int getEdgeCount() const = 0;
00052
00053 virtual void layoutGraphUsingDot() = 0;
00054 virtual void renderToFile(const QString &fileName) = 0;
00055 };
00056
00057
00058
00059
00060
00061
00062 class IGraphViz
00063 {
00064 public:
00065 virtual ~IGraphViz() {}
00066
00067
00068 virtual QString getVersion() const = 0;
00069
00070
00071 virtual QString getGraphVizVersion() const = 0;
00072
00073
00074
00075 virtual QSharedPointer<IGVGraph> createGraph() const = 0;
00076 };
00077
00078 Q_DECLARE_INTERFACE(IGraphViz, "AutomataEditor/IGraphViz/2.0");
00079
00080 #endif //IGRAPHVIZ_H_1356546879314