cplusplus
.com
教程
參考
文章
論壇
C++
教程
參考
文章
論壇
參考
C 庫
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
C++11
<cfenv> (fenv.h)
<cfloat> (float.h)
C++11
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
C++11
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
C++11
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
C++11
<ctgmath> (tgmath.h)
<ctime> (time.h)
C++11
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
容器
C++11
<array>
<deque>
C++11
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
C++11
<unordered_map>
C++11
<unordered_set>
<vector>
輸入/輸出
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
多執行緒
C++11
<atomic>
C++11
<condition_variable>
C++11
<future>
C++11
<mutex>
C++11
<thread>
其他
<algorithm>
<bitset>
C++11
<chrono>
C++11
<codecvt>
<complex>
<exception>
<functional>
C++11
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
C++11
<random>
C++11
<ratio>
C++11
<regex>
<stdexcept>
<string>
C++11
<system_error>
C++11
<tuple>
C++11
<type_traits>
C++11
<typeindex>
<typeinfo>
<utility>
<valarray>
<sstream>
類模板
basic_istringstream
basic_ostringstream
basic_stringbuf
basic_stringstream
類
istringstream
ostringstream
stringbuf
stringstream
wistringstream
wostringstream
wstringbuf
wstringstream
參考
<sstream>
wstringbuf
類
<sstream>
std::
wstringbuf
typedef basic_stringbuf<wchar_t> wstringbuf;
字串流緩衝區(寬字元)
wstreambuf
wstringbuf
用於從
wstring
物件讀取和向其寫入的流緩衝區。
此類物件在內部維護一個寬字元序列,它們將其用作“關聯的輸入序列”和/或“關聯的輸出序列”。 可以使用成員函式
str
從
wstring
物件初始化內部序列,或者將其複製到
wstring
物件。
透過該類中重寫的
wstreambuf
虛成員提供的介面,將字元的內部序列提供給流。
成員型別
成員型別
定義
char_type
wchar_t
traits_type
char_traits
<wchar_t>
allocator_type
allocator
<wchar_t>
int_type
wint_t
pos_type
wstreampos
off_type
streamoff
公開成員函式
注意:此處連結了其基本模板(
basic_stringbuf
)的成員引用。
(建構函式)
構造物件
(公開成員函式)
str
獲取/設定內容
(公共成員函式)
從
wstreambuf
繼承的公有成員函式
區域設定
:
pubimbue
注入 locale
(公開成員函式)
getloc
獲取當前 locale
(公開成員函式)
緩衝區管理和定位
:
pubsetbuf
設定緩衝區陣列
(公有成員函式)
pubseekoff
將內部位置指標設定為相對位置
(公有成員函式)
pubseekpos
將內部位置指標設定為絕對位置
(公有成員函式)
pubsync
同步流緩衝區
(公有成員函式)
輸入函式 (get)
:
in_avail
獲取可讀的字元數
(公開成員函式)
snextc
前進到下一個位置並獲取字元
(公有成員函式)
sbumpc
獲取當前字元並前進到下一個位置
(公有成員函式)
sgetc
獲取當前字元
(公有成員函式)
sgetn
獲取字元序列
(公有成員函式)
sputbackc
放回字元
(公共成員函式)
sungetc
後退當前位置
(公有成員函式)
輸出函式 (put)
:
sputc
放置字元並前進到下一位置
(公開成員函式)
sputn
放置字元序列
(公有成員函式)
受保護的虛擬函式重寫
注意:此處連結了其基本模板(
basic_stringbuf
)的成員引用。
setbuf
設定緩衝區
(保護虛成員函式)
seekoff
將位置指標設定到相對位置
(受保護的虛成員函式)
seekpos
將位置指標設定為絕對位置
(受保護的虛成員函式)
underflow
獲取字元(受保護的虛成員函式)
pbackfail
放回字元
(受保護的虛成員函式)
overflow
放入字元
(保護的虛成員函式)
此類還繼承了其他非虛的或未被重寫的保護成員。有關更多詳細資訊,請參閱基類
wstreambuf
。