Overview of Value Semantics
A value type combines the characteristics of an IDL struct and an IDL interface. A regular value can declare state members (displaying struct-like character) and operations and attributes (displaying interface-like character). For example, an AccountVal type could be declared as a regular value, as shown in Listing 11.1.
Listing 11.1. An AccountVal Type Declared as a Regular Value
//IDL valuetype AccountVal { // state members public long m_account_id; public string m_owner; private long m_balance; // operations boolean withdraw(in long amount); void pay_in(in long amount); }; |
The AccountVal value type could represent a cached database record in a server. The state members of AccountVal—that is, m_account_id, m_owner ...
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.