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. |
| Заголовочный файл <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.
| Определено в файле <ios>
| |
| Type
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. (public функция-член) | |
Кроме того, следующие функции члена и операторы должны быть обеспечены, хотя это не определено, если они являются членами или не членами.
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.
- Оператор преобразования, которая преобразует
fposв std::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. (определение типа) | |
| возвращает индикатор выхода положение 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. (public функция-член 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. (public функция-член 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. (функция) | |