IDL Mapping for Some Complex Types (Example 2)

The IDL features introduced in Example 2 are discussed further in the following subsections:

  • The struct type

  • The unbounded sequence type

  • Java Holder and Helper types

The struct Type

The mapping of an IDL struct to C++ and Java is shown in Table 2.7.

Table 2.7. Mapping for the struct Type
OMG IDLC++Java
struct Foo {...};
struct Foo {...}; 
class Foo_var
class Foo {...}
class FooHelper
class FooHolder

An IDL struct has a very similar syntax to a struct in the C programming language. For example

//IDL
module BookRepository {
    struct Date {
        short day;
        short month;
        short year;
    };
};

defines a BookRepository::Date struct having three members: day, month, and year. The Date type can be used as a parameter or return ...

Get Pure CORBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.