[streambuf.protected] (original) (raw)

31 Input/output library [input.output]

31.6 Stream buffers [stream.buffers]

31.6.3 Class template basic_streambuf [streambuf]

31.6.3.4 Protected member functions [streambuf.protected]


31.6.3.4.1 Assignment [streambuf.assign]

31.6.3.4.2 Get area access [streambuf.get.area]

31.6.3.4.3 Put area access [streambuf.put.area]


31.6.3.4.1 Assignment [streambuf.assign]

basic_streambuf& operator=(const basic_streambuf& rhs);

Postconditions:

void swap(basic_streambuf& rhs);

Effects: Swaps the data members of rhsand *this.

31.6.3.4.2 Get area access [streambuf.get.area]

char_type* eback() const;

Returns: The beginning pointer for the input sequence.

Returns: The next pointer for the input sequence.

char_type* egptr() const;

Returns: The end pointer for the input sequence.

Effects: Adds n to the next pointer for the input sequence.

void setg(char_type* gbeg, char_type* gnext, char_type* gend);

Preconditions: [gbeg, gnext), [gbeg, gend), and [gnext, gend) are all valid ranges.

Postconditions: gbeg == eback(),gnext == gptr(), andgend == egptr() are all true.

31.6.3.4.3 Put area access [streambuf.put.area]

char_type* pbase() const;

Returns: The beginning pointer for the output sequence.

Returns: The next pointer for the output sequence.

char_type* epptr() const;

Returns: The end pointer for the output sequence.

Effects: Adds n to the next pointer for the output sequence.

void setp(char_type* pbeg, char_type* pend);

Preconditions: [pbeg, pend) is a valid range.

Postconditions: pbeg == pbase(),pbeg == pptr(), andpend == epptr() are all true.