rwlogo
SourcePro 11.1

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

Streams
[Advanced Tools Module]

Classes

class  RWBufferedCharInputStreamImp
 Implements a buffer that can be used with narrow character input streams. More...
class  RWByteArrayOutputStream
 Handle class for binary output streams, allowing retrieval of inserted data as a byte array. More...
class  RWByteArrayOutputStreamImp
 Abstract base class for binary output streams, allowing retrieval of inserted data as a byte array. More...
class  RWByteFromStreambufInputStreamImp
 Concrete class that connects a binary stream to an iostreams narrow character buffer. More...
class  RWByteInputStream
 Handle class for all binary input stream implementation classes. More...
class  RWByteInputStreamImp
 Abstract base class for all binary input stream implementation classes. More...
class  RWByteOutputStream
 Handle class for all binary output stream implementation classes. More...
class  RWByteOutputStreamImp
 Abstract base class for all binary output stream implementation classes. More...
class  RWByteToStreambufOutputStreamImp
 Concrete class connecting a binary stream to an iostreams narrow character buffer. More...
class  RWChainedByteArrayOutputStreamImp
 Concrete class implementing the byte array output stream interface. More...
class  RWChainedCharArrayOutputStreamImp
 Concrete class implementing the narrow character array output stream interface. More...
class  RWChainedMemoryStreambuf
 Implementation of the iostreams std::streambuf interface, providing increased performance. More...
class  RWChainedUCharArrayOutputStreamImp
 Concrete class implementing the UTF-16 character array output stream interface. More...
class  RWChainedWCharArrayOutputStreamImp
 Concrete class implementing the wide character array output stream interface. More...
class  RWCharArrayOutputStream
 Handle class for narrow character output streams that allow retrieval of their inserted data as a narrow character array. More...
class  RWCharArrayOutputStreamImp
 Abstract base class for narrow character output streams that allow retrieval of their inserted data as a character array. More...
class  RWCharFromStreambufInputStreamImp
 Concrete class connecting a narrow character stream to an iostreams narrow character buffer. More...
class  RWCharInputStream
 Handle class for all narrow character input stream implementation classes. More...
class  RWCharInputStreamImp
 Abstract base class for all narrow character input stream implementation classes. More...
class  RWCharOutputStream
 Handle class for all narrow character output stream implementation classes. More...
class  RWCharOutputStreamImp
 Abstract base class for all narrow character output stream implementation classes. More...
class  RWCharToStreambufOutputStreamImp
 Concrete class connecting a narrow character stream to an iostreams narrow character buffer. More...
class  RWDataFromByteInputStreamImp
 Abstract base class for all the data from binary conversion input stream implementation classes. More...
class  RWDataFromCharInputStreamImp
 Abstract base class from which all input stream implementation classes that convert from data to narrow characters must derive. More...
class  RWDataInputStream
 Handle class for all the data input stream implementation classes. More...
class  RWDataInputStreamImp
 Abstract base class from which all data input stream implementation classes must derive. More...
class  RWDataOutputStream
 Handle class for all the data output stream implementation classes. More...
class  RWDataOutputStreamImp
 Abstract base class from which all data output stream implementation classes must derive. More...
class  RWDataToByteOutputStreamImp
 Abstract base class from which all output stream implementation classes that convert from data to binary must derive. More...
class  RWDataToCharOutputStreamImp
 Abstract base class from which all output stream implementation classes that convert from data to narrow characters must derive. More...
class  RWExternalStreamException
 Base class for the stream exceptions. More...
class  RWFilteredByteInputStreamImp
 Abstract base class for all the filtered binary input stream implementation classes. More...
class  RWFilteredByteOutputStreamImp
 Abstract base class for all the filtered binary output stream implementation classes. More...
class  RWFilteredCharInputStreamImp
 Abstract base class for all the filtered narrow character input stream implementation classes. More...
class  RWFilteredCharOutputStreamImp
 Abstract base class for all the filtered narrow character output stream implementation classes. More...
