diff options
Diffstat (limited to 'src/documentation/content/xdocs/CppStyleGuide.html')
-rwxr-xr-x | src/documentation/content/xdocs/CppStyleGuide.html | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/src/documentation/content/xdocs/CppStyleGuide.html b/src/documentation/content/xdocs/CppStyleGuide.html new file mode 100755 index 0000000000..92f21cd503 --- /dev/null +++ b/src/documentation/content/xdocs/CppStyleGuide.html @@ -0,0 +1,86 @@ +<html> + <head> + <title>Apache Qpid : CppStyleGuide</title> + <link rel="stylesheet" href="styles/site.css" type="text/css" /> + <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> + </head> + + <body> + <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff"> + <tr> + <td valign="top" class="pagebody"> + <div class="pageheader"> + <span class="pagetitle"> + Apache Qpid : CppStyleGuide + </span> + </div> + <div class="pagesubheading"> + This page last changed on Apr 24, 2007 by <font color="#0050B2">aconway</font>. + </div> + + <h1><a name="CppStyleGuide-QpidCstyleguide"></a>Qpid C++ style guide</h1> + +<p>Qpid C++ follows this guide: <a href="http://geosoft.no/development/cppstyle.html" title="Visit page outside Confluence">http://geosoft.no/development/cppstyle.html</a></p> + +<p>With the following amendments:</p> + +<ul> + <li>Rule 34: Qpid source files have .h and .cpp extensions.</li> + <li>Rule 71: Qpid uses 4 space indent, not 2. <b>No tabs</b>.</li> + <li>Rule 75, 81: Qpid allows (but does not require) else/catch to be on same line as preceeding }</li> + <li>Rule 11: Qpid does <em>not</em> add an underscore to member variable names.</li> +</ul> + + +<p>And the following additional rules:</p> + +<ul> + <li>Rule q1: Unlike other blocks, the contents of namespace blocks are <em>not</em> indented to prevent excessive line splitting, and multiple namespaces may be opened or closed on a single line. For example: +<div class="code"><div class="codeContent"> +<pre class="code-java">namespace qpid { namespace common {
+
+class SomeClass {
+ void foo();
+};
+
+}} <span class="code-comment">// namespace qpid::common</span></pre> +</div></div></li> +</ul> + + + + +<h2><a name="CppStyleGuide-Debateandchanges"></a>Debate and changes</h2> + +<p>The discussion on qpid-dev did raise debate about some points of the style guide. The exceptions and new rules above reflect:</p> +<ul> + <li>Points that were agreed on the list.</li> + <li>De-facto style of the codebase as it stands today.</li> +</ul> + + +<p>Anyone who feels strongly about further modifications to the style guide should:</p> +<ol> + <li>Raise the issue on qpid-dev.</li> + <li>Get consensus among the active qpid C++ developers for the change.</li> + <li>Reformat the entire qpid codebase to conform to the change.</li> +</ol> + + +<p>If you are not willing to do step 3 then don't bother raising the issue.</p> + + + + </td> + </tr> + </table> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr> + <td height="12" background="border/border_bottom.gif"><img src="border/spacer.gif" width="1" height="1" border="0"/></td> + </tr> + <tr> + <td align="center"><font color="grey">Document generated by Confluence on Apr 22, 2008 02:47</font></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file |