c++缓冲区std::wstringbuf
参考:http://www.cplusplus.com/reference/sstream/wstringbuf/
std::wstringbuf
typedef basic_stringbuf<wchar_t> wstringbuf;
- wstreambuf
- wstringbuf
Stream buffer to read from and write towstringobjects.
Objects of this class maintain internally a sequence of wide characters that they use as their associated input sequence and/or associated output sequence. The internal sequence can be initialized from awstring object, or copied to one, using memberstr.
Access to the internal sequence of characters is given to streams by means of the interface offered by the virtual members inherited fromwstreambuf that are overriden in this class:
Member types
| member type | definition |
|---|---|
| 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 |
Public member functions
Note: The references to the members of its basic template (basic_stringbuf) are linked here.
- (constructor)
- Construct object (public member function )
- str
- Get/set content (public member function )
Public member functions inherited fromwstreambuf
Locales:
- pubimbue
- Imbue locale (public member function )
- getloc
- Get current locale (public member function )
Buffer management and positioning:
- pubsetbuf
- Set buffer array (public member function )
- pubseekoff
- Set internal position pointer to relative position (public member function )
- pubseekpos
- Set internal position pointer to absolute position (public member function )
- pubsync
- Synchronize stream buffer (public member function )
Input functions (get):
- in_avail
- Get number of character available to read (public member function )
- snextc
- Advance to next position and get character (public member function )
- sbumpc
- Get current character and advance to next position (public member function )
- sgetc
- Get current character (public member function )
- sgetn
- Get sequence of characters (public member function )
- sputbackc
- Put character back (public member function )
- sungetc
- Decrease current position (public member function )
Output functions (put):
- sputc
- Put character and advance to next position (public member function )
- sputn
- Put sequence of characters (public member function )
Protected virtual function overrides
Note: The references to the members of its basic template (basic_stringbuf) are linked here.
- setbuf
- Set buffer (protected virtual member function )
- seekoff
- Set position pointer to relative position (protected virtual member function )
- seekpos
- Set position pointer to absolute position (protected virtual member function )
- underflow
- Get character (protected virtual member function )
- pbackfail
- Put character back (protected virtual member function )
- overflow
- Put character (protected virtual member function )
The class also inherits other protected members that are non-virtual or not overridden. See base classwstreambuf for more details.
c++缓冲区std::wstringbuf的更多相关文章
- Google之Chromium浏览器源码学习——base公共通用库(三)
本节将介绍base公共通用库中的containers,其包含堆栈.列表.集合.以及Most Recently Used cache(最近使用缓存模板). linked_list.h:一个简单的列表类型 ...
- 不可或缺 Windows Native (13) - C++: 标准输入, 标准输出, 字符串内存流
[源码下载] 不可或缺 Windows Native (13) - C++: 标准输入, 标准输出, 字符串内存流 作者:webabcd 介绍不可或缺 Windows Native 之 C++ 标准输 ...
- C++中using的作用
[转自] http://www.cnblogs.com/yuaqua/archive/2011/10/22/2219991.html 1.在当前文件中引入命名空间 这是我们最熟悉的用法,例如:usin ...
- cpp(第六章)
1. #include <iostream> #include <limits> int main() { ; ) { std::cout<<"enter ...
- C++11 实现生产者消费者模式
代码都类似,看懂一个,基本都能理解了. 共有代码: #include <cstdlib>#include <condition_variable>#include <io ...
- C++ Primer 笔记——IO类
1.C++语言并未定义任何输入输出语句,取而代之,包含了一个全面的标准库来提供IO机制. 由上图能够知道,I/O操作的基类是ios_base,各个类的用途例如以下: <iostream> ...
- 分布式协议学习笔记(一) Raft 选举
Raft官网 官方可视化动画1 官方可视化动画2 论文中文翻译 论文英文地址 感觉作为paxos的升级精简版 Raft在设计之初就以容易理解为目标 看完资料 脑海里都有了大概的轮廓. 有了这些详细的资 ...
- C++11 并发指南九(综合运用: C++11 多线程下生产者消费者模型详解)
前面八章介绍了 C++11 并发编程的基础(抱歉哈,第五章-第八章还在草稿中),本文将综合运用 C++11 中的新的基础设施(主要是多线程.锁.条件变量)来阐述一个经典问题——生产者消费者模型,并给出 ...
- c++11实现optional
optional< T> c++14中将包含一个std::optional类,optional< T>内部存储空间可能存储了T类型的值也可能没有存储T类型的值.当optiona ...
随机推荐
- 没想到吧!关于Dubbo的『消费端线程池模型』官网也写错了。
这是why的第 63 篇原创文章 荒腔走板 大家好,我是 why,欢迎来到我连续周更优质原创文章的第 63 篇.老规矩,先荒腔走板聊聊其他的. 上面这张图片是我前几天整理相册的时候看到的.拍摄于 20 ...
- 【免费】windows下如何生成tar.gz,一键生成tar.gz
废话 一.实验背景 tar.gz 是Linux和Unix下面比较常用的格式,一条命令就可以把文件压缩打包成tar.gz格式,然而这种格式在windows并不多见. Linxu服务器上,tar.gz 包 ...
- android开发之 listview中的item去掉分割线 隐藏分割线
有三种方法: 1> 设置android:divider="@null" 2> android:divider="#00000000" #000000 ...
- 推荐一款强大的前端CLI命令行工具
背景 命令行界面交互开源工具 CloudBase CLI 自发布以来,受到了大量开发者的欢迎.近期,我们发布了新鲜打磨的 CloudBase CLI 1.0 Beta,引入了许多利于开发者的新特性,下 ...
- 把Employees显示在页面上
项目代码下载:https://files.cnblogs.com/files/xiandedanteng/gatling20200429-1.zip 需求:从后台DB取出雇员数据,显示在前台页面上: ...
- Python多行缩进反向缩进快捷键
1.Python增加缩进快捷键:Ctrl+Alt+] 或tab键或shift+tab键 2.Python减少缩进快捷键:Ctrl+Alt+[
- Linux:正则表达式2
基础正则表达式 ^ : 以xx开头 $ :以xx结尾 ^$ :代表空行 . 任意一个字符 \ :转义符号,让有着特殊意义的字符可被使用 * :重复0个或多个前面的字符,例如 a* 2表示a后面 ...
- 【吴恩达课程使用】pip安装pandas失败-anaconda各种玄学T-T-从新开始搭建环境
[吴恩达课程使用]安装pandas失败-从新开始搭建环境 在第五课第二周的任务2中,虚拟环境缺少pandas,sklearn依赖,因为用pip比较顺手,就直接使用pip安装,结果各种anaconda环 ...
- Hadoop框架:单服务下伪分布式集群搭建
本文源码:GitHub·点这里 || GitEE·点这里 一.基础环境 1.环境版本 环境:centos7 hadoop版本:2.7.2 jdk版本:1.8 2.Hadoop目录结构 bin目录:存放 ...
- C语言知识汇编
(20-) 1.局部变量:定义在大括号的变量是局部变量 作用域:从 定义变量到return或者遇到 } 结束为止 include <stdio.h> int main() { int nu ...