class  RWFilteredDataInputStreamImp
 Abstract base class for all the filtered data input stream implementation classes. More...
class  RWFilteredDataOutputStreamImp
 Abstract base class for all the filtered data output stream implementation classes. More...
class  RWFilteredUCharInputStreamImp
 Abstract base class for all the filtered UTF-16 character input stream implementation classes. More...
class  RWFilteredUCharOutputStreamImp
 Abstract base class for all the filtered UTF-16 output stream implementation classes. More...
class  RWFilteredWCharInputStreamImp
 Abstract base class for all the filtered wide character input stream implementation classes. More...
class  RWFilteredWCharOutputStreamImp
 Abstract base class for all the filtered wide character output stream implementation classes. More...
class  RWFromUTF8Converter
 Converts char, RWCString or std::string UTF-8 values to UTF-16. More...
class  RWIncompleteStreamOperation
 Reports errors due to an incomplete stream operation. More...
class  RWInputStreamImp
 Abstract base class for all the input stream implementation classes. More...
class  RWIstreamDataFromCharInputStreamImp
 Reads data in US-ASCII format from a narrow character stream. More...
class  RWNativeDataFromByteInputStreamImp
 Reads data in native format from a binary stream. More...
class  RWNativeDataToByteOutputStreamImp
 Writes data in native format to a binary stream. More...
class  RWOstreamDataToCharOutputStreamImp
 Writes data in US-ASCII format to a narrow character stream. More...
class  RWOutputStreamImp
 Abstract base class for all the output stream implementation classes. More...
class  RWStreamImp
 Abstract base class for all the stream implementation classes. More...
class  RWSynchronizedByteInputStreamImp
 Implementation of a simple lock stream that is used with a binary input stream. More...
class  RWSynchronizedCharInputStreamImp
 Implementation of a simple lock stream that is used with a narrow character input stream. More...
class  RWSynchronizedDataInputStreamImp
 Implementation of a simple lock stream that is used with a data input stream. More...
class  RWSynchronizedDataOutputStreamImp
 Implementation of a simple lock stream that can be used with a data output stream. More...
class  RWSynchronizedUCharInputStreamImp
 Implementation of a simple lock stream that can be used with a UTF-16 character input stream. More...
class  RWSynchronizedWCharInputStreamImp
 Implementation of a simple lock stream that can be used with a wide character input stream. More...
class  RWTInputStreamBufferImp< InputStream, FilteredInputStreamImp >
 Implements a buffer that can be used with any kind of input stream. More...
class  RWTInputStreamLockImp< InputStream, FilteredInputStreamImp >
 Implements a simple lock stream that can be used with any kind of input stream. More...
class  RWToUTF8Converter
 Converts UTF-16 values to UTF-8. More...
class  RWTOutputStreamBufferImp< OutputStream, FilteredOutputStreamImp >
 Implements a buffer that can be used with any kind of output stream. More...
class  RWTOutputStreamLockImp< OutputStream, FilteredOutputStreamImp >
 Implements a simple lock stream that can be used with any kind of output stream. More...
class  RWTStreambufFromByteCharInputStream< InputStream >
 Adaptor class to adapt the iostreams std::streambuf interface to the Rogue Wave binary and narrow character Input Stream interfaces. More...
class  RWTStreambufToByteCharOutputStream< OutputStream >
 Adaptor class to adapt the iostreams std::streambuf interface to the Rogue Wave binary and narrow character Output Stream interfaces. More...
class  RWTStreamGuardImp< StreamHandle, FilteredStreamImp >
 A simple guard stream that can be used with any kind of input/output stream. More...
class  RWUCharArrayOutputStream
 Handle class for Unicode character output streams that support an extended interface. More...
class  RWUCharArrayOutputStreamImp
 Abstract base class for Unicode character output streams that support an extended interface. More...
class  RWUCharFromByteInputStreamImp
 Concrete class connecting a UTF-16 character stream to an input binary stream. More...
