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.