• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>BoostBook element namespace</title>
6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9<link rel="up" href="../../reference.html" title="Reference">
10<link rel="prev" href="constructor.html" title="BoostBook element constructor">
11<link rel="next" href="if-fails.html" title="BoostBook element if-fails">
12</head>
13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14<table cellpadding="2" width="100%"><tr>
15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
16<td align="center"><a href="../../../../index.html">Home</a></td>
17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20<td align="center"><a href="../../../../more/index.htm">More</a></td>
21</tr></table>
22<hr>
23<div class="spirit-nav">
24<a accesskey="p" href="constructor.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="if-fails.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="boostbook.dtd.namespace"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">
30          BoostBook element <code class="sgmltag-element">namespace</code></span></h2>
31<p>namespace — Declares a namespace</p>
32</div>
33<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
34<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv">namespace ::=
35  (<a class="link" href="class.html" title="BoostBook element class">class</a>| <a class="link" href="class-specialization.html" title="BoostBook element class-specialization">class-specialization</a>| <a class="link" href="struct.html" title="BoostBook element struct">struct</a>| <a class="link" href="struct-specialization.html" title="BoostBook element struct-specialization">struct-specialization</a>| <a class="link" href="union.html" title="BoostBook element union">union</a>| <a class="link" href="union-specialization.html" title="BoostBook element union-specialization">union-specialization</a>| <a class="link" href="typedef.html" title="BoostBook element typedef">typedef</a>| <a class="link" href="enum.html" title="BoostBook element enum">enum</a>| <a class="link" href="free-function-group.html" title="BoostBook element free-function-group">free-function-group</a>| <a class="link" href="function.html" title="BoostBook element function">function</a>| <a class="link" href="overloaded-function.html" title="BoostBook element overloaded-function">overloaded-function</a>| <a class="link" href="namespace.html" title="BoostBook element namespace">namespace</a>)*
36</div>
37<div class="refsection">
38<a name="id-1.4.3.7.26.4"></a><h2>Description</h2>
39<p>BoostBook namespaces are declared via the &lt;namespace&gt;
40  element. As in C++, namespaces can be nested and contain other C++
41  constructs, such as classes or functions. The <code class="computeroutput">name</code>
42  attribute of a &lt;namespace&gt; element gives the namespace name
43  (e.g., "boost"). The <a class="link" href="../../any.html" title="Chapter 4. Boost.Any">Any</a> library is
44  defined entirely within namespace boost by:</p>
45<pre class="programlisting">&lt;library-reference&gt;
46  &lt;header name="boost/any.hpp"&gt;
47    &lt;namespace name="boost"&gt;
48      &lt;!-- C++ constructs in the boost namespace --&gt;
49    &lt;/namespace&gt;
50  &lt;/header&gt;
51&lt;/library-reference&gt;</pre>
52</div>
53<div class="refsection">
54<a name="id-1.4.3.7.26.5"></a><h2>Attributes</h2>
55<div class="informaltable"><table class="table">
56<colgroup>
57<col>
58<col>
59<col>
60<col>
61</colgroup>
62<thead><tr>
63<th>Name</th>
64<th>Type</th>
65<th>Value</th>
66<th>Purpose</th>
67</tr></thead>
68<tbody>
69<tr>
70<td>last-revision</td>
71<td>#IMPLIED</td>
72<td>CDATA</td>
73<td>Set to $Date$ to keep "last revised" information in sync with CVS changes</td>
74</tr>
75<tr>
76<td>name</td>
77<td>#REQUIRED</td>
78<td>CDATA</td>
79<td>The name of the element being declared to referenced</td>
80</tr>
81<tr>
82<td>id</td>
83<td>#IMPLIED</td>
84<td>CDATA</td>
85<td>A global identifier for this element</td>
86</tr>
87<tr>
88<td>xml:base</td>
89<td>#IMPLIED</td>
90<td>CDATA</td>
91<td>Implementation detail used by XIncludes</td>
92</tr>
93</tbody>
94</table></div>
95</div>
96</div>
97<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
98<td align="left"></td>
99<td align="right"><div class="copyright-footer">Copyright © 2003-2005 Douglas Gregor<p>Distributed under the Boost Software License, Version 1.0.
100      (See accompanying file LICENSE_1_0.txt or copy at
101      <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
102      </p>
103</div></td>
104</tr></table>
105<hr>
106<div class="spirit-nav">
107<a accesskey="p" href="constructor.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="if-fails.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
108</div>
109</body>
110</html>
111