DeCreateObject(3D) — Kubota Pacfic Computer Inc. (\*(Dd)
NAME
DeCreateObject − Create an internal Doré object
SYNOPSIS
C:
DtObject DeCreateObject(class_id, object_data)
DtInt class_id;
DtPtr object_data;
FORTRAN:
INTEGER∗4 DECO(CLASID,DATA,SIZE)
INTEGER∗4 CLASID
REAL∗8 DATA(∗)
INTEGER∗4 SIZE
DESCRIPTION
DeCreateObject creates an internal Doré object, and returns the object handle. It is used by implementations of user-defined classes.
The parameter class_id is the unique class identifier for the object to be created. For user-defined classes this will be the class identification number returned by DeAddClass <DEAC>.
C SPECIFIC
The C version of DeCreateObject assumes that the calling routine has already allocated space for the private data for the object, and that object_data points to this data.
FORTRAN SPECIFIC
FORTRAN function, DECO, assumes that space for the private data has not been allocated. It will allocate SIZE bytes, and copy the same number of bytes from DATA to the newly allocated space. This means that the method routines of a user-defined primitive FORTRAN do not have direct access to the private data of the objects. The private data of those objects can be FORTRAN through calls to DEROD, DEWOD, and DEDOD.
Note that the type of DATA is not important since DECO only uses the address of it as a starting point for the copy. Typically, DATA will be an array containing variables of different types (via an EQUIVALENCE statement).
ERRORS
DeCreateObject will fail if the class identifier is invalid.
[WARNING - invalid class handle]
SEE ALSO
DeAddClass(3D), DEDOD(3D), DEROD(3D) DEWOD(3D)
September 02, 1992