(
All chapters, except Chapter 1, 7 and 21, conclude with a Summary.)
1. Introduction. 2. IOStreams Cookbook-Simple Input and Output. Output to the Standard Output.
Input from the Standard Input.
Output to a File.
Input from a File.
Formatted Output to a Memory Buffer.
3. Why Use IOStreams? Improved Type Safety.
Modularity and Reuseability Through User-defined Types.
Generality and Extendability through Abstraction and Polymorphism.
Who needs printf Anyway?
4. The Structure of the IOStreams System. C++ Classes.
The IOStreams Classes.
Location of IOStreams Class Descriptions.
A Buffer for Files and the Standard Streams.
File-oriented Translators.
A Buffer and Translators Specialized for Memory.
A Buffer Linked to stdio.
5. The Buffer Component-streambuf. The Public Interface.
Function Descriptions.
Overflow and Underflow.
Repositioning the get and put Pointers.
Synchronization.
Inquiry Functions.
Constructors and Setup Function.
The Protected Interface.
6. The IO Specification-Class-ios. The Public Interface.
Implementation of State Variables.
Error States.
Error State Member Functions.
Open Mode.
Format State.
Format State Member Functions.
Format Parameters.
User-defined Parameters.
User-defined Parameter Functions.
Synchronization with stdio.
Constructor.
Copying of ios Objects.
7. The Translator Classes-An Illustrative Example. 8. Output Translation-Class-ostream. The Public Interface.
Function Descriptions.
Unformatted Output Operations.
Flushing an ostream.
Seeking an Output Stream.
Constructor for ostream.
9. Input and Bidirectional Translation-Classes istream and iostream. The Public Interface-Class istream.
Function Descriptions-istream.
BidIrectional IO-Class iostream.
The Public Interface-Class iostream.
10. Streams with Assignment. Derivation of the Streams with Assignment.
The Public Interfaces.
Default Constructors.
Assignment Operators.
11. Astreambuf Specialized for Files-filebuf. Relation between Files and filebuf.
The Additional Public Interface.
Function Descriptions.
12. Translators Specialized on Files. Files and IOStreams.
Common Features of File-specialized Translators.
Function Descriptions-Class fstream_common.
File-based Input Streams-Class ifstream.
Function Descriptions-Class ifstream.
File-based Output Streams-Class ofstream.
File-based Bidirectional Streams-Class fstream.
13. A streambuf for In-memory Operations. The Public Interface-streambuf.
Function Descriptions.
14. Translators for In-memory formatting. The Public Interface-strstream Classes.
Function Descriptions.
15. Manipulators and Applicators. Manipulators without Parameters.
Manipulators with Parameters.
Manipulators for the Translator Classes.
Manipulators Using Macros.
Using Parameterized Manipulators.
An Example of an Applicator.
Manipulator Classes.
An Antidote for printf.
16. Using IOStreams and stdio Facilities Simultaneously. The Public Interface-Class stdiobuf.
Function Descriptions.
Using IOStreams with stdiobuf.
Trends in IOStreams.
17. Deriving Buffer Classes from streambuf. The Protected Interface.
Functions for the Buffer Area.
Functions for the Get Area.
Functions for the Put Area.
Buffering State Functions.
Buffer Allocation Functions.
Putback Failure.
A Derivation from streambuf-Class filebuf.
Underflow/Overflow.
Seeking the File Pointer.
Nominating a Buffer Area.
Allocation.
Constructors and Destructor.
Attaching and Detaching a File.
18. Derivation from the Translator Classes. Translators Using a filebuf.
File-Oriented Translator Class Definitions.
Implementation of fstream_common.
The Derived Translator Classes-ifstream.
Derivation Restrictions on the Translator Classes.
Using the Extended Format Parameters.
Operations between Insertions or Extractions.
19. Design of Extractor and Inserter Functions. Classification of Implementation Techniques.
The Lowest-level Inserters.
A Low-level Inserter for Integral Types.
High-level Inserters.
Table-driven Inserters.
The Lowest-level Extractors.
A Low-level Extractor for Integral Types.
High-level Extractors.
Mixed-level Extractors.
Table-driven Extractors.
Regular Expressions and DFAs.
Manipulators and Inserters.
20. Inserters and Extractors for Class Hierarchies. Insertion and Extraction of the Base Class.
Input and Output of Derived Types.
A Broader Hierarchical Context.
21. Cookbook 2-Investigative Examples. State Checking.
Character and String Output.
Character and String Input.
Raw (binary) Character Read/Write.
IO of the Integral Types.
IO of Floating-point Numbers.
Pointer Representation.
Examples for Class filebuf.
Character Putback.
File-oriented Translators.
ofstream Tests.
fstream Tests.
Streams Using a strstreambuf.
An ostrstream Test.
A Static strstream.
A Dynamic strstream.
Checking strstream Cleanup.
Using Streams with Assignment.
Mixed stdio and IOStreams Output.
Appendix 1 An Example of a Table-driven, Floating-point Extractor. Appendix 2 UNIX-like Low-level IO Operations. References. Index. 0201596415T04062001