Adding Exception Handling—Example 3

The third example adds the BorrowableCollection IDL interface, which supports a single operation, borrow_book(), to let you record the borrowing of a book.

Listing 2.19 shows the BookRepository IDL module with these additions.

Listing 2.19. IDL BookRepository Module for Example 3
//IDL module BookRepository { typedef long ISBN; struct PersonName { string first_name; string second_name; }; struct Date { short day; short month; short year; }; struct BookDetails { PersonName author; string title; ISBN book_id; Date publication_date; }; typedef sequence<BookDetails> BookDetailsSeq; enum FuzzyBoolean {NO, YES, UNKNOWN}; interface Collection { readonly attribute long number_of_books; attribute string name_of_collection; ...

Get Pure CORBA now with the O’Reilly learning platform.

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