Chapter 17 Creating CORBA C++ Clients
Generating stubs
The Jaguar ORB implementation class requires stub header files
in order to invoke component methods. You generate the stub header
files with Jaguar Manager and include them in your client source
files. The stub header files contain as inline all the component
functions, which make calls to the C functions in libjcc.dll.
Inline functions allow Jaguar to support multiple C++ compilers
without having to include separate link libraries for each compiler.
If you are using another ORB implementation class to connect
to Jaguar, you must export IDL and use the vendor's IDL
compiler to generate stubs that are compatible with that ORB implementation. "Using
CORBA ORB implementations other than Jaguar" describes
how to export IDL files for Jaguar components.
Procedure for generating stubs
You can generate stub header files from Jaguar Manager as
follows:
- Highlight a component,
package, or module as follows:
- Highlight a
component to generate stubs for all interfaces and types required
by a component,
- Highlight a package to generate all stubs needed
by components in the package, or
- Highlight a module to generate stubs for IDL interfaces
and types defined within that module.
- Select File | Generate Stub/Skeleton.
The Generate Stubs & Skeletons dialog is displayed.
- Select the Generate Stubs check box. Unselect Generate
Skeletons unless you wish to generate stubs at the same time. Enter
the C/C++ and Java code base values in
the Stubs Generation Options area.
- Code
Base
- Enter the top-level directory path where
generated files should be created. When the window displays, the
default is the Jaguar include subdirectory.
You can type a different path or use the Browse button to
select a directory. The path must be a valid UNIX or Windows NT
path. It can include a drive and as many directories as you want.
The only shell aliases allowed in this field are %JAGUAR% (for
NT) and $JAGUAR (for UNIX). Other shell aliases such as "~" to
indicate your home directory are not supported.
If you clear the field, the default is your home directory
(specified by $HOME for UNIX and %home% for
NT).
If you specify a relative path, such as "myclasses," the
path is interpreted relative to the Jaguar html/classes directory.
- Click the Generate button.
Copyright © 2000 Sybase, Inc. All rights reserved.
|
|