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 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.