std::ios_base

来自cppreference.com
< cpp | io

 
 
输入/输出库
I / O操纵
C-风格的I / O
缓冲区
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(过时了)
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
抽象
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
文件I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
字符串I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
阵列的I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(过时了)
ostrstream(过时了)
strstream(过时了)
类型
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Error类的接口
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
std::ios_base
成员函数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::ios_base
ios_base::~ios_base
格式化
Original:
Formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::flags
ios_base::setf
ios_base::unsetf
ios_base::precision
ios_base::width
语言环境
Original:
Locales
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::imbue
ios_base::getloc
内部可扩展的阵列
Original:
Internal extensible array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::xalloc
ios_base::iword
ios_base::pword
杂项
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::register_callback
ios_base::sync_with_stdio
会员类别
Original:
Member classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::failure
ios_base::Init
会员类型
Original:
Member types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::openmode
ios_base::fmtflags
ios_base::iostate
ios_base::seekdir
ios_base::event
ios_base::event_callback
 
Defined in header <ios>
class ios_base;
ios_base是一种多用途,作为所有的I / O流类的基类的类。它维护了多种类型的数据:1
Original:
The class ios_base is a multipurpose class that serves as the base class for all I/O stream classes. It maintains several kinds of data:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
状态信息:流的状态标志
Original:
state information: stream status flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
控制信息:标记,以控制格式的输入和输出序列和灌输的语言环境
Original:
control information: flags that control formatting of both input and output sequences and the imbued locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
私有存储:索引可扩展的数据结构,该结构允许两个longvoid*成员,这可以被实现为两个任意长度的阵列或一个单一的阵列,两个元素的结构或另一个容器.
Original:
private storage: indexed extensible data structure that allows both long and void* members, which may be implemented as two arbitrary-length arrays or a single array of two-element structs or another container.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
回调:任意数量的用户定义函数被称为,灌输(),copyfmt(),,〜的ios_bas​​e()
Original:
callbacks: arbitrary number of user-defined functions to be called from imbue(), copyfmt(), and ~ios_base()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
典型的实现拥有成员常数对应的所有值fmtflags,iostate,openmode的,seekdir如下图所示,成员变量,以维持电流精度,宽度和格式化标志,异常掩码,的缓冲区错误状态,一个可调整大小的容器持有的回调,目前一脉相承的语言环境,私人存储和静态,整数变量xalloc().
Original:
Typical implementation holds member constants corresponding to all values of fmtflags, iostate, openmode, and seekdir shown below, member variables to maintain current precision, width, and formatting flags, the exception mask, the buffer error state, a resizeable container holding the callbacks, the currently imbued locale, the private storage, and a static integer variable for xalloc().
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 成员函数

构造对象
Original:
constructs the object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(受保护的成员函数) [edit]
[虚拟的] </ SPAN></div></div>
解构的对象
Original:
destructs the object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(虚拟公有成员函数) [edit]
格式化
Original:
Formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
管理格式的标志
Original:
manages format flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
设置特定格式的标志
Original:
sets specific format flag
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
clears specific format flag
(公共成员函数) [edit]
管理小数精度浮点运算
Original:
manages decimal precision of floating point operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
manages field width
(公共成员函数) [edit]
语言环境
Original:
Locales
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
设置场景
Original:
sets locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
返回当前的区域设置
Original:
returns current locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
内部可扩展的阵列
Original:
Internal extensible array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[静态的] </ SPAN></div></div>
返回一个程序范围内唯一的整数,它是安全使用指数PWORD()和iword()
Original:
returns a program-wide unique integer that is safe to use as index to pword() and iword()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共静态成员函数) [edit]
调整大小的私人存储,如果必要的,访问long元素在给定的索引
Original:
resizes the private storage if necessary and access to the long element at the given index
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
调整大小的私人存储,如果必要的,访问void*元素在给定的索引
Original:
resizes the private storage if necessary and access to the void* element at the given index
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
杂项
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
registers event callback function
(公共成员函数) [edit]
[静态的] </ SPAN></div></div>
C + +和C IO库的设置是否是可互操作的
Original:
sets whether C++ and C IO libraries are interoperable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共静态成员函数) [edit]

