26.4 The TEMPLATE METHOD Pattern (cont.)
Example - stream buffers (cont.)
- overflow writes the buffer content (and c) to its
destination
- overflow is a virtual method
- Has a dummy implementation in streambuf, returns EOF
- Derived classes redefine overflow
- streambuf::sputc is not redefined
prev
|top
|next