参考:http://www.cplusplus.com/reference/sstream/wstringbuf/

class
<sstream>

std::wstringbuf

typedef basic_stringbuf<wchar_t> wstringbuf;
String stream buffer (wide)

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的更多相关文章

  1. Google之Chromium浏览器源码学习——base公共通用库(三)

    本节将介绍base公共通用库中的containers,其包含堆栈.列表.集合.以及Most Recently Used cache(最近使用缓存模板). linked_list.h:一个简单的列表类型 ...

  2. 不可或缺 Windows Native (13) - C++: 标准输入, 标准输出, 字符串内存流

    [源码下载] 不可或缺 Windows Native (13) - C++: 标准输入, 标准输出, 字符串内存流 作者:webabcd 介绍不可或缺 Windows Native 之 C++ 标准输 ...

  3. C++中using的作用

    [转自] http://www.cnblogs.com/yuaqua/archive/2011/10/22/2219991.html 1.在当前文件中引入命名空间 这是我们最熟悉的用法,例如:usin ...

  4. cpp(第六章)

    1. #include <iostream> #include <limits> int main() { ; ) { std::cout<<"enter ...

  5. C++11 实现生产者消费者模式

    代码都类似,看懂一个,基本都能理解了. 共有代码: #include <cstdlib>#include <condition_variable>#include <io ...

  6. C++ Primer 笔记——IO类

    1.C++语言并未定义任何输入输出语句,取而代之,包含了一个全面的标准库来提供IO机制. 由上图能够知道,I/O操作的基类是ios_base,各个类的用途例如以下: <iostream> ...

  7. 分布式协议学习笔记(一) Raft 选举

    Raft官网 官方可视化动画1 官方可视化动画2 论文中文翻译 论文英文地址 感觉作为paxos的升级精简版 Raft在设计之初就以容易理解为目标 看完资料 脑海里都有了大概的轮廓. 有了这些详细的资 ...

  8. C++11 并发指南九(综合运用: C++11 多线程下生产者消费者模型详解)

    前面八章介绍了 C++11 并发编程的基础(抱歉哈,第五章-第八章还在草稿中),本文将综合运用 C++11 中的新的基础设施(主要是多线程.锁.条件变量)来阐述一个经典问题——生产者消费者模型,并给出 ...

  9. c++11实现optional

    optional< T> c++14中将包含一个std::optional类,optional< T>内部存储空间可能存储了T类型的值也可能没有存储T类型的值.当optiona ...

随机推荐

  1. Android开发之ListView详解 以及简单的listView优化

    ListView列表视图 最常用的控件之一,使用场景例如:微信,手机QQ等等. android:divider:每个item之间的分割线,可以使用图片或者色值. android:dividerHeig ...

  2. 为什么建议软件测试自学而不推荐去IT培训机构?浅谈IT培训机构存在的意义

    原文地址:https://www.jianshu.com/p/447c65654e84 哥们别太天真啦,知乎上那些到处以大神自居,说培训机构各种神坑不靠谱的,绝对是无利不起早的,很多都是借着贬低别人来 ...

  3. Photon PUN 二 大厅 & 房间

    一, 简介 玩过 LOL , dota2, 王者荣耀 等MOBA类的游戏,就很容易理解大厅和房间了. LOL中一个服务器就相当与一个大厅; 什么电一,电二 ,,, 联通一区等 每一个区就相当于一个大厅 ...

  4. 面试【JAVA基础】其他

    1.自定义注解 @target 说明了Annotation所修饰的对象范围: constructor.method.field.package.type等等. @retention 定义了该Annot ...

  5. Dubbo系列之 (六)服务订阅(3)

    辅助链接 Dubbo系列之 (一)SPI扩展 Dubbo系列之 (二)Registry注册中心-注册(1) Dubbo系列之 (三)Registry注册中心-注册(2) Dubbo系列之 (四)服务订 ...

  6. BasicInterpreter2 改进版,简化了print函数

    源码:https://files.cnblogs.com/files/heyang78/BasicInterpreter2-20200601-3.rar 改进后使得变量和字符串可以一起输出了. 输入脚 ...

  7. CentOS 7常用命令

    常用命令 文件与目录操作 命令 解析 cd /home 进入 ‘/home’ 目录 cd .. 返回上一级目录 cd ../.. 返回上两级目录 cd - 返回上次所在目录 cp file1 file ...

  8. nginx系列(七)静态文件合并combo

    根据雅虎性能优化准则,可以将大量的小型JS文件进行合并,用来提高WEB服务器的性能.下面就是笔者的一个实践. 目前必须安装在1.4.+才可以 官方:http://wiki.nginx.org/Http ...

  9. composer 三大组成部分

    composer 三大组成部分:1. 仓库 2. 命令行下载器 3. 自动加载. 1. 仓库 公有仓库 https://packagist.org 私有仓库 https://packagist.com ...

  10. sql注入 报错注入常用的三种函数

    1.floor()函数 报错原因是 报错的原因是因为rand()函数在查询的时候会执行一次,插入的时候还会执行一次.这就是整个语句报错的关键 前面说过floor(rand(0)*2) 前六位是0110 ...