class  RWUCharFromUTF8ByteInputStreamImp
 Concrete class connecting a UTF-16 character stream to a UTF-8 binary stream. More...
class  RWUCharInputStream
 Handle class for all the UTF-16 character input stream implementation classes. More...
class  RWUCharInputStreamImp
 Abstract base class for all the Unicode character input stream implementation classes. More...
class  RWUCharOutputStream
 Handle class for the Unicode character output stream implementation classes. More...
class  RWUCharOutputStreamImp
 Abstract base class for the Unicode output stream implementation classes. More...
class  RWUCharToByteOutputStreamImp
 Concrete class connecting a UTF-16 character stream to an output binary stream. More...
class  RWUCharToUTF8ByteOutputStreamImp
 Concrete class connecting a UTF-16 character stream to a UTF-8 output binary stream. More...
class  RWUTF8Helper
 Provides common functionality used to encode and decode UTF-8 sequences. More...
class  RWvistreamFromDataInputStream
 Adaptor class that adapts the Rogue Wave virtual stream interface to the Rogue Wave data input stream interface. More...
class  RWvostreamToDataOutputStream
 Adaptor class that adapts the Rogue Wave virtual stream interface to the Rogue Wave data output stream interface. More...
class  RWWCharArrayOutputStream
 Handle class for wide character output streams that support an extended interface, allowing retrieval of inserted data as a wide character array. More...
class  RWWCharArrayOutputStreamImp
 Abastract base class for wide character output streams that support an extended interface, allowing retrieval of inserted data as a wide character array. More...
class  RWWCharFromWStreambufInputStreamImp
 Concrete class connecting a wide character stream to an iostreams wide character buffer. More...
class  RWWCharInputStream
 Handle class for all the wide character input stream implementation classes. More...
class  RWWCharInputStreamImp
 Abstract base class for all the wide character input stream implementation classes. More...
class  RWWCharOutputStream
 Handle class for all the wide character output stream implementation classes. More...
class  RWWCharOutputStreamImp
 Abstract base class for all the wide character output stream implementation classes. More...
class  RWWCharToWStreambufOutputStreamImp
 Concrete class connecting a wide character stream to an iostreams wide character buffer. More...

Typedefs

typedef
RWTInputStreamBufferImp
< RWByteInputStream,
RWFilteredByteInputStreamImp
RWBufferedByteInputStreamImp
typedef
RWTOutputStreamBufferImp
< RWByteOutputStream,
RWFilteredByteOutputStreamImp
RWBufferedByteOutputStreamImp
typedef
RWTOutputStreamBufferImp
< RWCharOutputStream,
RWFilteredCharOutputStreamImp
RWBufferedCharOutputStreamImp
typedef
RWTInputStreamBufferImp
< RWUCharInputStream,
RWFilteredUCharInputStreamImp
RWBufferedUCharInputStreamImp
typedef
RWTOutputStreamBufferImp
< RWUCharOutputStream,
RWFilteredUCharOutputStreamImp
RWBufferedUCharOutputStreamImp
typedef
RWTInputStreamBufferImp
< RWWCharInputStream,
RWFilteredWCharInputStreamImp
RWBufferedWCharInputStreamImp
typedef
RWTOutputStreamBufferImp
< RWWCharOutputStream,
RWFilteredWCharOutputStreamImp
RWBufferedWCharOutputStreamImp
typedef RWTStreamGuardImp
< RWByteInputStream,
RWFilteredByteInputStreamImp
RWGuardedByteInputStreamImp
typedef RWTStreamGuardImp
< RWByteOutputStream,
RWFilteredByteOutputStreamImp
RWGuardedByteOutputStreamImp
typedef RWTStreamGuardImp
< RWCharInputStream,
RWFilteredCharInputStreamImp
RWGuardedCharInputStreamImp
typedef RWTStreamGuardImp
< RWCharOutputStream,
RWFilteredCharOutputStreamImp
RWGuardedCharOutputStreamImp
typedef RWTStreamGuardImp
< RWDataInputStream,
RWFilteredDataInputStreamImp
RWGuardedDataInputStreamImp
typedef RWTStreamGuardImp
< RWDataOutputStream,
RWFilteredDataOutputStreamImp
RWGuardedDataOutputStreamImp
typedef RWTStreamGuardImp
< RWUCharInputStream,
RWFilteredUCharInputStreamImp
RWGuardedUCharInputStreamImp
typedef RWTStreamGuardImp
< RWUCharOutputStream,
RWFilteredUCharOutputStreamImp
RWGuardedUCharOutputStreamImp
typedef RWTStreamGuardImp
< RWWCharInputStream,
RWFilteredWCharInputStreamImp
RWGuardedWCharInputStreamImp
typedef RWTStreamGuardImp
< RWWCharOutputStream,
RWFilteredWCharOutputStreamImp
RWGuardedWCharOutputStreamImp
typedef
RWTStreambufFromByteCharInputStream
< RWByteInputStream
RWStreambufFromByteInputStream
typedef
RWTStreambufFromByteCharInputStream
< RWCharInputStream
RWStreambufFromCharInputStream
typedef
RWTStreambufToByteCharOutputStream
< RWByteOutputStream
RWStreambufToByteOutputStream
typedef
RWTStreambufToByteCharOutputStream
< RWCharOutputStream
RWStreambufToCharOutputStream
typedef RWTOutputStreamLockImp
< RWByteOutputStream,
RWFilteredByteOutputStreamImp
RWSynchronizedByteOutputStreamImp
 A typedef that implements a simple binary lock output stream.
