Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 2490fc2409e43f71a6d82544660cf84c > files > 437

doxygen-1.4.4-1.1.20060mdk.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Doxygen manual: Graphs and diagrams</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<h1><a class="anchor" name="diagrams">Graphs and diagrams</a></h1>Doxygen has built-in support to generate inheritance diagrams for C++ classes.<p>
Doxygen can use the "dot" tool from graphviz 1.5 to generate more advanced diagrams and graphs. Graphviz is an "open-sourced", cross-platform graph drawing toolkit from AT&amp;T and Lucent Bell Labs and can be found at <a href="http://www.research.att.com/sw/tools/graphviz/">http://www.research.att.com/sw/tools/graphviz/</a><p>
If you have the "dot" tool available 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>
Doxygen uses the "dot" tool to generate the following graphs: <ul>
<li>
if <a class="el" href="config.html#cfg_graphical_hierarchy">GRAPHICAL_HIERARCHY</a> is set to <code>YES</code>, 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>
if <a class="el" href="config.html#cfg_class_graph">CLASS_GRAPH</a> is set to <code>YES</code>, a 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>
if <a class="el" href="config.html#cfg_include_graph">INCLUDE_GRAPH</a> is set to <code>YES</code>, 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>
if <a class="el" href="config.html#cfg_collaboration_graph">COLLABORATION_GRAPH</a> is set to YES, 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. </li>
</ul>
<p>
The elements in the class diagrams in HTML and RTF have the following meaning: <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>grey</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: <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: <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 labled 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. C 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>
<code>diagrams_a.h</code> <div class="fragment"><pre class="fragment">#ifndef _DIAGRAMS_A_H
#define _DIAGRAMS_A_H
class A { public: A *m_self; };
#endif
</pre></div> <code>diagrams_b.h</code> <div class="fragment"><pre class="fragment">#ifndef _DIAGRAMS_B_H
#define _DIAGRAMS_B_H
class A;
class B { public: A *m_a; };
#endif
</pre></div> <code>diagrams_c.h</code> <div class="fragment"><pre class="fragment">#ifndef _DIAGRAMS_C_H
#define _DIAGRAMS_C_H
#include "diagrams_c.h"
class D;
class C : public A { public: D *m_d; };
#endif
</pre></div> <code>diagrams_d.h</code> <div class="fragment"><pre class="fragment">#ifndef _DIAGRAM_D_H
#define _DIAGRAM_D_H
#include "diagrams_a.h"
#include "diagrams_b.h"
class C;
class D : virtual protected  A, private B { public: C m_c; };
#endif
</pre></div> <code>diagrams_e.h</code> <div class="fragment"><pre class="fragment">#ifndef _DIAGRAM_E_H
#define _DIAGRAM_E_H
#include "diagrams_d.h"
class E : public D {};
#endif
</pre></div><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>
 
Go to the <a href="preprocessing.html">next</a> section or return to the
 <a href="index.html">index</a>.
 <hr size="1"><address style="align: right;"><small>Generated on Wed Nov 15 11:05:48 2006 for Doxygen manual by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>