std::basic_fstream
De 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. |
| Definido no cabealho <fstream>
|
||
template< class CharT, class Traits = std::char_traits<CharT> > class basic_fstream : public std::basic_iostream<CharT, Traits> |
||
O
basic_fstream modelo de classe implementa alto nvel de entrada / sada operaes em arquivos correntes baseados. Ele interage um streambuffer baseado em arquivo (std::basic_filebuf) com a interface de alto nvel de (std::basic_iostream).Original:
The class template
basic_fstream implements high-level input/output operations on file based streams. It interfaces a file-based streambuffer (std::basic_filebuf) with the high-level interface of (std::basic_iostream).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.
Uma implementao tpica de
std::basic_fstream detm apenas um no-membro derivado de dados: uma instncia de std::basic_filebuf<CharT, Traits>.Original:
A typical implementation of
std::basic_fstream holds only one non-derived data member: an instance of std::basic_filebuf<CharT, Traits>.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.
Inheritance diagram
Duas especializaes para tipos de caracteres comuns tambm esto definidos:
Original:
Two specializations for common character types are also defined:
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
<fstream> | |
Tipo
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 |
fstream
|
basic_fstream<char>
|
wfstream
|
basic_fstream<wchar_t>
|
Tipos de membro
Tipo de membro
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT
|
traits_type
|
Traits
|
int_type
|
Traits::int_type
|
pos_type
|
Traits::pos_type
|
off_type
|
Traits::off_type
|
Funes de membro
constri o fluxo de arquivo Original: constructs the file stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo pblica membro) | |
(destructor) [virtual] (declarada implicitamente) |
destructs the basic_fstream and the associated buffer, closes the file (funo pblica virtual membro) |
(C++11) |
move o fluxo de arquivo Original: moves the file stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo pblica membro) |
(C++11) |
troca dois fluxos de arquivo Original: swaps two file streams The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo pblica membro) |
retorna o objeto dispositivo subjacente de arquivo RAW Original: returns the underlying raw file device object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo pblica membro) | |
Original: File operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Verifica se o fluxo tem um arquivo associado Original: checks if the stream has an associated file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo pblica membro) | |
abre um arquivo e associa com o fluxo Original: opens a file and associates it with the stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo pblica membro) | |
fecha o arquivo associado Original: closes the associated file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo pblica membro) | |
No-membros funes
o algoritmo especializado std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
Herdado de std::basic_istream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
extratos dados formatados Original: extracts formatted data 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_istream funo pblica membro)
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
extratos personagens Original: extracts characters 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_istream funo pblica membro)
| |
l o prximo caractere sem extra-lo Original: reads the next character without extracting it 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_istream funo pblica membro)
| |
unextracts um personagem Original: unextracts a character 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_istream funo pblica membro)
| |
coloca personagem em fluxo de entrada Original: puts character into input stream 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_istream funo pblica membro)
| |
extratos de caracteres at o carter dado foi encontrado Original: extracts characters until the given character is found 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_istream funo pblica membro)
| |
extratos e personagens descarta at o carter dado foi encontrado Original: extracts and discards characters until the given character is found 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_istream funo pblica membro)
| |
extrai blocos de caracteres Original: extracts blocks of characters 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_istream funo pblica membro)
| |
extrai blocos j disponveis de caracteres Original: extracts already available blocks of characters 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_istream funo pblica membro)
| |
retorna o nmero de caracteres extrados por operao de entrada passado no formatado Original: returns number of characters extracted by last unformatted input operation 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_istream funo pblica membro)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
retorna o indicador de posio de entrada Original: returns the input 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_istream funo pblica membro)
| |
| sets the input position indicator (of std::basic_istream funo pblica membro)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
sincroniza com o dispositivo de armazenamento subjacente Original: synchronizes with the underlying storage device 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_istream funo pblica membro)
| |
Member classes
| implements basic logic for preparation of the stream for input operations (of std::basic_istream public class membro)
| |
Herdado de std::basic_ostream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
insere dados formatados Original: inserts formatted data 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 funo pblica membro)
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
insere um caractere Original: inserts a character 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 funo pblica membro)
| |
insere blocos de caracteres Original: inserts blocks of characters 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 funo pblica membro)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
retorna o indicador de posio de sada 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 funo pblica membro)
| |
define o indicador de posio de sada 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 funo pblica membro)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
sincroniza com o dispositivo de armazenamento subjacente Original: synchronizes with the underlying storage device 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 funo pblica membro)
| |
Member classes
implementa a lgica de base para a preparao do fluxo de sada para as operaes Original: implements basic logic for preparation of the stream for output operations 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 public class membro)
| |
Herdado de std::basic_ios
Member types
Tipo de membro
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT
|
traits_type
|
Traits
|
int_type
|
Traits::int_type
|
pos_type
|
Traits::pos_type
|
off_type
|
Traits::off_type
|
Original: State functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
verifica se no ocorreu nenhum erro ou seja, I / O operaes esto disponveis Original: checks if no error has occurred i.e. I/O operations are available 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_ios funo pblica membro)
| |
verifica se fim-de-arquivo foi atingido Original: checks if end-of-file has been reached 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_ios funo pblica membro)
| |
verifica se um erro recupervel ocorreu Original: checks if a recoverable error has occurred 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_ios funo pblica membro)
| |
verifica se um erro no-recupervel ocorreu Original: checks if a non-recoverable error has occurred 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_ios funo pblica membro)
| |
Verifica se um erro ocorreu (sinnimo de fail()) Original: checks if an error has occurred (synonym of fail()) 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_ios funo pblica membro)
| |
(at C++11) (desde C++11) |
verifica se no ocorreu nenhum erro (sinnimo de !fail())Original: checks if no error has occurred (synonym of !fail())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_ios funo pblica membro)
|
retorna bandeiras estaduais Original: returns state flags 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_ios funo pblica membro)
| |
define bandeiras estaduais Original: sets state flags 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_ios funo pblica membro)
| |
apaga bandeiras de erro e eof Original: clears error and eof flags 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_ios funo pblica membro)
| |
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
cpias formatar informaes Original: copies formatting information 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_ios funo pblica membro)
| |
gerencia o caractere de preenchimento Original: manages the fill character 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_ios funo pblica membro)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| manages exception mask (of std::basic_ios funo pblica membro)
| |
define a localidade Original: sets the locale 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_ios funo pblica membro)
| |
administra buffer de fluxo associado Original: manages associated stream buffer 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_ios funo pblica membro)
| |
gerencia fluxo amarrado Original: manages tied stream 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_ios funo pblica membro)
| |
estreita caracteres Original: narrows characters 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_ios funo pblica membro)
| |
| widens characters (of std::basic_ios funo pblica membro)
| |
Herdado de std::ios_base
Member functions
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
administra sinalizadores de formato 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. (of std::ios_base funo pblica membro)
| |
define como formato especfico 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. (of std::ios_base funo pblica membro)
| |
| clears specific format flag (of std::ios_base funo pblica membro)
| |
gerencia preciso decimal de operaes de ponto flutuante 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. (of std::ios_base funo pblica membro)
| |
| manages field width (of std::ios_base funo pblica membro)
| |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
define localidade 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. (of std::ios_base funo pblica membro)
| |
retorna local atual 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. (of std::ios_base funo pblica membro)
| |
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. | |
[esttica] |
retorna um inteiro todo o programa original que seguro para utilizao como ndice para pword () e 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. (of std::ios_base funo public static membro)
|
redimensiona a armazenagem privada, se necessrio e acesso ao elemento long no ndice fornecidoOriginal: resizes the private storage if necessary and access to the long element at the given indexThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (of std::ios_base funo pblica membro)
| |
redimensiona a armazenagem privada, se necessrio e acesso ao elemento void* no ndice fornecidoOriginal: resizes the private storage if necessary and access to the void* element at the given indexThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (of std::ios_base funo pblica membro)
| |
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 (of std::ios_base funo pblica membro)
| |
[esttica] |
define se C + + e bibliotecas C IO so interoperveis 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. (of std::ios_base funo public static membro)
|
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. | |
exceo fluxo 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. (of std::ios_base public class membro)
| |
inicializa objetos de fluxo padro 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. (of std::ios_base public class membro)
| |
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tipo
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fluxo tipo de modo aberto
As constantes tambm esto definidos:
Original: stream open mode type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tipo de bandeiras formatao
As constantes tambm esto definidos:
Original: formatting flags type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
estado do tipo de fluxo
As constantes tambm esto definidos:
Original: state of the stream type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| seeking direction type
The following constants are also defined:
(typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
especifica o tipo de evento 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. (enum) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
callback tipo de funo 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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||