std::basic_filebuf::close
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
std::basic_filebuf<CharT, Traits>* close(); |
||
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.
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()).
Then, closes the file as if by calling std::fclose, regardless of whether any of the preceding calls succeeded or failed.
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.
In any case, updates the private member variable that is accessed by is_open()
.
目次 |
[編集] パラメータ
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.
[編集] ノート
close()
is typically called through the destructor of std::basic_filebuf (which, in turn, is typically called by the destructor of std::basic_fstream.
[編集] 例
This section is incomplete Reason: no example |
[編集] も参照してください
checks if the associated file is open (パブリックメンバ関数) | |
[仮想] |
basic_filebufオブジェクトを破壊し、それが開いている場合は、ファイルを閉じます 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. (仮想パブリックメンバ関数) |