In this section we will give a brief overview of the J-Integra® Espresso IDL-to-C# language mapping. Most IDL types have a direct C# counterpart. IDL identifiers will be directly mapped into C# identifiers and a module is represented by a C# name space. C# keywords which are used as IDL identifiers are prefixed by an underscore. Interfaces, Structures, and Unions receive an additional name space with the suffix 'Package' to accommodate new definitions of types within the corresponding type or interface name spaces.
The following table gives a listing of the basic IDL data types and their representation in C#.
IDL TYPE | C# |
boolean | bool |
char | char |
wchar | char |
string | string |
wstring | string |
octet | byte |
short | short |
unsigned short | ushort |
long | int |
unsigned long | uint |
long long | long |
unsigned long long | ulong |
float | float |
double | double |
long double | double |
Interfaces are directly mapped to their C# counterparts. 'Attributes' defined in the IDL interface become C# properties.
.NET Helper Classes are generated for any user defined type (using the type name with the suffix 'Helper'). Helpers will provide static methods for the following:
Most of the time, only the last piece of functionality is needed by the developer.
Similar to Java, the IDL statement 'typedef' does not introduce a new type in C#. It only forces 'Helper' classes to be generated. Since C# does not know 'typedefs', the original type has to be used in the application code. The 'Helper' class provides the repository id for the corresponding CORBA type.
Constructed types comprise structures, enumerations, and unions.
Arrays as well as sequences are mapped to C# arrays. They usually appear in conjunction with 'typedefs' or 'constructed types'.
A CORBA Object is by definition a remote object offering a remote interface to the client. Nevertheless, there are some objects defined in terms of IDL (for the sake of correctness: PIDL - Pseudo IDL) within the CORBA standard which are not remote but necessarily local (like the ORB interface), or objects which are mandatorily transported by value: