protected virtual member function
streampos seekoff (streamoff off, ios_base::seekdir way,
ios_base::openmode which = ios_base::in | ios_base::out);
Set position pointer to relative position
Sets a new position to the position pointers specified by parameter which. This position is calculated as an offset of off characters relative to a the origin specified by way.
If which includes ios_base::in, the get pointer (gptr) is affected, and if which includes ios_base::out, the put pointer (pptr). Both position pointers can be affected by a single call.
This virtual function is called by the public member streambuf::pubseekoff.
- Offset value, relative to the way parameter.
streamoff is a signed integral type.
- Object of type ios_base::seekdir, indicating the origin from which the offset is applied. It may take any of the following constant values:
|value||offset is relative to...|
|ios_base::beg||beginning of the character sequence|
|ios_base::cur||current position of either the get pointer (gptr) or the put pointer (pptr), depending on argument which.|
|ios_base::end||end of the character sequence|
- Determined which of the position pointers is affected: the input sequence, the output sequence, or both. It is an object of type ios_base::openmode that, for this function, may take any combination of the following significant constant values:
Both pointers may be selected simultaneously, but if both are selected when way is ios_base::cur, the function fails.
|value||position pointer affected|
|ios_base::in||Modifies the get pointer (gptr)|
|ios_base::out||Modifies the put pointer (pptr)|
On success, it returns the new absolute position the position pointer points to after the call, if representable as a value of type streampos.
On failure, or if the above is not possible, the function returns
streampos is a positioning type that can be converted to/from integral types (an fpos type).
Modifies the stringbuf object.
Concurrent access to the same object may cause data races.
Basic guarantee: if an exception is thrown, the object is in a valid state.
- Set position pointer to absolute position (protected virtual member function
- Set internal position pointer to relative position (public member function