BOOK / SOURCE & READING RECORD
Standard C++ IOStreams and Locales: Advanced Programmer's Guide and Reference
Angelika Langer; Klaus Kreft
1st edition, Addison-Wesley, 2000
Standard C++ IOStreams and Locales: Advanced Programmer's Guide and Reference
Fully read the author's publicly released licensed excerpt of streambuf: The Stream Buffer Classes, marked as taken from printed pages 84–109, covering the hierarchy, get/put area, string/file buffers, and putback. This is a selected excerpt article and is not claimed to be a verbatim equivalent of the book's 26 pages. The remaining chapters 1–3, the locale portion, and the reference manual were not obtained and not read.
Edition, actual reading range, and original sources →Sources
- Author's book page
Table of contents, code, and licensed-excerpt entry point; not a complete ebook
- Author-licensed public excerpt
C++ Report April 2000; excerpted from pp. 84–109
- Publisher book page
Table of contents and bibliographic information only; full text not found
streambuf layering: give formatted output a different destination
Licensed excerpt streambuf: The Stream Buffer Classes, source marked pp. 84–109; The Stream Buffer Abstraction / Output / File Stream Buffers
This excerpt recasts streambuf, often treated as an internal detail, as an explicit extension interface: the stream decides how characters are represented, and the buffer layer decides how characters are delivered. The get-area and put-area pointers are a model for understanding the boundary; they do not imply that every file stream uses the same physical layout. The original exercise chooses a fixed-capacity character destination and implements only the sequential writes it actually promises; formatting remains the job of ostream, and insufficient capacity is reported through the standard stream-state mechanism. This lets you observe already-written content and whether the operation succeeded separately, and it also shows that “failure” does not automatically roll back. The unread locale chapters cannot be replaced by this material, and it especially cannot support a claim of having mastered the full design of internationalized parsing and custom facets.
Related fundamentals
Static and Dynamic Polymorphism, Slicing, and RTTIRAII: Give Cleanup Responsibility to ObjectsDestructors, exceptions, and noexcept