typedef RWTOutputStreamLockImp
< RWCharOutputStream,
RWFilteredCharOutputStreamImp
RWSynchronizedCharOutputStreamImp
 A typedef that implements a simple narrow character lock output stream.
typedef RWTOutputStreamLockImp
< RWUCharOutputStream,
RWFilteredUCharOutputStreamImp
RWSynchronizedUCharOutputStreamImp
 A typedef that implements a simple Unicode character lock output stream.
typedef RWTOutputStreamLockImp
< RWWCharOutputStream,
RWFilteredWCharOutputStreamImp
RWSynchronizedWCharOutputStreamImp
 A typedef that implements a simple wide character lock output stream.
typedef unsigned long RWSize
typedef unsigned char RWByte
typedef unsigned short RWUChar

Functions

RWByteInputStream rwGuard (RWByteInputStream &stream)
RWByteOutputStream rwGuard (RWByteOutputStream &stream)
RWCharInputStream rwGuard (RWCharInputStream &stream)
RWCharOutputStream rwGuard (RWCharOutputStream &stream)
RWDataInputStream rwGuard (RWDataInputStream &stream)
RWDataOutputStream rwGuard (RWDataOutputStream &stream)
RWUCharInputStream rwGuard (RWUCharInputStream &stream)
RWUCharOutputStream rwGuard (RWUCharOutputStream &stream)
RWWCharInputStream rwGuard (RWWCharInputStream &stream)
RWWCharOutputStream rwGuard (RWWCharOutputStream &stream)

Detailed Description

The Streams package includes concrete stream classes and a modular framework, which allows streams to be connected to each other to form complex chains of streaming elements.

The Streams package uses the handle-body pattern to allow complex streaming elements to be returned by value. It has two handle classes (input and output) for each stream family, as well as abstract body classes. Applications manipulate streams through their handle classes, which isolate them from concrete stream classes and ensure a uniform interface to any class within a stream family.

For complete information about the Streams package, see the Advanced Tools Module User's Guide.


Typedef Documentation

The typedef RWBufferedByteInputStreamImp implements a buffer that can be used with binary input streams. The size of the buffer is specified in its static member make() function that is used to create it.

Header File

 #include <rw/stream/RWBufferedByteInputStreamImp.h>

