Example of a Regular Value Implementation

The following subsections describe in detail how to implement a regular value type in C++ and Java. The example is based on the Recycle Broker application of Chapter 3, “A Sample CORBA System.” In the original definition of the RecycleBroker IDL module (Listing 3.1), struct types—for example, CustomerDetails and WasteItemDetails—are used to represent the state of objects. The Recycle Broker code can be refactored to replace those structs with value types instead. This section describes how to re-implement WasteItemDetails as a value type.

Example IDL

A partial listing of the RecycleBroker module refactored from Listing 3.1 is shown in Listing 11.12. The Listing 11.12 shows only the IDL definitions relevant ...

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.