|
|
@@ -1,3 +1,4 @@
|
|
|
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
@@ -10,7 +11,8 @@
|
|
|
|
|
|
<body bgcolor="#FFFFFF" text="#000000">
|
|
|
|
|
|
-<table border="1" bgcolor="#007F7F" cellpadding="2">
|
|
|
+<table summary="Navigational header"
|
|
|
+ border="1" bgcolor="#007F7F" cellpadding="2">
|
|
|
<tr>
|
|
|
<td bgcolor="#FFFFFF"><img src="../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td>
|
|
|
<td><a href="../index.htm"><font face="Arial" color="#FFFFFF"><big>Home</big></font></a></td>
|
|
|
@@ -24,13 +26,13 @@
|
|
|
<p>Header files are the place where a library comes into contact with user code
|
|
|
and other libraries. To co-exist peacefully and productively, headers must
|
|
|
be "good neighbors".</p>
|
|
|
-<p>Here are the standards for namespace boost headers. Many of
|
|
|
+<p>Here are the standards for boost headers. Many of
|
|
|
these are also reasonable guidelines for general use.
|
|
|
<ul>
|
|
|
- <li>Headers should have a .hpp (lowercase) filename extension. </li>
|
|
|
- <li>Wrap the header in #ifndef guards so that multiple inclusion is
|
|
|
- benign. Use a naming convention that minimizes the chance of clashes
|
|
|
- with macro names from other's code. The <a href="#Sample header">sample
|
|
|
+ <li>Header filenames should have a .hpp (lowercase) extension. </li>
|
|
|
+ <li>Unless multiple inclusion is intended, wrap the header in #ifndef guards.
|
|
|
+ Use a naming convention that minimizes the chance of clashes
|
|
|
+ with macro names from other's code. The <a href="#SampleHeader">sample
|
|
|
header</a> uses the Boost convention of all uppercase letters, with the
|
|
|
header name prefixed by the namespace name, and suffixed with HPP, separated
|
|
|
by underscores.</li>
|
|
|
@@ -38,16 +40,16 @@ these are also reasonable guidelines for general use.
|
|
|
pollution. The namespace approach to pollution control is strongly preferred
|
|
|
to older approaches such as adding funny prefixes to global names.
|
|
|
Libraries which are designed to work well with other Boost libraries should
|
|
|
- be placed namespace <tt>boost</tt>.</li>
|
|
|
+ be placed in namespace <tt>boost</tt>.</li>
|
|
|
|
|
|
<li>Make sure that a translation unit consisting of just the
|
|
|
- contents of the header file will compile successfully.
|
|
|
+ contents of the header file will compile successfully.</li>
|
|
|
|
|
|
<li>Place the header file in a sub-directory to prevent conflict with
|
|
|
identically named header files in other libraries. The parent
|
|
|
directory is added to the compiler's include search path. Then both
|
|
|
your code and user code specifies the sub-directory in <tt>#include</tt>
|
|
|
- directives. Thus the header <a href="#Sample header">sample header</a>
|
|
|
+ directives. Thus the header <a href="#SampleHeader">sample header</a>
|
|
|
would be included by <tt>#include <boost/furball.hpp></tt></li>
|
|
|
<li>The preferred ordering for class definitions is public members, protected
|
|
|
members, and finally private members.</li>
|
|
|
@@ -55,15 +57,12 @@ these are also reasonable guidelines for general use.
|
|
|
header</a> if there is a need to deal with compiler or platform
|
|
|
configuration issues.</li>
|
|
|
</ul>
|
|
|
-<h2><a name="Sample header"></a>Sample Header</h2>
|
|
|
-<pre><tt>// Boost general library furball.hpp header file ---------------------------//
|
|
|
+<h2><a name="SampleHeader"></a>Sample Header</h2>
|
|
|
+<pre><tt>// Boost general library furball.hpp header file ---------------------------//
|
|
|
|
|
|
-// (C) Copyright Your Name 1998. Permission to copy, use, modify, sell and
|
|
|
-// distribute this software is granted provided this copyright notice appears
|
|
|
-// in all copies. This software is provided "as is" without express or implied
|
|
|
-// warranty, and with no claim as to its suitability for any purpose.
|
|
|
+ <<i> Copyright and license notice</i>, as indicated in the <a href="license_info.html">license page</a> >
|
|
|
|
|
|
-// See http://www.boost.org for updates, documentation, and revision history.
|
|
|
+// See http://www.boost.org/ for latest version.
|
|
|
|
|
|
#ifndef BOOST_FURBALL_HPP
|
|
|
#define BOOST_FURBALL_HPP
|
|
|
@@ -82,9 +81,9 @@ namespace boost {
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
-#endif // BOOST_FURBALL_HPP</tt></pre>
|
|
|
+#endif // include guard</tt></pre>
|
|
|
<h2>Coding Style</h2>
|
|
|
-<p>The alert reader will have noticed that the <a href="#Sample header">sample
|
|
|
+<p>The alert reader will have noticed that the <a href="#SampleHeader">sample
|
|
|
header</a> employs a certain coding style for indentation, positioning braces,
|
|
|
commenting ending braces, and similar formatting issues. These stylistic
|
|
|
issues are viewed as personal preferences and are not part of the Boost Header
|
|
|
@@ -92,11 +91,12 @@ Policy.</p>
|
|
|
<hr>
|
|
|
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->02 October, 2003<!--webbot bot="Timestamp" endspan i-checksum="38549" --></p>
|
|
|
|
|
|
-<p>© Copyright Beman Dawes 1998</p>
|
|
|
-<p> Use, modification, and distribution are subject to the Boost Software
|
|
|
-License, Version 1.0. (See accompanying file <a href="../LICENSE_1_0.txt">
|
|
|
-LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
|
|
|
-www.boost.org/LICENSE_1_0.txt</a>)</p>
|
|
|
+<p>© Copyright Beman Dawes 1998</p>
|
|
|
+<p>
|
|
|
+ Distributed under the Boost Software License, Version 1.0. (See
|
|
|
+ accompanying file <a href="../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
|
|
|
+ at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)
|
|
|
+</p>
|
|
|
|
|
|
</body>
|
|
|
|