Examples

 // A buffer for binary input streams
 
 #include <rw/stream/RWBufferedByteInputStreamImp.h>
 #include <rw/stream/RWByteFromStreambufInputStreamImp.h>
 #include <rw/stream/RWNativeDataFromByteInputStreamImp.h>
 #include <iostream.h>
 #include <fstream.h>
 #include <rw/rwfile.h>
 
 
 int main() {
   filebuf fbuf;
 
   if (!RWFile::Exists("RWBufferedByteOutputStreamImp.out")) {
     cout << "The input file does not exist." << endl;
   }
 
   else {
     fbuf.open("RWBufferedByteOutputStreamImp.out",
       ios::in | ios::binary);
 
     RWByteInputStream binStream =
       RWByteFromStreambufInputStreamImp::make(fbuf);
 
     RWByteInputStream bufferedStream =
       RWBufferedByteInputStreamImp::make(binStream, 512);
 
     RWStreambufFromByteInputStream adaptor(bufferedStream);
 
     istream in(&adaptor);
   
     int i;
     in >> i;
     cout << i << endl;
   }
   return 0;
 }

The typedef RWBufferedByteOutputStreamImp implements a buffer that can be used with byte output streams. The size of the buffer is specified in its static member make() function that is used to create it. The buffer's role is to store bytes up to its maximum capacity, and then forward them to its associated sink stream. The buffer flushes itself upon destruction.

Header File

 #include <rw/stream/RWBufferedByteOutputStreamImp.h>

Examples

 // A buffer for binary output streams
  
 #include <rw/stream/RWBufferedByteOutputStreamImp.h>
 #include <rw/stream/RWByteToStreambufOutputStreamImp.h>
 #include <rw/stream/RWNativeDataToByteOutputStreamImp.h>
 #include <fstream.h>
 
 
 int main() {
   filebuf fbuf;
 
   fbuf.open("RWBufferedByteOutputStreamImp.out",
     ios::out | ios::binary);
 
   RWByteOutputStream binStream =
     RWByteToStreambufOutputStreamImp::make(fbuf);
 
   RWByteOutputStream bufferedStream =
     RWBufferedByteOutputStreamImp::make(binStream);
 
  RWStreambufToByteOutputStream adaptor(bufferedStream);
 
     ostream out(&adaptor);
 
   int i = 42;
   out << i;
   
   return 0;
 }

The typedef RWBufferedCharOutputStreamImp implements a buffer that can be used with narrow character output streams. The size of the buffer is specified in its static member make() function, which is used to create it. The buffer's role is to store narrow characters up to its maximum capacity, and then forward them to its associated synchronized stream. The buffer flushes itself upon destruction.

Header File

 #include <rw/stream/RWBufferedCharOutputStreamImp.h>

Examples

 // This is an output buffer used for narrow character streams.
 
 #include <rw/stream/RWBufferedCharOutputStreamImp.h>
 #include <rw/stream/RWCharToStreambufOutputStreamImp.h>
 #include <rw/stream/RWStreambufToCharOutputStream.h>
 #include <fstream.h>
 #include <iostream.h>
 
 int main() {
   filebuf fbuf;
 
   fbuf.open("RWBufferedCharOutputStreamImp.out", ios::out);
     
   RWCharOutputStream charStream =
     RWCharToStreambufOutputStreamImp::make(fbuf);
 
   RWCharOutputStream bufferedStream =
     RWBufferedCharOutputStreamImp::make(charStream, 128);
 
   RWStreambufToCharOutputStream adaptor(bufferedStream);
 
   ostream out(&adaptor);
 
   int i = 63;
   out << i;
   
   return 0;
 }

The typedef RWBufferedUCharInputStreamImp implements a buffer that can be used with Unicode character input streams. The size of the buffer is specified in its static member make() function, which is used to create it.

Header File

 #include <rw/stream/RWBufferedUCharInputStreamImp.h>

The typedef RWBufferedUCharOutputStreamImp implements a buffer that can be used with Unicode character output streams. The size of the buffer is specified in its static member make() function, which is used to create it. The buffer's role is to store UTF-16 characters up to its maximum capacity, and then forward them to its associated synchronized stream. The buffer flushes itself upon destruction.