会员类别
Original:
Member classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

流异常
Original:
stream exception
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员类) [edit]
标准流对象进行初始化
Original:
initializes standard stream objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员类) [edit]

会员类型和常量
Original:
Member types and constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

类型
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
流开放的模式类型

有以下常量的定义:

常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation[edit]
app
寻求每次写操作之前的数据流结束
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
binary
打开二进制模式
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
in
打开阅读
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
out
打开写作
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
trunc
丢弃打开时的流的内容
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
ate
寻求到的数据流结束后,立即打开
Original:
seek to the end of stream immediately after open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
Original:
stream open mode type

The following constants are also defined:

常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation[edit]
app
寻求每次写操作之前的数据流结束
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
binary
打开二进制模式
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
in
打开阅读
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
out
打开写作
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
trunc
丢弃打开时的流的内容
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
ate
寻求到的数据流结束后,立即打开
Original:
seek to the end of stream immediately after open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(的typedef) [edit]
格式化标志类型

有以下常量的定义:

常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation[edit]
dec
使用十进制整数I / O
Original:
use decimal base for integer I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
oct
使用八进制基地整数I / O
Original:
use octal base for integer I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
hex
使用16进制整数I / O
Original:
use hexadecimal base for integer I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
basefield
dec|oct|hex|0。用于屏蔽操作
Original:
dec|oct|hex|0. Useful for masking operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
left
左调整(填充字符添加到右侧)
Original:
left adjustment (adds fill characters to the right)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
right
右调整(填充字符添加到左)
Original:
right adjustment (adds fill characters to the left)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
internal
内部调整(填充字符添加到内部指定的点)
Original:
internal adjustment (adds fill characters to the internal designated point)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
adjustfield
left|right|internal。用于屏蔽操作
Original:
left|right|internal. Useful for masking operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
scientific
产生的浮点类型,如果再加上固定用科学记数法,或十六进制记数法
Original:
generate floating point types using scientific notation, or hex notation if combined with fixed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
fixed
产生的浮点类型,使用固定的符号,或十六进制记数法如果与科学相结合
Original:
generate floating point types using fixed notation, or hex notation if combined with scientific
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
floatfield
scientific|fixed|(scientific|fixed)|0。用于屏蔽操作
Original:
scientific|fixed|(scientific|fixed)|0. Useful for masking operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
boolalpha
插入和提取bool类型字母数字格式
Original:
insert and extract bool type in alphanumeric format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
showbase
生成一个的前缀表示数字的整数输出基地,需要的I / O货币的货币指标
Original:
generate a prefix indicating the numeric base for integer output, require the currency indicator in monetary I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
showpoint
无条件地为浮点数输出生成一个小数点字符
Original:
generate a decimal-point character unconditionally for floating-point number output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
showpos
生成+字符对于非负的数值输出
Original:
generate a + character for non-negative numeric output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
skipws
一定的输入操作之前,跳过前导空白
Original:
skip leading whitespace before certain input operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
unitbuf
冲洗后的输出的每个输出操作
Original:
flush the output after each output operation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
uppercase
更换一定的小写字母与他们的uppercase
equivalents在一定的输出输出操作
Original:
replace certain lowercase letters with their uppercase
equivalents in certain output output operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
Original:
formatting flags type

The following constants are also defined:

