The Streams package has five different stream families:
Binary streams read and write binary data (8 bits). They allow operations on a single byte or on a group of bytes.
Narrow character streams read and write narrow characters (C++ type char). They allow operations on a single narrow character or on a narrow string.
Unicode character streams read and write Unicode characters (16 bits). They include operations on a single Unicode character or on a group of Unicode characters.
Wide character streams read and write wide characters. They include operations on a single wide character or on a group of wide characters. Wide characters are stored using the C++ type wchar_t. The size is platform-dependent.
Data streams read and write C++ base types, such as bool, int, and float. They include operations on a single element or on a group of elements.
Some concrete classes can be used by themselves, but often they are chained to other stream elements in a processing stream. For instance, each stream family has a synchronized stream that synchronizes individual streaming operations in a multi-threaded environment. The synchronized streams take a handle to the next processing element when constructed. Then each operation invoked on the synchronized stream locks an internal mutex and is forwarded on to the next processing stream element.
For more information on the stream families and their classes, see Section 3.5, "The Streams Package Classes."
The binary, narrow character, Unicode character, and wide character stream families include memory streams. You can use memory streams to avoid performance problems that occur when the internal buffer needs to be resized, which requires data to be copied. The memory streams use small linked buffers as internal storage.
The Streams package depends on the Smart Pointer, Synchronization, Execution Tracing, and Thread-compatible Exception packages of the Advanced Tools Module.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.