Header File

 #include <rw/stream/RWBufferedUCharOutputStreamImp.h>

The typedef RWBufferedWCharInputStreamImp implements a buffer that can be used with wide character input streams. The size of the buffer is specified in its static member make() function that is used to create it.

Header File

 #include <rw/stream/RWBufferedWCharInputStreamImp.h>

The typedef RWBufferedWCharOutputStreamImp implements a buffer that can be used with wide character output streams. The size of the buffer is specified in its static member make() function, which is used to create it. The buffer's role is to store wide characters up to its maximum capacity, and then forward them to its associated sink stream. The buffer flushes itself upon destruction.

Header File

 #include <rw/stream/RWBufferedWCharOutputStreamImp.h>
typedef unsigned char RWByte

Global typedef for unsigned char

The typedef RWGuardedByteInputStreamImp implements a simple binary guard input stream. The input stream guard acquires the synchronization mechanism provided by its source stream at construction time, and releases it upon destruction. The input guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the input stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedByteInputStreamImp.

Header File

 #include <rw/stream/RWGuardedByteInputStreamImp.h>
See also:
RWSynchronizedByteInputStreamImp

The typedef RWGuardedByteOutputStreamImp implements a simple binary guard output stream. The output stream guard acquires the synchronization mechanism provided by its sink stream at construction time, and releases it upon destruction. The output guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the output stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedByteOutputStreamImp.

Header File

 #include <rw/stream/RWGuardedByteOutputStreamImp.h>
See also:
RWSynchronizedByteOutputStreamImp

The typedef RWGuardedCharInputStreamImp implements a simple narrow character guard input stream. The input stream guard acquires the synchronization mechanism provided by its source stream at construction time, and releases it upon destruction. The input guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the input stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedCharInputStreamImp.

Header File

 #include <rw/stream/RWGuardedCharInputStreamImp.h>
See also:
RWSynchronizedCharInputStreamImp

The typedef RWGuardedCharOutputStreamImp implements a simple narrow character guard output stream. The output stream guard acquires the synchronization mechanism provided by its sink stream at construction time, and releases it upon destruction. The output guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the output stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedCharOutputStreamImp.

Header File

 #include <rw/stream/RWGuardedCharOutputStreamImp.h>
See also:
RWSynchronizedCharOutputStreamImp

The typedef RWGuardedDataInputStreamImp implements a simple data guard input stream. The input stream guard acquires the synchronization mechanism provided by its source stream at construction time, and releases it upon destruction. The input guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, then the input stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedDataInputStreamImp.

Header File

 #include <rw/stream/RWGuardedDataInputStreamImp.h>
See also:
RWSynchronizedDataInputStreamImp

The typedef RWGuardedDataOutputStreamImp implements a simple data guard output stream. The output stream guard acquires the synchronization mechanism provided by its sink stream at construction time, and releases it upon destruction. The output guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the output stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedDataOutputStreamImp.

Header File

 #include <rw/stream/RWGuardedDataOutputStreamImp.h>
See also:
RWSynchronizedDataOutputStreamImp

The typedef RWGuardedUCharInputStreamImp implements a simple Unicode character guard input stream. The input stream guard acquires the synchronization mechanism provided by its source stream at construction time, and releases it upon destruction. The input guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the input stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedUCharInputStreamImp.

Header File

 #include <rw/stream/RWGuardedUCharInputStreamImp.h>
See also:
RWSynchronizedUCharInputStreamImp

The typedef RWGuardedUCharOutputStreamImp implements a simple Unicode character guard output stream. The output stream guard acquires the synchronization mechanism provided by its sink stream at construction time, and releases it upon destruction. The output guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the output stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedUCharOutputStreamImp.

 #include <rw/stream/RWGuardedUCharOutputStreamImp.h>
See also:
RWSynchronizedUCharOutputStreamImp

