protected member function
<streambuf> <iostream>
void setp (char* new_pbase, char* new_epptr);
Set output sequence pointers
Sets the value for the pointers that define the boundaries of the buffered portion of the controlled output sequence (pbase and epptr).
The put pointer (pptr) is automatically set to the beginning of this sequence.
This is a protected member that other member functions can call to change the array that describes the buffered portion of the controlled output sequence.
Parameters
- new_pbase
- New value for the pointer to the beginning of the accessible part of the controlled output sequence (pbase).
The put pointer (pptr) is also set to this value.
- new_epptr
- New value for the end pointer, just past the end of the accessible part of the controlled output sequence (epptr).
This shall point to a character in the same array as new_pbase.
Data races
Modifies the stream buffer object.
Concurrent access to the same stream buffer object may introduce data races.
Exception safety
Basic guarantee: if an exception is thrown, the stream buffer is in a valid state.
Invalid arguments cause undefined behavior.
See also
- streambuf::pbump
- Increase put pointer (protected member function)
- streambuf::pbase
- Pointer to beginning of output sequence (protected member function)
- streambuf::epptr
- Pointer to end of output sequence (protected member function)
- streambuf::pptr
- Pointer to current position of output sequence (protected member function)
- streambuf::setg
- Set input sequence pointers (protected member function)