Next: struct x1f4_lxpart_type, Up: Referable Types Library Types [Index]
typedef struct x1f4_cxpart_type { const char *name; int (*copy)(void *, void *, void *, const void *, struct x1f4_caselink_type **), (*flat)(void *, void *), (*high)(void *, void *, struct x1f4_nodelink_type **), (*line)(void *, void *), type; unsigned size, trap; void *context; } x1f4_cxpart_type;
The x1f4_cxpart_type
record describes data types for the referable types
library object constructor (the data description are constructed together with
the library object that will make them available).
name
is the data type name
size
is the data type name length
type
is the type id
See Application Defined Types.
For the applications constructing referable types library objects via the
executive assembler the type id needs not be specified (indeed, the
specification is ignored). Instead, the struct x1f4_cxpart_type
type
description is updated to reflect the assigned type id, and for that reason it
needs to be writable.
See Executive Assembler.
trap
is the size to reserve for application use. The pointers passed as aime
values indicate the application reserved section, just as the pointers passed
to the methods in the struct x1f4_cxpart_type
record do.
flat
is the routine finalizing objects. If no such finalizing
routine is required flat
may be set to NULL
. When called, the
routine is supplied the type context (the context
field in this very
record) and the address at which data is stored as arguments, in this order.
line
is the routine initializing objects. When called, the routine
is supplied the type context (the context
field in this very record) and
the address at which data is stored as arguments, in this order.
copy
is the routine copying the application section of objects.
copy
will be set to NULL
to add a new reference to the source
object instead making a copy of it.
The method is taken to create copies of the referred objects (if the copied object refers other objects) and sets them as referred by the object copy being made. It may do other things instead, such as adding a new reference hold by the object copy being made to the referred objects.
When called, the routine is supplied the reference tracking context, the type
context (the context
field in this very record), the address at which
the data copy being made is stored, the address at which data being copied is
stored and the struct x1f4_caselink_type
linked list required by the non
recursive data replication protocol as arguments, in this order.
See Data Replication.
See Non Recursive Data Replication.
high
is the routine removing the references made to other objects. If no such
reference removing routine is required high
may be set to NULL
.
When called, the routine is supplied the type context (the context
field
in this very record), the address at which data is stored and the struct
x1f4_nodelink_type
linked list required by the cycle dismantling protocol as
arguments, in this order.
The routine is meant to remove all made references. That may mean calling for
all referred objects the appropriate free
or pick
methods in
their struct x1f4_nodetype_type
type descriptions.
See Cycle Dismantling.
See struct x1f4_nodelink_type.
See struct x1f4_nodetype_type.
See Data Copying.
The struct x1f4_nodelink_type
record associated with the processed
object (that may be required while removing held references) is present in the
object reference tracking reserved part.
All methods are expected to return zero for success, non zero for failure (error class indications are observed when returned).
See Error Classes.
Next: struct x1f4_lxpart_type, Up: Referable Types Library Types [Index]