The typedef RWGuardedWCharInputStreamImp implements a simple wide character guard input stream. The input stream guard acquires the synchronization mechanism provided by its source stream at construction time, and releases it upon destruction. The input guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the input stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedWCharInputStreamImp.

Header File

 #include <rw/stream/RWGuardedWCharInputStreamImp.h>
See also:
RWSynchronizedWCharInputStreamImp

The typedef RWGuardedWCharOutputStreamImp implements a simple wide character guard output stream. The output stream guard acquires the synchronization mechanism provided by its sink stream at construction time, and releases it upon destruction. The output guard stream doesn't maintain its own synchronization mechanism, but uses the one provided by the next processing stream. If the next processing stream doesn't implement any synchronization mechanism, the output stream guard class has no effect. The guard class is generally used in combination with class RWSynchronizedWCharOutputStreamImp.

Header File

 #include <rw/stream/RWGuardedWCharOutputStreamImp.h>
See also:
RWSynchronizedWCharOutputStreamImp
typedef unsigned long RWSize

Global typedef for unsigned long

The typedef RWStreambufFromByteInputStream is an adaptor. It adapts the iostreams std::streambuf interface to the Rogue Wave binary input stream interface. Requests made through the iostreams std::streambuf interface are forwarded to the embedded RWByteInputStream handle. Calls to the iostreams std::streambuf functions dealing with the output sequence of the std::streambuf will always fail since the underlying binary input stream supports only input operations.

Header File

 #include <rw/stream/RWStreambufFromByteInputStream.h>

The typedef RWStreambufFromCharInputStream is an adaptor. It adapts the iostreams std::streambuf interface to the Rogue Wave narrow character input stream interface. Requests made through the iostreams std::streambuf interface are forwarded to the embedded RWCharInputStream handle. Calls to the iostreams std::streambuf functions dealing with the output sequence of the std::streambuf will always fail since the underlying narrow character input stream only supports input operations.

Header File

 #include <rw/stream/RWStreambufFromCharInputStream.h>

The typedef RWStreambufToByteOutputStream is an adaptor. It adapts the iostreams std::streambuf interface to the Rogue Wave binary output stream interface. Requests made through the iostreams std::streambuf interface are forwarded to the embedded RWByteOutputStream handle. Calls to the iostreams std::streambuf functions dealing with the input sequence of the std::streambuf will always fail since the underlying binary output stream supports only output operations.

Header File

 #include <rw/stream/RWStreambufToByteOutputStream.h>

The typedef RWStreambufToCharOutputStream is an adaptor. It adapts the iostreams std::streambuf interface to the Rogue Wave narrow character output stream interface. Requests made through the iostreams std::streambuf interface are forwarded to the embedded RWCharOutputStream handle. Calls to the iostreams std::streambuf functions dealing with the input sequence of the std::streambuf will always fail since the underlying narrow character output stream only supports output operations.

Header File

 #include <rw/stream/RWStreambufToCharOutputStream.h>

The typedef RWSynchronizedByteOutputStreamImp implements a simple binary lock output stream. The stream locks its internal synchronization mechanism before forwarding output requests to its associated sink stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.

Header File

 #include <rw/stream/RWSynchronizedByteOutputStreamImp.h>

The typedef RWSynchronizedCharOutputStreamImp implements a simple narrow character lock output stream. The stream locks its internal synchronization mechanism before forwarding output requests to its associated sink stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.

Header File

 #include <rw/stream/RWSynchronizedCharOutputStreamImp.h>

The typedef RWSynchronizedUCharOutputStreamImp implements a simple Unicode character lock output stream. The stream locks its internal synchronization mechanism before forwarding output requests to its associated sink stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.

Header File

 #include <rw/stream/RWSynchronizedUCharOutputStreamImp.h>

The typedef RWSynchronizedWCharOutputStreamImp implements a simple wide character lock output stream. The stream locks its internal synchronization mechanism, before forwarding output requests to its associated sink stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.

