std::basic_streambuf<CharT,Traits>::pubseekoff, std::basic_streambuf<CharT,Traits>::seekoff
提供: cppreference.com
< cpp | io | basic streambuf
pos_type pubseekoff( off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = ios_base::in | ios_base::out ); |
(1) | |
protected: virtual pos_type seekoff( off_type off, std::ios_base::seekdir dir, |
(2) | |
入力シーケンスまたは出力シーケンスまたは両方の位置指示子を何らかの別の位置から相対的に設定します。
1) 最も派生したクラスの seekoff(off, dir, which)
を呼びます。
2) この関数の基底クラスのバージョンは効果を持ちません。 派生クラスは位置指示子の相対位置設定ができるようにこの関数をオーバーライドするかもしれません。
目次 |
[編集] 引数
off | - | 位置指示子を設定する相対位置 | ||||||||
dir | - | 相対オフセットを適用するベースの位置を定義します。 以下の定数のいずれかを指定できます。
| ||||||||
which | - | 入力シーケンスと出力シーケンスのどちらに影響を与えるかを定義します。 以下の定数のいずれかまたは組み合わせを指定できます。
|
[編集] ノート
引数のすべての組み合わせが有効ではないかもしれません。 詳細は seekoff
の派生バージョンを参照してください。
[編集] 戻り値
1) seekoff(off, dir, which)
の戻り値。
2) 位置指示子によって定義される通りの結果の絶対位置。 基底クラスのバージョンは pos_type(off_type(-1)) を返します。
[編集] 例
This section is incomplete Reason: no example |
[編集] 関連項目
seekpos() を呼びます (パブリックメンバ関数) | |
[仮想] |
相対位置を使用してファイル位置を再設定します ( std::basic_filebuf<CharT,Traits> の仮想プロテクテッドメンバ関数)
|
[仮想] |
入力シーケンス、出力シーケンス、または両方の次ポインタの位置を、相対位置を用いて再設定します ( std::basic_stringbuf<CharT,Traits,Allocator> の仮想プロテクテッドメンバ関数)
|
[仮想] |
相対位置を使用して入力シーケンス、出力シーケンス、またはその両方の次ポインタの位置を再設定します ( std::strstreambuf の仮想プロテクテッドメンバ関数)
|