![]() |
In these bindings, the client usage picture for the IDL types declared in the file T.idl appears as follows. Bold lines enclose files that are generated from IDL. Double lines enclose files that would normally be produced by a programmer or development tool.
Client usage pictures for IDL types. The corba.h header file is included in the T.hh file, which is
then included in the T_C.cpp file. The T_C.cpp file is then compiled, along
with C++ client code that uses data whose types are defined in T.idl and included
in T.hh. The final output is the client application executable.
The corba.h header file defines the C++ mappings for primitive IDL data types and other types required by the bindings, within a scope called CORBA. For more information about the scope see IDL name scoping. These types are implemented in a shared library that can be linked with a client application. A client application is created by compiling/linking emitted bindings and client code to produce an executable file.
The C++ bindings for the IDL types defined in the file T.idl are represented by a set of declarations in the emitted T.hh header file. The classes declared in T.hh that support client code are implemented by the code emitted into a corresponding T_C.cpp implementation file. The pair of files T.hh and T_C.cpp thus collectively provide the client bindings for T. (To minimize the number of generated files, some types used by servers are also declared in T.hh).
In general, the C++ bindings map non-primitive IDL types to C++ classes that implement constructors, destructors, assignment operators, and other functionality. Auxiliary classes are also sometimes defined, such as classes to automate storage management for array elements, sequence elements, and structure and union fields. The names of these auxiliary classes are not specified by CORBA, because specially-designed conversion operators and copy constructors hide their existence from client code. These classes are not of interest to programmers that use the bindings.
Related tasks... | |
Creating IDL files for an enterprise bean | |
Related concepts... | |
Parent: Interface Definition Language (IDL), usage and implementation | |
CORBA C++ server usage bindings | |
Related reference... | |
Interface Definition Language (IDL) | |
CORBA C++ bindings | |