The orb library contains two classes, RWreqistream and RWreqostream, that provide what is essentially a virtual stream veneer over the CORBA::Request object. This veneer lets you write insertion and extraction operators to a virtual stream rather than to a CORBA::Request object.
There are several advantages to using RWreqistream and RWreqostream, including:
Many developers have already written classes that work with virtual streams. If your classes are already virtual stream-friendly, you don't have to write special streaming operators for CORBA::Request, since the virtual stream implementations in the orb library work with CORBA::Request.
Many of the Rogue Wave classes work with virtual streams. The new stream types that work with CORBA::Request allow these Rogue Wave types to be passed as opaque types without additional code.
Once you have written the virtual stream insertion and extraction operators for your classes, you can take advantage of the other Rogue Wave virtual stream implementations. For example, using RWpostream, a portable virtual stream, and the net library classes, you could pass objects that use virtual streams just as easily over a socket as an ORB interface.
The orb library RWreqistream and RWreqostream classes are concrete implementations of the Tools.h++ abstract base classes RWvistream and RWvostream.
The Tools.h++ RWvistream and RWvostream classes describe input and output streams respectively. Rogue Wave provides a number of concrete virtual stream implementations of these classes for different purposes. One formats the stream into ASCII characters, another into a binary representation, and so on. However, it doesn't matter which concrete stream implementation you decide to use. Since you write the streaming insertion and extraction operators for your classes in terms of the virtual stream base classes, your classes can be used with any of the Rogue Wave virtual stream implementations.
The orb library RWreqistream and RWreqostream class constructors take a reference to a CORBA::Request as a parameter. Internally the streams translate insertions and extractions on themselves into insertions and extractions on the CORBA::Request.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.