Each definition of trading offer type is mapped to an OMG IDL module named as the offer type and containing the five following definitions.
Figure 7 presents an excerpt (the lookup proxy interface) of the OMG IDL definitions generated for the Printer trading contract as defined in Figure 5.
The Printer offer type is mapped to the Printer OMG IDL module. The Offer structure represents a printer offer. It contains a field for the exported print service, as well as for the name, color, cost_per_page, and ppm properties. The lookup proxy query_all(), query_colors(), query_faster(), and query_faster_colors() operations represent the queries defined in the Printer contract. Parameters are the same as those defined in the contract, while their return type is a printer offer sequence (i.e. OfferSeq). The last query() operation allows applications to perform searches not defined in the TDL contract. The TORBA::IllegalConstraint exception may be raised at runtime if the constraint is malformed.
Experiments have been performed using generation rules presented here, validating these choices. As an example, the Offer structure is a good means to perform checking of export and lookup operations at compilation time. However, we also intend to experiment the use of valuetypes2 instead of the structure, as well as using a typed iterator interface instead of the sequence.