std::basic_streambuf<CharT,Traits>:: pubseekpos, std::basic_streambuf<CharT,Traits>:: seekpos
From cppreference.net
<
cpp
|
io
|
basic streambuf
|
pos_type pubseekpos
(
pos_type pos,
std:: ios_base :: openmode which = std:: ios_base :: in | std:: ios_base :: out ) ; |
(1) | |
|
protected
:
virtual
pos_type seekpos
(
pos_type pos,
|
(2) | |
入力および/または出力シーケンスの位置指示子を絶対位置に設定します。
1)
最も派生したクラスの
seekpos
(
pos, which
)
を呼び出します。
2)
この関数の基底クラスバージョンは何も効果を持ちません。派生クラスは、位置インジケータの絶対位置指定を可能にするためにこの関数をオーバーライドする場合があります。
目次 |
パラメータ
| pos | - | 位置指示子を設定する絶対位置 | ||||||
| which | - |
影響を与える入力および/または出力シーケンスを定義します。以下の定数の1つまたは組み合わせを指定できます:
|
戻り値
1)
seekpos
(
pos, which
)
の戻り値。
2)
位置指示子によって定義される結果の絶対位置。基底クラスのバージョンは
pos_type
(
off_type
(
-
1
)
)
を返します。
例
|
このセクションは不完全です
理由: 例がありません |
不具合報告
以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。
| DR | 適用対象 | 公開時の動作 | 正しい動作 |
|---|---|---|---|
| LWG 55 | C++98 |
seekpos
の基底クラスバージョンは
未定義の無効なストリーム位置を返していた |
pos_type ( off_type ( - 1 ) ) を返す |
関連項目
|
seekoff
を呼び出す
seekoff
(
)
(public member function) |
|
|
[virtual]
|
絶対アドレス指定を使用してファイル位置を再配置する
(
std::basic_filebuf<CharT,Traits>
のvirtual protected member function)
|
|
[virtual]
|
絶対アドレス指定を使用して入力シーケンス、出力シーケンス、または両方の次のポインタを再配置する
(
std::basic_stringbuf<CharT,Traits,Allocator>
のvirtual protected member function)
|
|
[virtual]
|
絶対アドレス指定を使用して入力シーケンス、出力シーケンス、または両方の次のポインタを再配置する
(
std::strstreambuf
のvirtual protected member function)
|