Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / C++

Writing an exception safe code in generic way.

Rate me:
Please Sign up or sign in to vote.
4.88/5 (11 votes)
12 Dec 20069 min read 40.8K   326   36  
An article on how to change the way of writing exception-safe code.
<!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>am::mate: Graph Legend</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1>Graph Legend</h1>This page explains how to interpret the graphs that are generated by doxygen.<p>
Consider the following example: <div class="fragment"><pre class="fragment"><span class="comment">/*! Invisible class because of truncation */</span>
<span class="keyword">class </span>Invisible { };
<span class="comment"></span>
<span class="comment">/*! Truncated class, inheritance relation is hidden */</span>
<span class="keyword">class </span>Truncated : <span class="keyword">public</span> Invisible { };

<span class="comment">/* Class not documented with doxygen comments */</span>
<span class="keyword">class </span>Undocumented { };
<span class="comment"></span>
<span class="comment">/*! Class that is inherited using public inheritance */</span>
<span class="keyword">class </span>PublicBase : <span class="keyword">public</span> Truncated { };
<span class="comment"></span>
<span class="comment">/*! A template class */</span>
<span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; <span class="keyword">class </span>Templ { };
<span class="comment"></span>
<span class="comment">/*! Class that is inherited using protected inheritance */</span>
<span class="keyword">class </span>ProtectedBase { };
<span class="comment"></span>
<span class="comment">/*! Class that is inherited using private inheritance */</span>
<span class="keyword">class </span>PrivateBase { };
<span class="comment"></span>
<span class="comment">/*! Class that is used by the Inherited class */</span>
<span class="keyword">class </span>Used { };
<span class="comment"></span>
<span class="comment">/*! Super class that inherits a number of other classes */</span>
<span class="keyword">class </span>Inherited : <span class="keyword">public</span> PublicBase,
                  <span class="keyword">protected</span> ProtectedBase,
                  <span class="keyword">private</span> PrivateBase,
                  <span class="keyword">public</span> Undocumented
                  <span class="keyword">public</span> Templ&lt;int&gt;
{
  <span class="keyword">private</span>:
    Used *m_usedClass;
};
</pre></div> If the <code>MAX_DOT_GRAPH_HEIGHT</code> tag in the configuration file is set to 240 this will result in the following graph:<p>
<center><div align="center">
<img src="graph_legend.png" alt="graph_legend.png">
</div>
</center> <p>
The boxes in the above graph have the following meaning: <ul>
<li>
A filled black box represents the struct or class for which the graph is generated. </li>
<li>
A box with a black border denotes a documented struct or class. </li>
<li>
A box with a grey border denotes an undocumented struct or class. </li>
<li>
A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>
</ul>
The arrows have the following meaning: <ul>
<li>
A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>
<li>
A dark green arrow is used for protected inheritance. </li>
<li>
A dark red arrow is used for private inheritance. </li>
<li>
A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible. </li>
<li>
A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>
</ul>
<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 16 22:27:48 2006 for am::mate by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Other
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions