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.
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:
opaque RWCString; opaque RWSlistCollectables; interface Library; { . . . RWSlistCollectables getBooksByAuthor(in RWCString author); RWSlistCollectables getBooksBySubject(in RWCString subject); RWSlistCollectables getBooksByTitle(in RWCString title); };
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.
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:
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.