Cpp-standard-library-cpp-ios-openmode
提供:Dev Guides
C ++-ios_baseオープンモード
説明
これは、ストリームオープニングモードフラグを表すビットマスクタイプです。
このタイプの値は、以下に示すように、次のメンバー定数の任意の有効な組み合わせにすることができます-
member constant | opening mode |
---|---|
app
|
(append) Set the stream’s position indicator to the end of the stream before each output operation. |
ate
|
(at end) Set the stream’s position indicator to the end of the stream on opening. |
binary
|
(binary) Consider stream as binary rather than text. |
in
|
(input) Allow input operations on the stream. |
out
|
(output) Allow output operations on the stream. |
trunc
|
(truncate) Any current content is discarded, assuming a length of zero on opening. |
- これらの定数は、ios_baseクラスでパブリックメンバーとして定義されます。 したがって、ios_baseのメンバー(ios_base
- inなど)として名前で直接参照するか、ios :: ateやcout.outなどの継承されたクラスまたはインスタンス化されたオブジェクトを使用して参照できます。