summaryrefslogtreecommitdiffstats
path: root/vnfs/VES5.0/doxygen-1.8.12/html/diagrams.html
blob: be780e4556a2519816d2902c971c358b5a682f17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: Graphs and diagrams</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen_manual.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('diagrams.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Graphs and diagrams </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Doxygen has built-in support to generate inheritance diagrams for C++ classes.</p>
<p>Doxygen can use the "dot" tool from graphviz to generate more advanced diagrams and graphs. Graphviz is an open-source, cross-platform graph drawing toolkit and can be found at <a href="http://www.graphviz.org/">http://www.graphviz.org/</a></p>
<p>If you have the "dot" tool in the path, you can set <a class="el" href="config.html#cfg_have_dot">HAVE_DOT</a> to <code>YES</code> in the configuration file to let doxygen use it.</p>
<p>Doxygen uses the "dot" tool to generate the following graphs: </p><ul>
<li>
A graphical representation of the class hierarchy will be drawn, along with the textual one. Currently this feature is supported for HTML only.<br />
 <b>Warning:</b> When you have a very large class hierarchy where many classes derive from a common base class, the resulting image may become too big to handle for some browsers. </li>
<li>
An inheritance graph will be generated for each documented class showing the direct and indirect inheritance relations. This disables the generation of the built-in class inheritance diagrams. </li>
<li>
An include dependency graph is generated for each documented file that includes at least one other file. This feature is currently supported for HTML and RTF only. </li>
<li>
An inverse include dependency graph is also generated showing for a (header) file, which other files include it. </li>
<li>
A graph is drawn for each documented class and struct that shows: <ul>
<li>
the inheritance relations with base classes. </li>
<li>
the usage relations with other structs and classes (e.g. class <code>A</code> has a member variable <code>m_a</code> of type class <code>B</code>, then <code>A</code> has an arrow to <code>B</code> with <code>m_a</code> as label). </li>
</ul>
</li>
<li>
if <a class="el" href="config.html#cfg_call_graph">CALL_GRAPH</a> is set to YES, a graphical call graph is drawn for each function showing the functions that the function directly or indirectly calls (see also section <a class="el" href="commands.html#cmdcallgraph">\callgraph</a> and section <a class="el" href="commands.html#cmdhidecallgraph">\hidecallgraph</a>). </li>
<li>
if <a class="el" href="config.html#cfg_caller_graph">CALLER_GRAPH</a> is set to YES, a graphical caller graph is drawn for each function showing the functions that the function is directly or indirectly called by (see also section <a class="el" href="commands.html#cmdcallergraph">\callergraph</a> and section <a class="el" href="commands.html#cmdhidecallergraph">\hidecallergraph</a>). </li>
</ul>
<p>Using a <a class="el" href="customize.html">layout file</a> you can determine which of the graphs are actually shown.</p>
<p>The options <a class="el" href="config.html#cfg_dot_graph_max_nodes">DOT_GRAPH_MAX_NODES</a> and <a class="el" href="config.html#cfg_max_dot_graph_depth">MAX_DOT_GRAPH_DEPTH</a> can be used to limit the size of the various graphs.</p>
<p>The elements in the class diagrams in HTML and RTF have the following meaning: </p><ul>
<li>
A <b>yellow</b> box indicates a class. A box can have a little marker in the lower right corner to indicate that the class contains base classes that are hidden. For the class diagrams the maximum tree width is currently 8 elements. If a tree is wider some nodes will be hidden. If the box is filled with a dashed pattern the inheritance relation is virtual. </li>
<li>
A <b>white</b> box indicates that the documentation of the class is currently shown. </li>
<li>
A <b>gray</b> box indicates an undocumented class. </li>
<li>
A <b>solid dark blue</b> arrow indicates public inheritance. </li>
<li>
A <b>dashed dark green</b> arrow indicates protected inheritance. </li>
<li>
A <b>dotted dark green</b> arrow indicates private inheritance. </li>
</ul>
<p>The elements in the class diagram in <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> have the following meaning: </p><ul>
<li>
A <b>white</b> box indicates a class. A <b>marker</b> in the lower right corner of the box indicates that the class has base classes that are hidden. If the box has a <b>dashed</b> border this indicates virtual inheritance. </li>
<li>
A <b>solid</b> arrow indicates public inheritance. </li>
<li>
A <b>dashed</b> arrow indicates protected inheritance. </li>
<li>
A <b>dotted</b> arrow indicates private inheritance. </li>
</ul>
<p>The elements in the graphs generated by the dot tool have the following meaning: </p><ul>
<li>
A <b>white</b> box indicates a class or struct or file. </li>
<li>
A box with a <b>red</b> border indicates a node that has <em>more</em> arrows than are shown! In other words: the graph is <em>truncated</em> with respect to this node. The reason why a graph is sometimes truncated is to prevent images from becoming too large. For the graphs generated with dot doxygen tries to limit the width of the resulting image to 1024 pixels. </li>
<li>
A <b>black</b> box indicates that the class' documentation is currently shown. </li>
<li>
A <b>dark blue</b> arrow indicates an include relation (for the include dependency graph) or public inheritance (for the other graphs). </li>
<li>
A <b>dark green</b> arrow indicates protected inheritance. </li>
<li>
A <b>dark red</b> arrow indicates private inheritance. </li>
<li>
A <b>purple dashed</b> arrow indicated a "usage" relation, the edge of the arrow is labeled with the variable(s) responsible for the relation. Class <code>A</code> uses class <code>B</code>, if class <code>A</code> has a member variable <code>m</code> of type C, where B is a subtype of C (e.g. <code>C</code> could be <code>B</code>, <code>B*</code>, <code>T&lt;B&gt;*</code>). </li>
</ul>
<p>Here are a couple of header files that together show the various diagrams that doxygen can generate:</p>
<p><code>diagrams_a.h</code> </p><div class="fragment"><div class="line"><span class="preprocessor">#ifndef _DIAGRAMS_A_H</span></div><div class="line"><span class="preprocessor">#define _DIAGRAMS_A_H</span></div><div class="line"><span class="keyword">class </span>A { <span class="keyword">public</span>: A *m_self; };</div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> <code>diagrams_b.h</code> </p><div class="fragment"><div class="line"><span class="preprocessor">#ifndef _DIAGRAMS_B_H</span></div><div class="line"><span class="preprocessor">#define _DIAGRAMS_B_H</span></div><div class="line"><span class="keyword">class </span>A;</div><div class="line"><span class="keyword">class </span>B { <span class="keyword">public</span>: A *m_a; };</div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> <code>diagrams_c.h</code> </p><div class="fragment"><div class="line"><span class="preprocessor">#ifndef _DIAGRAMS_C_H</span></div><div class="line"><span class="preprocessor">#define _DIAGRAMS_C_H</span></div><div class="line"><span class="preprocessor">#include &quot;diagrams_c.h&quot;</span></div><div class="line"><span class="keyword">class </span>D;</div><div class="line"><span class="keyword">class </span>C : <span class="keyword">public</span> A { <span class="keyword">public</span>: D *m_d; };</div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> <code>diagrams_d.h</code> </p><div class="fragment"><div class="line"><span class="preprocessor">#ifndef _DIAGRAM_D_H</span></div><div class="line"><span class="preprocessor">#define _DIAGRAM_D_H</span></div><div class="line"><span class="preprocessor">#include &quot;diagrams_a.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;diagrams_b.h&quot;</span></div><div class="line"><span class="keyword">class </span>C;</div><div class="line"><span class="keyword">class </span>D : <span class="keyword">virtual</span> <span class="keyword">protected</span>  A, <span class="keyword">private</span> B { <span class="keyword">public</span>: C m_c; };</div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> <code>diagrams_e.h</code> </p><div class="fragment"><div class="line"><span class="preprocessor">#ifndef _DIAGRAM_E_H</span></div><div class="line"><span class="preprocessor">#define _DIAGRAM_E_H</span></div><div class="line"><span class="preprocessor">#include &quot;diagrams_d.h&quot;</span></div><div class="line"><span class="keyword">class </span>E : <span class="keyword">public</span> D {};</div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> 
</p>
Click <a href="examples/diagrams/html/index.html">here</a>
for the corresponding HTML documentation that is generated by doxygen<br/>
(<code>EXTRACT_ALL</code> = <code>YES</code> is used here).
 <p> 
<br/><br/>
Go to the <a href="preprocessing.html">next</a> section or return to the
<a href="index.html">index</a>.
 </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>