summaryrefslogtreecommitdiffstats
path: root/src/dot.h
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-12-13 18:59:17 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-12-13 18:59:17 (GMT)
commitd048df9811a8686d93dc28f275a1c5c575833669 (patch)
tree024124085a492939d5ad3d3b60fbac43f928b925 /src/dot.h
parent71de527ef4ec4b221eecfe02450548390fc03cf4 (diff)
downloadDoxygen-d048df9811a8686d93dc28f275a1c5c575833669.zip
Doxygen-d048df9811a8686d93dc28f275a1c5c575833669.tar.gz
Doxygen-d048df9811a8686d93dc28f275a1c5c575833669.tar.bz2
Release-1.3.9.1-20041213
Diffstat (limited to 'src/dot.h')
-rw-r--r--src/dot.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/dot.h b/src/dot.h
index 477eba4..3e5d790 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -32,6 +32,8 @@ class ClassSDict;
class MemberDef;
class Definition;
class DirDef;
+class GroupDef;
+class DotGroupCollaboration;
enum GraphOutputFormat { BITMAP , EPS };
@@ -66,6 +68,7 @@ class DotNode
void deleteNode(DotNodeList &deletedList,SDict<DotNode> *skipNodes=0);
void removeChild(DotNode *n);
void removeParent(DotNode *n);
+ int findParent( DotNode *n );
void write(QTextStream &t,GraphType gt,GraphOutputFormat f,
bool topDown,bool toChildren,int maxDistance,bool backArrows,bool reNumber);
int m_subgraphId;
@@ -100,6 +103,8 @@ class DotNode
friend class DotInclDepGraph;
friend class DotNodeList;
friend class DotCallGraph;
+ friend class DotGroupCollaboration;
+
friend void writeDotGraph(
DotNode *root, GraphType gt,
GraphOutputFormat f, const QCString &baseName,
@@ -113,6 +118,13 @@ class DotNode
int distance, bool backArrows
);
};
+inline
+int DotNode::findParent( DotNode *n )
+{
+ if( !m_parents )
+ return -1;
+ return m_parents->find(n);
+}
class DotGfxHierarchyTable
{
@@ -217,6 +229,63 @@ class DotDirDeps
DirDef *m_dir;
};
+class DotGroupCollaboration
+{
+ public :
+ enum EdgeType
+ { tmember = 0,
+ tclass,
+ tnamespace,
+ tfile,
+ tpages,
+ tdir,
+ thierarchy
+ };
+
+ class Link
+ {
+ public:
+ Link(const QCString lab,const QCString &u) : label(lab), url(u) {}
+ QCString label;
+ QCString url;
+ };
+
+ class Edge
+ {
+ public :
+ Edge(DotNode *start,DotNode *end,EdgeType type)
+ : pNStart(start), pNEnd(end), eType(type)
+ { links.setAutoDelete(TRUE); }
+
+ DotNode* pNStart;
+ DotNode* pNEnd;
+ EdgeType eType;
+
+ QList<Link> links;
+ void write( QTextStream &t, int& curNodeId );
+ };
+
+ DotGroupCollaboration(GroupDef* gd);
+ ~DotGroupCollaboration();
+ QCString writeGraph(QTextStream &t, GraphOutputFormat format,
+ const char *path,const char *relPath,
+ bool writeImageMap=TRUE);
+ void buildGraph(GroupDef* gd,int distance);
+ bool isTrivial() const;
+ private :
+ void addCollaborationMember( Definition* def, QCString& url, EdgeType eType );
+ void addMemberList( class MemberList* ml );
+ void writeGraphHeader(QTextStream &t);
+ Edge* addEdge( DotNode* _pNStart, DotNode* _pNEnd, EdgeType _eType,
+ const QCString& _label, const QCString& _url );
+
+ DotNode *m_rootNode;
+ int m_curNodeId;
+ QDict<DotNode> *m_usedNodes;
+ QCString m_diskName;
+ QList<Edge> m_edges;
+};
+
void generateGraphLegend(const char *path);
void writeDotGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,GraphOutputFormat format);