![]() |
DataBlade Developers Kit Tutorial |
Tutorial Exercise 5Creating Opaque Data TypesThis exercise demonstrates creating opaque data types, their support routines, and user-defined routines that operate on them. The Circle DataBlade module in this exercise is very similar to the RowCircle DataBlade module in Exercise 4. The difference is that the Circle DataBlade module creates opaque data types, whereas the RowCircle DataBlade module creates row data types. The Circle DataBlade module creates two new data types, Pnt and Circ, and two new functions, Distance() and Contains(). Just like the RowCircle DataBlade module, the Circle DataBlade module enables you to:
The following diagram illustrates the type of data Circle data types contain. The Circle DataBlade module that you create in this exercise is similar to the example Circle DataBlade module included with the DataBlade Developers Kit. You can look at the example DataBlade module to see how to change the input format of an opaque circle type, and how to add additional functionality. The example Circle DataBlade module is located in the %INFORMIXDIR%\dbdk\examples\types\dapi\Circle directory. Tutorial StepsThis exercise has 13 steps. It takes approximately one hour to complete.
Copyright © 1998, Informix Software, Inc. All rights reserved. |