Files
hustoj/web/cppreference-zh/chmhelp/cpp-io-basic_streambuf-pubimbue.html
2025-08-01 12:57:54 +08:00

80 lines
4.3 KiB
HTML

<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>std::basic_streambuf&lt;CharT,Traits&gt;::pubimbue, std::basic_streambuf&lt;CharT,Traits&gt;::imbue</title>
<link rel="stylesheet" href="ext.css" />
<link rel="stylesheet" href="site_modules.css" />
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_io_basic_streambuf_pubimbue skin-cppreference2 action-view cpp-navbar">
<div id="cpp-content-base">
<div id="content"><a id="top"></a>
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">std::basic_streambuf&lt;CharT,Traits&gt;::</span>pubimbue, <span style="font-size:0.7em; line-height:130%">std::basic_streambuf&lt;CharT,Traits&gt;::</span>imbue</h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="cpp.html">cpp</a>&lrm; | <a href="cpp-io.html">io</a>&lrm; | <a href="cpp-io-basic_streambuf.html">basic streambuf</a></span></div>
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
<table class="t-dcl-begin">
<tbody>
<tr class="t-dcl">
<td>
<div><span class="mw-geshi cpp source-cpp"><a href="cpp-locale-locale.html"><span class="kw1894">std::<span class="me2">locale</span></span></a> pubimbue<span class="br0">(</span> <span class="kw4">const</span> <a href="cpp-locale-locale.html"><span class="kw1894">std::<span class="me2">locale</span></span></a><span class="sy3">&amp;</span> loc <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td>(1)</td>
<td class="t-dcl-nopad"></td>
</tr>
<tr class="t-dcl">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">protected</span><span class="sy4">:</span><br />
<span class="kw1">virtual</span> <span class="kw4">void</span> imbue<span class="br0">(</span> <span class="kw4">const</span> <a href="cpp-locale-locale.html"><span class="kw1894">std::<span class="me2">locale</span></span></a><span class="sy3">&amp;</span> loc <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td>(2)</td>
<td class="t-dcl-nopad"></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&#26356;&#25913;&#20851;&#32852;&#30340;&#26412;&#22320;&#29615;&#22659;&#12290;</p>
<p>1) &#35774;&#32622; <code>loc</code> &#20026;&#26412;&#22320;&#29615;&#22659;&#12290;&#35843;&#29992;&#26368;&#32456;&#23548;&#20986;&#31867;&#30340; <code>imbue(loc)</code> &#12290;</p>
<p>2) &#27492;&#20989;&#25968;&#30340;&#22522;&#31867;&#29256;&#26412;&#26080;&#25928;&#26524;&#12290;&#23548;&#20986;&#31867;&#21487;&#35206;&#20889;&#27492;&#20989;&#25968;&#20197;&#25552;&#31034;&#26412;&#22320;&#29615;&#22659;&#30340;&#26356;&#25913;&#12290;&#26368;&#32456;&#23548;&#20986;&#31867;&#21487;&#20197;&#22312; <code>imbue()</code> &#30340;&#35843;&#29992;&#38388;&#32531;&#23384;&#26412;&#22320;&#29615;&#22659;&#21644;&#25104;&#21592;&#24179;&#38754;&#12290;</p>
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">&#21442;&#25968;</span></h3>
<table class="t-par-begin">
<tr class="t-par">
<td>loc</td>
<td>-</td>
<td>&#35201;&#20851;&#32852;&#30340; locale &#23545;&#35937;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">&#36820;&#22238;&#20540;</span></h3>
<p>1) &#20808;&#21069;&#20851;&#32852;&#30340;&#26412;&#22320;&#29615;&#22659;&#12290;</p>
<h3><span class="mw-headline" id=".E7.A4.BA.E4.BE.8B">&#31034;&#20363;</span></h3>
<table class="metadata plainlinks ambox mbox-small-left ambox-notice" style="">
<tr>
<td class="mbox-empty-cell"></td>
<td class="mbox-text" style="">&#26412;&#33410;&#26410;&#23436;&#25104;<br />
&#21407;&#22240;&#65306;&#26242;&#26080;&#31034;&#20363;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">&#21442;&#38405;</span></h3>
<table class="t-dsc-begin">
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-basic_streambuf-getloc.html"><span class="t-lines"><span>getloc</span></span></a></div>
</div>
</td>
<td>&#33719;&#24471;&#30456;&#20851;&#26412;&#22320;&#29615;&#22659;&#30340;&#21103;&#26412;<br />
<span class="t-mark">(&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>