C++ 教程

C++ 教程 C++ 简介 C++ 入门 C++ 语法 C++ 输出 C++ 注释 C++ 变量 C++ 用户输入 C++ 数据类型 C++ 运算符 C++ 字符串 C++ 数学运算 C++ 布尔值 C++ 条件语句 C++ Switch 语句 C++ While 循环 C++ For 循环 C++ Break/Continue 语句 C++ 数组 C++ 引用 C++ 指针

C++ 函数

C++ 函数 C++ 函数参数 C++ 函数重载

C++ 面向对象

C++ OOP C++ 类和对象 C++ 类方法 C++ 构造函数 C++ 访问修饰符 C++ 封装 C++ 继承 C++ 多态

C++ 高级教程

C++ 文件 C++ 异常处理 C++ 动态内存 C++ 命名空间 C++ 模板 C++ 预处理器 C++ 信号处理 C++ 多线程 C++ Web 编程 C++ 正则表达式

C++ 如何使用

C++ 两个数字相加

C++ 标准库参考

C++ 标准库 - 简介 C++ 标准库 - <fstream> C++ 标准库 - <iomanip> C++ 标准库 - <ios> C++ 标准库 - <iosfwd> C++ 标准库 - <iostream> C++ 标准库 - <istream> C++ 标准库 - <ostream> C++ 标准库 - <sstream> C++ 标准库 - <streambuf> C++ 标准库 - <atomic> C++ 标准库 - <complex> C++ 标准库 - <exception> C++ 标准库 - <functional> C++ 标准库 - <limits> C++ 标准库 - <locale> C++ 标准库 - <memory> C++ 标准库 - <new> C++ 标准库 - <numeric> C++ 标准库 - <regex> C++ 标准库 - <stdexcept> C++ 标准库 - <string> C++ 标准库 - <thread> C++ 标准库 - <tuple> C++ 标准库 - <typeinfo> C++ 标准库 - <utility> C++ 标准库 - <valarray>

C++ 模板库参考

C++ STL 库 - <array> C++ STL 库 - <bitset> C++ STL 库 - <deque> C++ STL 库 - <forward_list> C++ STL 库 - <list> C++ STL 库 - <map> C++ STL 库 - <queue> C++ STL 库 - <set> C++ STL 库 - <stack> C++ STL 库 - <unordered_map> C++ STL 库 - <unordered_set> C++ STL 库 - <vector> C++ STL 库 - <algorithm> C++ STL 库 - <iterator>

C++ 实例

C++ 实例 C++ 练习 C++ 测验



C++ 库 - <wstreambuf>

简介

它是流(宽)的 ase 缓冲区类。


定义

下面是 std::wstreambuf 的定义。

typedef basic_streambuf<wchar_t> wstreambuf;

参数

  • charT − 字符类型。

  • traits − 定义流对象使用的字符的基本属性的字符特征类。

从 basic_streambuf 继承的公共成员函数

序号 语言环境 & 定义
1 event

Type to indicate event type

2 event_callback

Event callback function type

公共成员函数

序号 成员类型 & 定义
1 pubimbue

It is an imbue locale

2 getloc

It is used to get current locale

缓冲区管理与定位

序号 缓冲区管理与定位 & 定义
1 pubsetbuf

It is used to set buffer array

2 pubseekoff

It is used to set internal position pointer to relative position

3 pubseekpos

It is used to set internal position pointer to absolute position

4 pubsync

It is used to synchronize stream buffer

输入函数

序号 输入函数 & 定义
1 in_avail

It is used to get number of character available to read

2 snextc

It is used to advance to next position and get character

3 sbumpc

It is used to get current character and advance to next position

4 sgetc

It is used to get current character

5 sgetn

It is used to get sequence of characters

6 sputbackc

It is used to put character back

7 sungetc

It is used to decrease current position

输出函数

序号 Output & 定义
1 sputc

It is used to put character and advance to next position

2 sputn

It is used to put sequence of characters

Protected virtual function overrides

序号 virtual function & 定义
1 setbuf

It is used to set buffer

2 seekoff

It is used to set position pointer to relative position

3 seekpos

It is used to set position pointer to absolute position

4 underflow

It is used to get character

5 pbackfail

It is used to put character back

6 overflow

It is used to put character

受保护的成员函数

以下受保护的成员函数提供对这些指针的访问 −

输入序列

序号 输入序列 & 定义
1 eback

It is used in pointer to beginning of input sequence

2 gptr

It is used in pointer to current position of input sequence

3 egptr

It is used in pointer to end of input sequence

4 gbump

It is used to get pointer

5 setg

It is used to set input sequence pointers

输出序列(put)

序号 Output sequence & 定义
1 pbase

It is used in pointer to beginning of output sequence

2 pptr

It is used in pointer to current position of output sequence

3 epptr

It is used in pointer to end of output sequence

4 pbump

It is used to increase put pointer

5 setp

It is used to set output sequence pointers

复制

序号 复制 & 定义
1 operator=

It is used in stream buffer assignment

2 swap

It is used in wap stream buffers