Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

27.5 Passing Rogue Wave Classes as Opaque Types

To make passing Rogue Wave classes as opaque types even easier, Rogue Wave provides the necessary CORBA::Request stream operators in toolsio.cpp. The supported Rogue Wave classes are listed in Section 27.4.2.

To pass an instance of a Rogue Wave class, all you have to do is declare the type as opaque in the IDL file and make sure that the orb library is linked into both the client and server portions of the application.

27.5.1 Example

To expand on the Library example, let's say that the system has the ability to find books based on some search criteria. We want to implement the functions getBooksByAuthor, getBooksByTitle, and getBooksBySubject in our Library interface, and to export this capability to the distributed environment. For each of these functions, we pass in an RWCString representing the search criteria, and expect to have returned an RWSlistCollectables object, which is a singly-linked list of Books.

The IDL file looks like this:

When the client and the server portions of the application are written, they are each linked with the orb and Tools.h++ libraries, and with the Book implementation.

27.5.2 Rogue Wave Classes with Opaque Support

The orb library provides opaque support for the following Tools.h++ classes, which implement the insertion and extraction operators for virtual streams:

The orb library provides opaque support for these Tools.h++ RWCollectable classes:


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.