参考: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. 使用python制作趣味小游戏—投骰子

    1.模拟真实环境掷骰子 从Python标准库中调用模块:random——random中包含以各种方式生成随机数的函数 从random中引用randint这一函数——骰子都是有固定面数 from ran ...

  2. Android项目智能机器人的实现,带有源代码,图灵智能机器人,详细讲解。。

    大家好,今天给大家推荐一个我利用图灵api制作的android项目,智能机器人,类似智能小冰,等一些会机器人. 下面看效果.女头像是系统自动给你回复的,男头像是你输入的内容.项目源代码是eclipse ...

  3. Zookeeper高级

    1.1. 一致性协议概述 前面已经讨论过,在分布式环境下,有很多不确定性因素,故障随时都回发生,也讲了CAP理论,BASE理论 我们希望达到,在分布式环境下能搭建一个高可用的,且数据高一致性的服务,目 ...

  4. 腾讯云 云开发 部署 Blazor网站

    Blazor 应用程序除了在 Github Pages/Gitee Pages等静态资源部署以外,现在你有了一个新的选择,那就是使用云开发静态网站功能来部署啦! 系统依赖 在进行后续的内容前,请先确保 ...

  5. java输出1-100之间的数并求和for+while+do while实现

    public static void main(String args[]) {//do while int sum = 0; //当前之和 int i = 1; //加数 do { if (i%2= ...

  6. 通过调用标识符确定this

    一. 纲 this的性质 作用:表示函数执行时的环境 值:一个对象 特点:动态性 确定this的难度 JS语言的动态性: 函数的this在执行时才能确定 函数为一级公民 可作实参.返回值.数据赋值进行 ...

  7. Cutting Game(POJ 2311)

    原题如下: Cutting Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5721   Accepted: 208 ...

  8. swift基本体验

    Swift初体验 1. 导入框架 2. 定义标识符: let/var 3. 语句结束时;可以省略 4. print() 5. let/var 6. 逻辑分支 7. 循环使用 // 1.Swift中如何 ...

  9. Linux常用的三种软件安装方式

    一:Linux源码安装    1.解压源码包文件    源码包通常会使用tar工具归档然后使用gunzip或bzip2进行压缩,后缀格式会分别为.tar.gz与.tar.bz2,分别的解压方式:   ...

  10. 用后台开发的逻辑理念学习VUE

    前言 近些年前端开发快速发展,现在学习前端已经不像以前那样仅仅学习一个语法就可以了,它已经是一门编程技术了,它们有自己独立的类似Main函数的入口,有像MVC一样规范好的层次结构,有自己的开发工具可以 ...