1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
4 <TITLE>Function Template imbue
</TITLE>
5 <LINK REL=
"stylesheet" HREF=
"../../../../boost.css">
6 <LINK REL=
"stylesheet" HREF=
"../theme/iostreams.css">
12 <H1 CLASS=
"title">Function Template
<CODE>imbue
</CODE></H1>
17 <DL class=
"page-index">
18 <DT><A href=
"#description">Description
</A></DT>
19 <DT><A href=
"#headers">Headers
</A></DT>
20 <DT><A href=
"#reference">Reference
</A></DT>
23 <A NAME=
"description"></A>
27 The function template
<CODE>imbue
</CODE> is invoked automatically by the Iostreams library when the
<CODE>std::locale
</CODE> of a library stream or stream buffer is set using
<CODE>std::basic_ios::imbue
</CODE> or
<CODE>std::basic_streambuf::pubimbue
</CODE>. When the
<CODE>std::locale
</CODE> of an instance of
<A HREF=
"../guide/generic_streams.html#stream_buffer"><CODE>stream_buffer
</CODE></A> or
<A HREF=
"../guide/generic_streams.html#stream"><CODE>stream
</CODE></A> is set,
<CODE>imbue
</CODE> is invoked on the underlying Device; when the
<CODE>std::locale
</CODE> of a
<A HREF=
"../classes/filtering_streambuf.html"><CODE>filtering_streambuf
</CODE></A> or
<A HREF=
"../classes/filtering_streambuf.html"><CODE>filtering_stream
</CODE></A> is set,
<CODE>imbue
</CODE> is invoked on each Filter and Device in the underlying chain.
30 <A NAME=
"headers"></A>
34 <DT><A CLASS=
"header" HREF=
"../../../../boost/iostreams/imbue.hpp"><CODE><boost/iostreams/detail/imbue.hpp
></CODE></A></DT>
35 <DT><A CLASS=
"header" HREF=
"../../../../boost/iostreams/operations.hpp"><CODE><boost/iostreams/detail/operations.hpp
></CODE></A></DT>
38 <A NAME=
"reference"></A>
41 <A NAME=
"synopsis"></A>
44 <PRE CLASS=
"broken_ie"><SPAN CLASS=
"keyword">namespace
</SPAN> boost {
<SPAN CLASS=
"keyword">namespace
</SPAN> iostreams {
46 <SPAN CLASS=
"keyword">template
</SPAN><<SPAN CLASS=
"keyword">typename
</SPAN> <A CLASS=
"documented" HREF=
"#template_params">T
</A>>
47 <SPAN CLASS=
"keyword">void
</SPAN> <A CLASS=
"documented" HREF=
"#semantics">imbue
</A>(T
& t,
<SPAN CLASS=
"keyword">const
</SPAN> std::locale
& loc);
49 } }
<SPAN CLASS=
"comment">// End namespace boost::io
</SPAN></PRE>
51 <A NAME=
"template_params"></A>
52 <H4>Template Parameters
</H4>
54 <TABLE STYLE=
"margin-left:2em" BORDER=
0 CELLPADDING=
2>
57 <TD VALIGN=
"top"><I>T
</I></TD><TD WIDTH=
"2em" VALIGN=
"top">-
</TD>
58 <TD>A model of one of the
<A HREF=
"../guide/concepts.html#filter_concepts">Filter
</A> or
<A HREF=
"../guide/concepts.html#device_concepts">Device
</A> concepts
</TD>
62 <A NAME=
"semantics"></A>
65 <P>The semantics of
<CODE>imbue
</CODE> for a Filter or Device type
<CODE>T
</CODE> depends on its
<A HREF=
"../guide/traits.html#category">category
</A> as follows:
</P>
67 <TABLE STYLE=
"margin-left:2em; margin-bottom:2em" BORDER=
1 CELLPADDING=
4>
68 <TR><TH><CODE>category_of
<T
>::type
</CODE></TH><TH>semantics
</TH></TR>
70 <TD VALIGN=
"top">Convertible to
<A HREF=
"../guide/traits.html#category_tags"><CODE>streambuf_tag
</CODE></A></TD>
71 <TD>calls
<CODE>t.pubimbue(loc)
</CODE></TD>
74 <TD VALIGN=
"top">Convertible to
<A HREF=
"../guide/traits.html#category_tags"><CODE>localizable_tag
</CODE></A> but not to
<A HREF=
"../guide/traits.html#category_tags"><CODE>streambuf_tag
</CODE></A></TD>
75 <TD>calls
<CODE>t.imbue(loc)
</CODE></TD>
78 <TD VALIGN=
"top"><I>otherwise
</I></TD>
87 <P CLASS=
"copyright">© Copyright
2008 <a href=
"http://www.coderage.com/" target=
"_top">CodeRage, LLC
</a><br/>© Copyright
2004-
2007 <a href=
"http://www.coderage.com/turkanis/" target=
"_top">Jonathan Turkanis
</a></P>
89 Distributed under the Boost Software License, Version
1.0. (See accompanying file LICENSE_1_0.txt or copy at
<A HREF=
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt
</A>)