参考: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. laravel kernel解析过程

    laravel kernel解析过程 前面的两篇laravel文章过后,可以在bootstrap/app.php中拿到$app这个实例, app.php中 接下来通过singleton方法绑定了三个闭 ...

  2. java初探(1)之登录补充

    在登录之后,可能服务器是分布式的,因此不能通过一个本地的session来管理登录信息,导致登录的信息不能传递,即在这台服务器上可以得到用户登录信息,但在那台就得不到.因此,需要设置分布式的sessio ...

  3. openresty(nginx+lua)初识

    1.新增项目配置文件: vim /usr/example/example1.conf --将以下内容加入example1.conf server { listen 80; server_name _; ...

  4. leetcode刷题-78子集

    题目 给定一组不含重复元素的整数数组 nums,返回该数组所有可能的子集(幂集). 说明:解集不能包含重复的子集. 示例: 输入: nums = [1,2,3]输出:[ [3],  [1],  [2] ...

  5. .NET Core 下使用 Apollo 配置中心

    Apollo(阿波罗)是携程框架部门研发的分布式配置中心,能够集中化管理应用不同环境.不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限.流程治理等特性,适用于微服务配置管理场景.服务 ...

  6. IAR错误Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition. At least 0xd more bytes needed. The problem occurred while processing the segment 的解决办法

    IAR for 8051 IDE version 9.10.1编译阿莫单片机的cc2541程序osal第一节教程出现错误如下 出错的愿意是iar设置错误.所以需修改IAR的设置. 解决办法如下: 即可 ...

  7. python 小脚本/自动重复访问网站(快速提高网页访问量)

    来到csdn也快两个月了,前前后后写了20篇博客,但才1800+的访问量,其中恐怕还有300多是我自己点的 有点桑心(┬_┬) 于是打算另辟蹊径,自己刷访问量代码如下,需要自取 import urll ...

  8. 本周 GitHub 速览:自动化当道,破密、爬虫各凭本事

    作者:HelloGitHub-小鱼干 摘要:安全门外汉,如何在不知道密钥或密码的情况下,破解哈希得到原文,Ciphey 会告诉你当中的密码.说到 auto 智能爬虫会基于上一次的爬虫经历进一步学习以获 ...

  9. 再不迁移到Material Design Components 就out啦

    翻译自国外文档加自己理解 原文 我们最近宣布了 Material Design Components(MDC)1.1.0 ,这是一个库更新,为您的 Android 应用程序带来了 Material T ...

  10. 人人框架renren-security |小记(第一篇)

    ​ 一丶首先介绍一下人人框架: 1.简介 renren-security | 轻量级权限管理系统 采用Spring.MyBatis.Shiro框架,开发的一套权限系统,极低门槛,拿来即用 支持分布式部 ...