常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation[edit]
dec
使用十进制整数I / O
Original:
use decimal base for integer I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
oct
使用八进制基地整数I / O
Original:
use octal base for integer I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
hex
使用16进制整数I / O
Original:
use hexadecimal base for integer I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
basefield
dec|oct|hex|0。用于屏蔽操作
Original:
dec|oct|hex|0. Useful for masking operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
left
左调整(填充字符添加到右侧)
Original:
left adjustment (adds fill characters to the right)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
right
右调整(填充字符添加到左)
Original:
right adjustment (adds fill characters to the left)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
internal
内部调整(填充字符添加到内部指定的点)
Original:
internal adjustment (adds fill characters to the internal designated point)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
adjustfield
left|right|internal。用于屏蔽操作
Original:
left|right|internal. Useful for masking operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
scientific
产生的浮点类型,如果再加上固定用科学记数法,或十六进制记数法
Original:
generate floating point types using scientific notation, or hex notation if combined with fixed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
fixed
产生的浮点类型,使用固定的符号,或十六进制记数法如果与科学相结合
Original:
generate floating point types using fixed notation, or hex notation if combined with scientific
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
floatfield
scientific|fixed|(scientific|fixed)|0。用于屏蔽操作
Original:
scientific|fixed|(scientific|fixed)|0. Useful for masking operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
boolalpha
插入和提取bool类型字母数字格式
Original:
insert and extract bool type in alphanumeric format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
showbase
生成一个的前缀表示数字的整数输出基地,需要的I / O货币的货币指标
Original:
generate a prefix indicating the numeric base for integer output, require the currency indicator in monetary I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
showpoint
无条件地为浮点数输出生成一个小数点字符
Original:
generate a decimal-point character unconditionally for floating-point number output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
showpos
生成+字符对于非负的数值输出
Original:
generate a + character for non-negative numeric output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
skipws
一定的输入操作之前,跳过前导空白
Original:
skip leading whitespace before certain input operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
unitbuf
冲洗后的输出的每个输出操作
Original:
flush the output after each output operation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
uppercase
更换一定的小写字母与他们的uppercase
equivalents在一定的输出输出操作
Original:
replace certain lowercase letters with their uppercase
equivalents in certain output output operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(的typedef) [edit]
流类型的状态

有以下常量的定义:

常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation[edit]
goodbit
没有错误
Original:
no error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
badbit
无法收回的流错误
Original:
irrecoverable stream error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
failbit
输入/输出操作失败,(格式化或提取错误)
Original:
input/output operation failed (formatting or extraction error)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
eofbit
相关的输入序列中已达到文件结束
Original:
associated input sequence has reached end-of-file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
Original:
state of the stream type

The following constants are also defined:

常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation[edit]
goodbit
没有错误
Original:
no error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
badbit
无法收回的流错误
Original:
irrecoverable stream error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
failbit
输入/输出操作失败,(格式化或提取错误)
Original:
input/output operation failed (formatting or extraction error)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
eofbit
相关的输入序列中已达到文件结束
Original:
associated input sequence has reached end-of-file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(的typedef) [edit]
seeking direction type

The following constants are also defined:

常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation[edit]
beg
流的开头
Original:
the beginning of a stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
end
流的结束
Original:
the ending of a stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
cur
流中的当前位置的位置指示器
Original:
the current position of stream position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]

(的typedef) [edit]
指定事件类型
Original:
specifies event type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(枚举) [edit]
回调函数类型
Original:
callback function type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(的typedef) [edit]
已过时的成员类型
Original:
Deprecated member types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
类型
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
io_state(过时了)
整数类型,也可以使用类似iostate
Original:
integer type that may be used like iostate
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
open_mode(过时了)
整数类型,也可以使用类似openmode
Original:
integer type that may be used like openmode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
seek_dir(过时了)
整数类型,也可以使用类似seekdir
Original:
integer type that may be used like seekdir
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff(过时了)
未指定的类型,也可以使用像off_type,不一定std::streamoff
Original:
unspecified type that may be used like off_type, not necessarily std::streamoff
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streampos(过时了)
未指定的类型,也可以使用像pos_type,不一定std::streampos
Original:
unspecified type that may be used like pos_type, not necessarily std::streampos
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

来自“http://zh.cppreference.com/mwiki/index.php?title=cpp/io/ios_base&oldid=27643