Opaque data type
An opaque data type is a C structure or C++/ActiveX class. The database server does not interpret the contents of the structure. Instead, it calls support routines that you provide to manipulate the structure.
BladeSmith generates much of the code for the support routines. You must complete the code and compile the source code.
Property | Default value | Description |
---|---|---|
Name | prefix OpaqueType | The name of the opaque type. See Opaque data type name lengths for more information. |
Server implementation | C | Which language to use for database server source
code for your opaque data type: C, C++, or Java™. You must set server compatibility to 9.2 or later to generate code for Java projects. You need the J/Foundation upgrade to HCL OneDB™ to enable Java services. See Server implementation for more information. |
Client implementation | None | Whether to generate value objects as a client interface
for your opaque data type in ActiveX. See Client implementation for more information. |
Generate accessor methods? (ActiveX client implementation) | None | Whether to create accessor methods for value objects;
that is, whether to expose the members of the data structure that
defines your opaque data type as properties. See Accessor methods for more information. |
Define internal structure? (C) | Yes | Whether you enter information about the internal
members of the opaque type in BladeSmith. See Definition of internal structure for more information. |
Fixed or variable size? (C) | Fixed size | Whether the opaque data type varies in size. See Fixed or variable size for more information. |
Total size (if you choose not to specify the internal structure to BladeSmith and choose fixed size) |
None | The total size of the opaque data type. The maximum size is 32 KB. If you do not specify a size, BladeSmith calculates it. |
Member information (if you choose to specify the internal structure to BladeSmith) |
None | The name, data structure, and array size of the
members making up the opaque type. See Member information for more information. |
Limit allocation size? (variable-length opaque data types) |
No | The maximum size allowed the opaque data type,
not to exceed 32 KB. See Maximum size for more information. |
Memory alignment (if you choose not to specify the internal structure to BladeSmith) |
4 | The alignment value for the first member of the
opaque data type. See Memory alignment for more information. |
Support routines | Basic text input/output Binary send/receive with client (C and C++) Text file import/export Binary file import/export (C and C++) Type compare support |
The routines necessary to operate on the internal
structure of the opaque data type and optional built-in routines. See Support routines for more information. |
The following sections describe the properties of opaque data types you need to define when you create an opaque data type with BladeSmith.