Espaces de noms
Variantes
Affichages
Actions

std::basic_filebuf::close

De cppreference.com
< cpp‎ | io‎ | basic filebuf

 
 
D'entrée / sortie de bibliothèque
I / O manipulateurs
C-style I / O
Tampons
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf (obsolète)
Cours d'eau
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstractions
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
Fichier E / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
Chaîne I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Tableau I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream (obsolète)
ostrstream (obsolète)
strstream (obsolète)
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Interface catégorie d'erreur
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category (C++11)
io_errc (C++11)
 
std::basic_filebuf
Fonctions membres publiques
Original:
Public member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_filebuf::basic_filebuf
basic_filebuf::~basic_filebuf
basic_filebuf::operator= (C++11)
basic_filebuf::swap (C++11)
basic_filebuf::is_open
basic_filebuf::open
basic_filebuf::close
Protégé fonctions membres
Original:
Protected member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_filebuf::showmanyc
basic_filebuf::underflow
basic_filebuf::uflow
basic_filebuf::pbackfail
basic_filebuf::overflow
basic_filebuf::setbuf
basic_filebuf::seekoff
basic_filebuf::seekpos
basic_filebuf::sync
basic_filebuf::imbue
Tiers fonctions
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap(std::basic_filebuf) (C++11)
 
std::basic_filebuf<CharT, Traits>* close();
Si une zone de mise exister (par exemple le fichier a été ouvert en écriture), overflow(Traits::eof()) premiers appels d'écrire toutes les sorties en attente d' le fichier, y compris les séquences unshift .
Original:
If a put area exist (e.g. file was opened for writing), first calls overflow(Traits::eof()) to write all pending output to the file, including any unshift sequences.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si la dernière fonction appelée, sur underflow(), overflow(), seekpos() et seekoff(), était overflow(), puis appelle std::codecvt::unshift(), peut-être plusieurs fois, afin de déterminer la séquence unshift fonction de la localisation imprégnée et écrit que la séquence de déposer auprès overflow(Traits::eof()) .
Original:
If the most recently called function, out of underflow(), overflow(), seekpos(), and seekoff(), was overflow(), then calls std::codecvt::unshift(), perhaps multiple times, to determine the unshift sequence according to the imbued locale, and writes that sequence to file with overflow(Traits::eof()).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ensuite, ferme le fichier comme s'il en appelant std::fclose, indépendamment du fait que l'un des appels précédents réussi ou échoué .
Original:
Then, closes the file as if by calling std::fclose, regardless of whether any of the preceding calls succeeded or failed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si l'un des faits les appels de fonction, y compris l'appel à std::fclose, échoue, retourne un pointeur nul. Si l'un des faits les appels de fonction lève une exception, l'exception est interceptée et relancée après l'appel de std::fclose. Si le fichier est déjà fermé, renvoie un pointeur nul tout de suite .
Original:
If any of the function calls made, including the call to std::fclose, fails, returns a null pointer. If any of the function calls made throws an exception, the exception is caught and rethrown after calling std::fclose. If the file is already closed, returns a null pointer right away.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
En tout cas, met à jour la variable membre privée qui est accessible par is_open() .
Original:
In any case, updates the private member variable that is accessed by is_open().
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier] Paramètres

(Aucun)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Retourne la valeur

*this en cas de succès, un pointeur NULL en cas d'échec .
Original:
*this on success, a null pointer on failure.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Notes

close() est généralement appelée par le destructeur de std::basic_filebuf (qui, à son tour, est généralement appelée par le destructeur de std::basic_fstream .
Original:
close() is typically called through the destructor of std::basic_filebuf (which, in turn, is typically called by the destructor of std::basic_fstream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Exemple

[modifier] Voir aussi

checks if the associated file is open
(fonction membre publique) [edit]
[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
Détruit un objet basic_filebuf et ferme le fichier si elle est ouverte
Original:
destructs a basic_filebuf object and closes the file if it is open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(function membre virtuelle publique) [edit]