std::fpos
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <ios>
|
||
| template< class State > class fpos; |
||
专业化的类模板std::fpos识别流或在一个文件中的绝对位置。每个对象类型
fpos持有的字节流中的位置(通常作为一个私有成员的类型std::streamoff)和当前的移动状态,State(通常是一个类型的值std::mbstate_t)Original:
Specializations of the class template std::fpos identify absolute positions in a stream or in a file. Each object of type
fpos holds the byte position in the stream (typically as a private member of type std::streamoff) and the current shift state, a value of type State (typically std::mbstate_t).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
四个专业std::fpos
Original:
Four specializations of std::fpos are provided:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<ios> | |
| 类型
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
streampos
|
std::fpos<std::char_traits<char>::state_type> |
u16streampos
|
std::fpos<std::char_traits<char16_t>::state_type> |
u32streampos
|
std::fpos<std::char_traits<char32_t>::state_type> |
wstreampos
|
std::fpos<std::char_traits<wchar_t>::state_type> |
[编辑] 成员函数
| 获取/设置值的移位状态 Original: gets/sets the value of the shift state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
此外,下面的成员函数和运营商必须提供,虽然它的指定,如果他们是成员或非成员.
Original:
In addition, the following member functions and operators must be provided, although it's unspecified if they are members or non-member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- 构造函数接受一个参数的类型int的Original:A constructor that accepts an argument of type int.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 的构造函数接受一个参数的类型std::streamoff。此构造还必须接受特殊的价值std::streamoff(-1):以这种方式构造的
std::fpos传回的一些流操作来表示错误.Original:A constructor that accepts an argument of type std::streamoff. This constructor must also accept the special value std::streamoff(-1): thestd::fposconstructed in this manner is returned by some stream operations to indicate errors.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 转换操作符转换
fposstd::streamoff的偏移量std::fpos(0)值等于.Original:A conversion operator that convertsfposto std::streamoff with the value equal to the offset fromstd::fpos(0).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- operator==比较两个对象的类型
std::fpos和返回值的类型转换为boolOriginal:operator== that compares two objects of typestd::fposand returns a value of type convertible to boolThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- operator!=比较两个对象的类型
std::fpos和返回值的类型转换为boolOriginal:operator!= that compares two objects of typestd::fposand returns a value of type convertible to boolThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- operator+operator+=可以添加std::streamoff
std::fposOriginal:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- operator-和operator-=可以减去std::streamoff从
std::fposOriginal:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- operator-可以减去两个对象的类型
std::fpos产生std::streamoffOriginal:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 另请参阅
| 表示相对文件/流的位置(偏离FPOS),足以代表任何文件的大小 Original: represents relative file/stream position (offset from fpos), sufficient to represent any file size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |
| 返回的输出位置指示器 Original: returns the output position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_ostream)
| |
| 设置输出位置指示器 Original: sets the output position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_ostream)
| |
| 获取文件位置指示器 Original: gets the file position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |