1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0.1 Transitional//EN">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
6 <title>Boost.Flyweight Documentation - Tags reference
</title>
7 <link rel=
"stylesheet" href=
"../style.css" type=
"text/css">
8 <link rel=
"start" href=
"../index.html">
9 <link rel=
"prev" href=
"key_value.html">
10 <link rel=
"up" href=
"index.html">
11 <link rel=
"next" href=
"factories.html">
15 <h1><img src=
"../../../../boost.png" alt=
"Boost logo" align=
16 "middle" width=
"277" height=
"86">Boost.Flyweight
19 <div class=
"prev_link"><a href=
"key_value.html"><img src=
"../prev.gif" alt=
"key-value flyweights" border=
"0"><br>
22 <div class=
"up_link"><a href=
"index.html"><img src=
"../up.gif" alt=
"Boost.Flyweight reference" border=
"0"><br>
23 Boost.Flyweight reference
25 <div class=
"next_link"><a href=
"factories.html"><img src=
"../next.gif" alt=
"factories" border=
"0"><br>
27 </a></div><br clear=
"all" style=
"clear: all;">
34 <li><a href=
"#tag">Tags
</a></li>
35 <li><a href=
"#tag_synopsis">Header
36 <code>"boost/flyweight/tag.hpp"</code> synopsis
</a>
38 <li><a href=
"#tag_construct">Class template
<code>tag
</code></a></li>
43 <h2><a name=
"tag">Tags
</a></h2>
46 A
<i>tag
</i> is a type of the form
47 <a href=
"#tag_construct"><code>tag
<T
></code></a> for some arbitrary
49 In the context of Boost.Flyweight, tags are syntactic artifacts used
50 to differentiate instantiations of the class template
51 <a href=
"flyweight.html#flyweight"><code>flyweight
</code></a> which would
52 otherwise be identical. Tagging a
<code>flyweight
</code> instantiation with
53 a tag type local to a given context ensures that the global resources
54 of that instantiation (for instance, the associated
55 <a href=
"factories.html#factory">factory class
</a>) will not be unintentionally
56 shared by other areas of the program.
59 <h2><a name=
"tag_synopsis">Header
60 <a href=
"../../../../boost/flyweight/tag.hpp"><code>"boost/flyweight/tag.hpp"</code></a> synopsis
</a></h2>
63 <span class=keyword
>namespace
</span> <span class=identifier
>boost
</span><span class=special
>{
</span>
65 <span class=keyword
>namespace
</span> <span class=identifier
>flyweights
</span><span class=special
>{
</span>
67 <span class=keyword
>template
</span><span class=special
><</span><span class=keyword
>typename
</span> <span class=identifier
>T
</span><span class=special
>></span>
68 <span class=keyword
>struct
</span> <span class=identifier
>tag
</span><span class=special
>;
</span>
70 <span class=special
>}
</span> <span class=comment
>// namespace boost::flyweights
</span>
72 <span class=special
>}
</span> <span class=comment
>// namespace boost
</span>
75 <h3><a name=
"tag_construct">Class template
<code>tag
</code></a></h3>
78 For any type
<code>T
</code>,
<code>tag
<T
></code> is a suitable
79 <a href=
"#tag">tag
</a> for use in instantiations of
80 <a href=
"flyweight.html#flyweight"><code>flyweight
</code></a>.
85 <div class=
"prev_link"><a href=
"key_value.html"><img src=
"../prev.gif" alt=
"key-value flyweights" border=
"0"><br>
88 <div class=
"up_link"><a href=
"index.html"><img src=
"../up.gif" alt=
"Boost.Flyweight reference" border=
"0"><br>
89 Boost.Flyweight reference
91 <div class=
"next_link"><a href=
"factories.html"><img src=
"../next.gif" alt=
"factories" border=
"0"><br>
93 </a></div><br clear=
"all" style=
"clear: all;">
97 <p>Revised August
11th
2008</p>
99 <p>© Copyright
2006-
2008 Joaqu
ín M L
ópez Mu
ñoz.
100 Distributed under the Boost Software
101 License, Version
1.0. (See accompanying file
<a href=
"../../../../LICENSE_1_0.txt">
102 LICENSE_1_0.txt
</a> or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt">
103 http://www.boost.org/LICENSE_1_0.txt
</a>)