std::basic_fstream
De cppreference.com
[] |
Esta pgina se ha traducido por ordenador/computador/computadora de la versin en ingls de la Wiki usando Google Translate.
La traduccin puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versin original. Puedes ayudar a corregir los errores y mejorar la traduccin. Para instrucciones haz clic aqu. |
| Definido en el archivo de encabezado <fstream>
|
||
template<
class CharT,
class Traits = std::char_traits<CharT>
> class basic_fstream : public std::basic_iostream<CharT, Traits>
|
||
La plantilla de clase
basic_fstream implementa las operaciones de alto nivel de entrada / salida de secuencias basadas en archivos. Conecta un streambuffer basado en archivos (std::basic_filebuf) con la interfaz de alto nivel 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.
Una implementacin tpica de
std::basic_fstream tiene slo un miembro de datos no derivado: una instancia 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
Dos especializaciones para tipos de caracteres comunes tambin estn definidas:
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.
Definido en el encabezado
<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 miembros
Miembro de tipo
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; el programa est mal formado si Traits::char_type
no es |
int_type
|
Traits::int_type
|
pos_type
|
Traits::pos_type
|
off_type
|
Traits::off_type
|
Las funciones miembro
construye la secuencia de archivo 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. (funcin miembro pblica) | |
(destructor) [virtual] (implcitamente declarado) |
destructs the basic_fstream and the associated buffer, closes the file (funcin miembro virtual pblica) |
(C++11) |
mueve la secuencia de archivo 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. (funcin miembro pblica) |
(C++11) |
swaps de dos arroyos de archivos 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. (funcin miembro pblica) |
devuelve el objeto subyacente prima de archivos del dispositivo 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. (funcin miembro pblica) | |
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. | |
Comprueba si el flujo tiene un archivo asociado 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. (funcin miembro pblica) | |
abre un archivo y lo asocia con la corriente 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. (funcin miembro pblica) | |
cierra el archivo asociado 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. (funcin miembro pblica) | |
Terceros funciones
| Especializa el algoritmo std::swap. (plantilla de funcin) |
Heredado 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. | |
| extraer datos con formato (funcin miembro pblica de std::basic_istream)
| |
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. | |
| Extrae caracteres. (funcin miembro pblica de std::basic_istream)
| |
lee el siguiente carcter sin extraerlo 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. (funcin miembro pblica de std::basic_istream)
| |
unextracts un carcter 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. (funcin miembro pblica de std::basic_istream)
| |
pone personaje en la corriente 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. (funcin miembro pblica de std::basic_istream)
| |
| Extrae caracteres hasta que se encuentra el carcter dado. (funcin miembro pblica de std::basic_istream)
| |
| Extrae y descarta caracteres hasta encontrar el carcter dado. (funcin miembro pblica de std::basic_istream)
| |
extrae los bloques 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. (funcin miembro pblica de std::basic_istream)
| |
extrae los bloques que ya estn disponibles los personajes 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. (funcin miembro pblica de std::basic_istream)
| |
Devuelve el nmero de caracteres extrados por ltima operacin de entrada sin formato 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. (funcin miembro pblica de std::basic_istream)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
devuelve el indicador de posicin 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. (funcin miembro pblica de std::basic_istream)
| |
| Establece el indicador de la posicin de entrada. (funcin miembro pblica de std::basic_istream)
| |
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 con el dispositivo de almacenamiento subyacente 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. (funcin miembro pblica de std::basic_istream)
| |
Member classes
| implements basic logic for preparation of the stream for input operations (clase miembro pblica de std::basic_istream)
|
Heredado de std::basic_ostream
Funciones miembro
Salida con formato | |
| Inserta datos con formato. (funcin miembro pblica de std::basic_ostream<CharT,Traits>)
| |
Salida sin formato | |
| Inserta un carcter. (funcin miembro pblica de std::basic_ostream<CharT,Traits>)
| |
| Inserta un bloque de caracteres. (funcin miembro pblica de std::basic_ostream<CharT,Traits>)
| |
Posicionamiento | |
| Devuelve el indicador de la posicin de salida. (funcin miembro pblica de std::basic_ostream<CharT,Traits>)
| |
| Establece el indicador de la posicin de salida. (funcin miembro pblica de std::basic_ostream<CharT,Traits>)
| |
Miscelneas | |
(funcin miembro pblica de std::basic_ostream<CharT,Traits>)
| |
Clases miembro
| Implementa lgica bsica para la preparacin de las operaciones de salida del flujo. (clase miembro pblica de std::basic_ostream<CharT,Traits>)
|
Heredado de std::basic_ios
Tipos miembro
| Tipo miembro | Definicin |
char_type
|
CharT
|
traits_type
|
Traits
|
int_type
|
Traits::int_type
|
pos_type
|
Traits::pos_type
|
off_type
|
Traits::off_type
|
Funciones miembro
Funciones de estado | |
| Verifica si no ha ocurrido ningn error; es decir, las operaciones de E/S se encuentran disponibles. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Verifica si se ha alcanzado el fin de archivo. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Verifica si ha ocurrido un error. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Verifica si ha ocurrido un error irrecuperable. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Verifica si ha ocurrido un error (sinnimo de fail()). (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
(hasta C++11)(desde C++11) |
Verifica si no se ha producido ningn error (sinnimo de !fail()). (funcin miembro pblica de std::basic_ios<CharT,Traits>)
|
| Devuelve los indicadores de estado. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Establece los indicadores de estado. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Modifica indicadores de estado. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
Formato | |
| Copia informacin de formato. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Gestiona el carcter de relleno. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
Miscelneas | |
| Gestiona la mscara de excepciones. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Establece la configuracin regional. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Gestiona el bfer del flujo asociado. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Gestiona el flujo enlazado. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Estrecha caracteres. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
| Ensancha caracteres. (funcin miembro pblica de std::basic_ios<CharT,Traits>)
| |
Heredado de std::ios_base
Funciones miembro
Formato | |
| Gestiona los indicadores de formato. (funcin miembro pblica de std::ios_base)
| |
| Establece un indicador de formato especfico. (funcin miembro pblica de std::ios_base)
| |
| Borra el indicador de formato especfico. (funcin miembro pblica de std::ios_base)
| |
| Gestiona la precisin decimal de las operaciones de punto flotante. (funcin miembro pblica de std::ios_base)
| |
| Gestiona la anchura de campo. (funcin miembro pblica de std::ios_base)
| |
Configuracin regional | |
| Establece la configuracin regional. (funcin miembro pblica de std::ios_base)
| |
| Devuelve la configuracin regional actual. (funcin miembro pblica de std::ios_base)
| |
Array extensible interno | |
[esttico] |
Devuelve un entero nico para todo el programa que es seguro de usar como ndice para pword() e iword() (funcin miembro esttica pblica de std::ios_base)
|
Cambia el tamao del almacenamiento privado si es necesario y accede al elemento long en el ndice dado. (funcin miembro pblica de std::ios_base)
| |
Cambia el tamao del almacenamiento privado si es necesario y el acceso al elemento void* en el ndice dado. (funcin miembro pblica de std::ios_base)
| |
Miscelneas | |
| Registra la funcin de devolucin de llamada de un evento. (funcin miembro pblica de std::ios_base)
| |
[esttico] |
Establece si las bibliotecas de E/S de C++ y de C son interoperables. (funcin miembro esttica pblica de std::ios_base)
|
Clases miembro | |
| Excepcin de flujo. (clase miembro pblica de std::ios_base)
| |
| Inicializa los objetos flujo estndar. (clase miembro pblica de std::ios_base)
| |
Tipos miembro y constantes | |||||||||||||||||||||||||||||||||||||||
| Tipo | Explicacin | ||||||||||||||||||||||||||||||||||||||
| Tipo del modo de apertura del flujo.
Tambin se definen las siguientes constantes:
(typedef) | |||||||||||||||||||||||||||||||||||||||
| Tipo de los indicadores de formato.
Tambin se definen las siguientes constantes:
(typedef) | |||||||||||||||||||||||||||||||||||||||
| Estado del tipo de flujo.
Tambin se definen las siguientes constantes:
(typedef) | |||||||||||||||||||||||||||||||||||||||
| El tipo de la direccin de bsqueda.
Tambin se definen las siguientes constantes:
(typedef) | |||||||||||||||||||||||||||||||||||||||
| Especifica el tipo de evento. (enum) | |||||||||||||||||||||||||||||||||||||||
| Tipo de la funcin de devolucin de llamada. (typedef) | |||||||||||||||||||||||||||||||||||||||