From the outset, CORBA was intended to provide strong support for object-oriented programming concepts. Polymorphism is, therefore, one of the fundamental features of CORBA. The following are some of the object-oriented features supported:

  • Inheritance of interfaces, including multiple inheritance

  • Polymorphism

The IDL module Zoo, given in Listing 5.2, is used here to illustrate the features of inheritance and polymorphism.

Listing 5.2. The IDL for Module Zoo
// IDL #pragma prefix "pure-corba-3.com" module Zoo { interface Animal; typedef sequence<Animal> AnimalSeq; typedef sequence<string> StringSeq; interface ZooManager { AnimalSeq getAllAnimals(); ... }; // Base Interfaces interface Animal { readonly attribute string species; readonly ...

Get Pure CORBA now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.