std::basic_ifstream
Aus 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. |
| definiert in Header <fstream>
|
||
template< class CharT, class Traits = std::char_traits<CharT> > class basic_ifstream : public basic_istream<CharT, Traits> |
||
Das Klassen-Template
basic_ifstream implementiert Hochpegeleingang Operationen auf dateibasierte Streams. Es lsst sich eine Datei-basierte streambuffer (std::basic_filebuf) mit dem High-Level-Schnittstelle (std::basic_istream) .Original:
The class template
basic_ifstream implements high-level input operations on file based streams. It interfaces a file-based streambuffer (std::basic_filebuf) with the high-level interface of (std::basic_istream).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.
Eine typische Implementierung
std::basic_ifstream hlt nur ein nicht-abgeleiteten Daten Mitglied: eine Instanz std::basic_filebuf<CharT, Traits> .Original:
A typical implementation of
std::basic_ifstream 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
Zwei Spezialisierungen fr gemeinsame Charakter-Typen sind ebenfalls definiert:
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.
definiert in Header
<fstream> | |
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 |
ifstream
|
basic_ifstream<char>
|
wifstream
|
basic_ifstream<wchar_t>
|
Mitglied Typen
Mitglied Typ
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
|
Member-Funktionen
baut die Datei-Stream 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. (ffentliche Elementfunktion) | |
(destructor) [virtuell] (implizit deklariert) |
destructs the basic_ifstream and the associated buffer, closes the file (virtuellen ffentlichen Member-Funktion) |
(C++11) |
verschiebt die Datei-Stream 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. (ffentliche Elementfunktion) |
(C++11) |
Swaps zwei Datei-Streams 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. (ffentliche Elementfunktion) |
liefert die zugrunde liegenden Rohdaten-Device-Objekt 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. (ffentliche Elementfunktion) | |
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. | |
prft, ob der Stream eine zugehrige Datei hat 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. (ffentliche Elementfunktion) | |
ffnet eine Datei und ordnet sie mit dem Strom 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. (ffentliche Elementfunktion) | |
schliet die zugehrige Datei 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. (ffentliche Elementfunktion) | |
Non-Member-Funktionen
spezialisiert die std::swap Algorithmus 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. (Funktions-Template) | |
Inherited from 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. | |
Extrakte formatierte Daten 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. (ffentliche Elementfunktion of 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. | |
| Extrahiere Zeichen (ffentliche Elementfunktion of std::basic_istream)
| |
liest das nchste Zeichen ohne es zu extrahieren 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. (ffentliche Elementfunktion of std::basic_istream)
| |
unextracts ein Zeichen 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. (ffentliche Elementfunktion of std::basic_istream)
| |
setzt Zeichen in Input-Stream 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. (ffentliche Elementfunktion of std::basic_istream)
| |
Extrakte Zeichen, bis die gegebene Zeichen gefunden wird 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. (ffentliche Elementfunktion of std::basic_istream)
| |
Extrakte aus und verwirft Zeichen, bis die gegebene Zeichen gefunden wird 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. (ffentliche Elementfunktion of std::basic_istream)
| |
extrahiert Blcken von Zeichen 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. (ffentliche Elementfunktion of std::basic_istream)
| |
extrahiert bereits verfgbaren Blcke von Zeichen 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. (ffentliche Elementfunktion of std::basic_istream)
| |
gibt die Anzahl der Zeichen, die letzten unformatierte Eingabe-Operation extrahiert 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. (ffentliche Elementfunktion of 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. | |
liefert den Eingang Stellungsanzeige 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. (ffentliche Elementfunktion of std::basic_istream)
| |
| sets the input position indicator (ffentliche Elementfunktion of 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. | |
synchronisiert mit dem zugrunde liegenden Speicher 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. (ffentliche Elementfunktion of std::basic_istream)
| |
Member classes
| implements basic logic for preparation of the stream for input operations (ffentlichen Member der Klasse of std::basic_istream)
| |
Inherited from std::basic_ios
Member types
Mitglied Typ
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. | |
prft, ob keine Fehler aufgetreten, dh I / O-Operationen zur Verfgung stehen 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. (ffentliche Elementfunktion of std::basic_ios)
| |
prft, ob am Ende der Datei erreicht wurde 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. (ffentliche Elementfunktion of std::basic_ios)
| |
prft, ob ein behebbarer Fehler aufgetreten 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. (ffentliche Elementfunktion of std::basic_ios)
| |
prft, ob ein nicht behebbarer Fehler aufgetreten ist 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. (ffentliche Elementfunktion of std::basic_ios)
| |
prft, ob ein Fehler aufgetreten ist (Synonym 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. (ffentliche Elementfunktion of std::basic_ios)
| |
(bis C + +11) (seit C++11) |
berprft, ob kein Fehler aufgetreten ist (Synonym !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. (ffentliche Elementfunktion of std::basic_ios)
|
| gibt Statusflaggen (ffentliche Elementfunktion of std::basic_ios)
| |
setzt Staatsflaggen 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. (ffentliche Elementfunktion of std::basic_ios)
| |
lscht Fehler und eof Fahnen 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. (ffentliche Elementfunktion of std::basic_ios)
| |
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Kopien Formatierungsinformationen 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. (ffentliche Elementfunktion of std::basic_ios)
| |
verwaltet die Fllzeichen 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. (ffentliche Elementfunktion of std::basic_ios)
| |
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 (ffentliche Elementfunktion of std::basic_ios)
| |
Setzt die Locale 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. (ffentliche Elementfunktion of std::basic_ios)
| |
verwaltet verbundenen Strom-Puffer 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. (ffentliche Elementfunktion of std::basic_ios)
| |
verwaltet gebunden Stream 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. (ffentliche Elementfunktion of std::basic_ios)
| |
verengt Zeichen 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. (ffentliche Elementfunktion of std::basic_ios)
| |
| widens characters (ffentliche Elementfunktion of std::basic_ios)
| |
Inherited from 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. | |
verwaltet Format Fahnen 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. (ffentliche Elementfunktion of std::ios_base)
| |
setzt bestimmten Format Flagge 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. (ffentliche Elementfunktion of std::ios_base)
| |
| clears specific format flag (ffentliche Elementfunktion of std::ios_base)
| |
verwaltet Nachkommastellen von Fliekomma-Operationen 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. (ffentliche Elementfunktion of std::ios_base)
| |
| manages field width (ffentliche Elementfunktion of std::ios_base)
| |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
setzt locale 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. (ffentliche Elementfunktion of std::ios_base)
| |
kehrt momentanen Locale 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. (ffentliche Elementfunktion of std::ios_base)
| |
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. | |
[statisch] |
kehrt ein Programm-weit eindeutige Zahl, die sicher als Index PWord () und iword () verwenden 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. (public static Elementfunktion of std::ios_base)
|
die Gre der privaten Lagerhaltung bei Bedarf und Zugang zum long Element am angegebenen IndexOriginal: 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. (ffentliche Elementfunktion of std::ios_base)
| |
die Gre der privaten Lagerhaltung bei Bedarf und Zugang zum void* Element am angegebenen IndexOriginal: 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. (ffentliche Elementfunktion of std::ios_base)
| |
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 (ffentliche Elementfunktion of std::ios_base)
| |
[statisch] |
legt fest, ob C + + und C IO Libraries interoperabel sind 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. (public static Elementfunktion of std::ios_base)
|
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. | |
Stream Ausnahme 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. (ffentlichen Member der Klasse of std::ios_base)
| |
initialisiert Standard-Stream-Objekten 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. (ffentlichen Member der Klasse of std::ios_base)
| |
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. |
Explanation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Stream offenen Modus-Typ
Die folgenden Konstanten sind ebenfalls definiert:
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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Formatierung flags Typ
Die folgenden Konstanten sind ebenfalls definiert:
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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Stand der Stream-Typ
Die folgenden Konstanten sind ebenfalls definiert:
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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
legt Event-Typ 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-Funktion aus 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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||