80 lines
4.3 KiB
HTML
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<CharT,Traits>::pubimbue, std::basic_streambuf<CharT,Traits>::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<CharT,Traits>::</span>pubimbue, <span style="font-size:0.7em; line-height:130%">std::basic_streambuf<CharT,Traits>::</span>imbue</h1>
|
|
<div id="bodyContent">
|
|
<div id="contentSub"><span class="subpages">< <a href="cpp.html">cpp</a>‎ | <a href="cpp-io.html">io</a>‎ | <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">&</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">&</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>更改关联的本地环境。</p>
|
|
<p>1) 设置 <code>loc</code> 为本地环境。调用最终导出类的 <code>imbue(loc)</code> 。</p>
|
|
<p>2) 此函数的基类版本无效果。导出类可覆写此函数以提示本地环境的更改。最终导出类可以在 <code>imbue()</code> 的调用间缓存本地环境和成员平面。</p>
|
|
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">参数</span></h3>
|
|
<table class="t-par-begin">
|
|
<tr class="t-par">
|
|
<td>loc</td>
|
|
<td>-</td>
|
|
<td>要关联的 locale 对象</td>
|
|
</tr>
|
|
</table>
|
|
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">返回值</span></h3>
|
|
<p>1) 先前关联的本地环境。</p>
|
|
<h3><span class="mw-headline" id=".E7.A4.BA.E4.BE.8B">示例</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="">本节未完成<br />
|
|
原因:暂无示例</td>
|
|
</tr>
|
|
</table>
|
|
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">参阅</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>获得相关本地环境的副本<br />
|
|
<span class="t-mark">(公开成员函数)</span></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|