Header File

 #include <rw/stream/RWSynchronizedWCharOutputStreamImp.h>
typedef unsigned short RWUChar

Global typedef for unsigned short


Function Documentation

RWWCharOutputStream rwGuard ( RWWCharOutputStream stream  ) 

Manipulator that is used to guard a series of insertion operations.

Parameters:
stream A wide character output stream.

Header File

 #include <rw/stream/RWGuardedWCharOutputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any insertions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

 // Lock the stream for the duration of all three insertions:
 ostr << rwGuard << data1 << data2 << data3;
RWWCharInputStream rwGuard ( RWWCharInputStream stream  ) 

Manipulator that is used to guard a series of extraction operations.

Parameters:
stream A wide character input stream.

Header File

 #include <rw/stream/RWGuardedWCharInputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any extractions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

 // Lock the stream for the duration of all three insertions:
 instr >> rwGuard >> data1 >> data2 >> data3;
RWUCharOutputStream rwGuard ( RWUCharOutputStream stream  ) 

Manipulator that is used to guard a series of insertion operations.

Parameters:
stream A UTF-16 character output stream.

Header File

 #include <rw/stream/RWGuardedUCharOutputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any insertions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

 // Lock the stream for the duration of all three insertions:
 ostr << rwGuard << data1 << data2 << data3;
RWUCharInputStream rwGuard ( RWUCharInputStream stream  ) 

Manipulator that is used to guard a series of extraction operations.

Parameters:
stream A UTF-16 character input stream.

Header File

 #include <rw/stream/RWGuardedUCharInputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any extractions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Examples

 // Lock the stream for the duration of all three insertions:
 instr >> rwGuard >> data1 >> data2 >> data3;
RWDataOutputStream rwGuard ( RWDataOutputStream stream  ) 

Manipulator that is used to guard a series of insertion operations.

Parameters:
stream A binary output stream.

Header File

 #include <rw/stream/RWGuardedDataOutputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any insertions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Examples

 // Lock the stream for the duration of all three insertions:
 ostr << rwGuard << data1 << data2 << data3;
RWDataInputStream rwGuard ( RWDataInputStream stream  ) 

Manipulator that is used to guard a series of extraction operations.

Parameters:
stream A data input stream.

Header File

 #include <rw/stream/RWGuardedDataInputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any extractions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Examples

 // Lock the stream for the duration of all three insertions:
 instr >> rwGuard >> data1 >> data2 >> data3;
RWCharOutputStream rwGuard ( RWCharOutputStream stream  ) 

Manipulator that is used to guard a series of insertion operations.

Parameters:
stream A narrow character output stream

Header File

 #include <rw/stream/RWGuardedCharOutputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any insertions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Examples

 // Lock the stream for the duration of all three insertions:
 ostr << rwGuard << data1 << data2 << data3;
RWCharInputStream rwGuard ( RWCharInputStream stream  ) 

Manipulator that is used to guard a series of extraction operations.

Parameters:
stream A narrow character input stream.

Header File

 #include <rw/stream/RWGuardedCharInputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any extractions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Examples

 // Lock the stream for the duration of all three insertions:
 instr >> rwGuard >> data1 >> data2 >> data3;
RWByteOutputStream rwGuard ( RWByteOutputStream stream  ) 

Manipulator that is used to guard a series of insertion operations.

Parameters:
stream A binary output stream

Header File

 #include <rw/stream/RWGuardedByteOutputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any insertions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Examples

 // Lock the stream for the duration of all three insertions:
 ostr << rwGuard << data1 << data2 << data3;
RWByteInputStream rwGuard ( RWByteInputStream stream  ) 

Manipulator that is used to guard a series of extraction operations.

Parameters:
stream A binary input stream.

Header File

 #include <rw/stream/RWGuardedByteInputStreamImp.h>

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any extractions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Examples

 // Lock the stream for the duration of all three extractions:
 instr >> rwGuard >> data1 >> data2 >> data3;

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.