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 ...
随机推荐
- 善用Bash history 命令
大家好,我是良许 相信大家平时都有用 history 命令来查看命令历史记录,但是实际上 history 命令并非只有这个功能,history 还有很多有用的功能.尤其是 Bash 版本的 histo ...
- Easy Game(记忆化搜索)
You are playing a two player game. Initially there are n integer numbers in an array and player A an ...
- 绝世好题(线性dp)
给定一个长度为n的数列ai,求ai的子序列bi的最长长度,满足bi&bi-1!=0(2<=i<=len). Input 输入文件共2行. 第一行包括一个整数n. 第二行包括n个 ...
- Dungeon Master(三维bfs)
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of un ...
- 如何编写高质量的C#代码(一)
从"整洁代码"谈起 一千个读者,就有一千个哈姆雷特,代码质量也同样如此. 想必每一个对于代码有追求的开发者,对于"高质量"这个词,或多或少都有自己的一丝理解.当 ...
- Java面试题(1):详解int与Integer
Java面试题(1):详解int与Integer int与Integer的区别 int是Java的基本数据类型之一,Integer是int的包装类 int直接再内存中储存值,Integer进行new操 ...
- Zabbix housekeeper processes more than 75% busy
原因分析 为了防止数据库持续增大,Zabbix有自动删除历史数据的机制,即housekeeper,而在频繁清理历史数据的时候,MySQL数据库可能出现性能降低的情况,此时就会告警. 一般来说,Zabb ...
- mybatis-spring-boot-starter 1.3.0 操作实体类的SpringBoot例子
例程下载:https://files.cnblogs.com/files/xiandedanteng/gatling20200428-02.zip 需求:使用mybatis实现对hy_emp表的CRU ...
- 在logback的fileNamePattern配置%i 带来的异常
我在logback的配置文件中企图这样配置: <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPol ...
- 关于“枚举{0,1,...,n-1}所包含的所有大小为k的子集”的理解
前言 今天整理以前的竞赛笔记时,发现了当时写的一个模板: 枚举{0,1,-,n-1}所包含的所有大小为k的子集: int comb = (1 << k) - 1; while (comb ...