名前空間
変種
操作

std::basic_filebuf::operator=

提供: cppreference.com
< cpp‎ | io‎ | basic filebuf

 
 
入力/出力ライブラリ
I / Oのマニピュレータ
CスタイルのI / O
バッファ
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(廃止予定)
ストリーム
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
抽象化
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
ファイルI / 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
文字列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
アレイの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(廃止予定)
ostrstream(廃止予定)
strstream(廃止予定)
タイプ
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
エラーカテゴリインターフェース
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
パブリックメンバ関数
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
メンバ関数を保護しました
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
非メンバ関数
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)
 
(C++11およびそれ以降)
std::basic_filebuf& operator=( const std::basic_filebuf& rhs ) = delete;
1)
最初close()は、関連付けられたファイルをクローズするために呼び出し、その後rhs*thisの内容を移動します入れて、バッファを取得し、関連するファイル、ロケール、OPENMODE、IS_OPENフラグ、および他の状態。移動後、rhsは、ファイルおよびrhs.is_open() == falseに関連付けられていません.
Original:
First calls close() to close the associated file, then moves the contents of rhs into *this: the put and get buffers, the associated file, the locale, the openmode, the is_open flag, and any other state. After the move, rhs is not associated with a file and rhs.is_open() == false.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
コピー代入演算子が削除されます。basic_filebufCopyAssignableはないです.
Original:
The copy assignment operator is deleted; basic_filebuf is not CopyAssignable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] パラメータ

rhs -
から移動される別basic_filebuf
Original:
another basic_filebuf that will be moved from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

*this

[編集]

#include <fstream>
#include <string>
#include <iostream>
 
int main()
{
 
    std::ifstream fin("test.in"); // read-only
    std::ofstream fout("test.out"); // write-only
 
    std::string s;
    getline(fin, s);
    std::cout << s << '\n'; // output
 
    *fin.rdbuf() = std::move(*fout.rdbuf());
 
    getline(fin, s);
    std::cout << s << '\n'; // empty line
 
    std::cout << std::boolalpha << fout.is_open() << '\n'; // prints "false"
 
}


[編集] も参照してください

basic_filebufオブジェクトを作成します
Original:
constructs a basic_filebuf object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
(C++11)
スワップ2 basic_filebufオブジェクト
Original:
swaps two basic_filebuf objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]