Advanced Tools Module User’s Guide : PART II Advanced Tools Module Packages : Chapter 4 Using Streams
Chapter 4 Using Streams
Introduction
This chapter lists the header files included in the stream directory, as well how to use the Streams package with other streaming libraries. The chapter also explains the basics about using the Streams package and introduces concepts and classes in the Streams package by working through a set of examples.
The Streams Header Files
The rw\stream directory contains a header file for each class, named classname.h. The directory also includes six umbrella header files:
stream.h
binaryStream.h
narrowCharacterStream.h
UnicodeCharacterStream.h
wideCharacterStream.h
dataStream.h
The stream.h header file includes the definitions of all the public classes and types present in the Streams package. The other five header files include the definitions of all the public classes and types belonging to a specific stream family.
Using the Streams Package with Other Streaming Libraries
You can use the Streams package with the Standard iostreams library and with Essential Tools Module virtual streams.
Using the Standard iostreams Library
Interaction with the C++ Standard iostreams library is accomplished in two ways:
Adapter classes inherit from the iostreams streambuf class.
Forwarding classes take an iostreams stream buffer instance and forward a request to it. This enables applications designed with streams to reuse iostreams stream buffer components.
The Streams package supports Standard iostreams.
Using Essential Tools Module Virtual Streams
Interaction with Essential Tools Module virtual streams is accomplished by adapter classes that inherit from the RWvistream and RWvostream classes.