Add AbstractDeclarationNavigationContext, and move the html-method from
[kdevelopdvcssupport.git] / language / duchain / dumpdotgraph.h
blob3069e974d5fd8080fd6254f5831d44f8d26fe730
1 /***************************************************************************
2 Copyright 2007 David Nolden <david.nolden.kdevelop@art-master.de>
3 ***************************************************************************/
5 /***************************************************************************
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 ***************************************************************************/
14 #ifndef DUMPDOTGRAPH_H
15 #define DUMPDOTGRAPH_H
17 #include <QtCore/QMap>
18 #include <QtCore/QString>
19 #include <kurl.h>
20 #include "../languageexport.h"
22 namespace KDevelop {
23 class TopDUContext;
24 class DUContext;
25 /**
26 * A helper-class for debugging, that nicely visualizes the whole structure of a du-context.
27 * */
28 class KDEVPLATFORMLANGUAGE_EXPORT DumpDotGraph {
29 Q_DISABLE_COPY(DumpDotGraph)
30 public:
31 DumpDotGraph();
32 ~DumpDotGraph();
33 /**
34 * The context, it's, and if it is not a top-context also all contexts importing it we be drawn.
35 * Parent-contexts will not be respected, so if you want the whole structure, you will need to pass the top-context.
36 * @param shortened if this is given sub-items like declarations, definitions, child-contexts, etc. will not be shown as separate nodes
37 * @param isMaster must always be true when called from outside
38 * @param allFiles is for internal use only.
39 * */
40 QString dotGraph(KDevelop::DUContext* context, bool shortened = false);
42 private:
43 class DumpDotGraphPrivate* const d;
47 #endif // DUMPDOTGRAPH_H