void ObjVarScanData(
optr obj, /* object to be scanned */
word numHandlers, /* number of handlers in table */
VarDataCHandler * handlerTable, /* pointer to handler table */
void * handlerData); /* pointer to handler data */
This routine scans an object's vardata and calls all the vardata handlers specified in the passed handler table. Pass it the following parameters:
obj
numHandlers
handlerTable
VarDataCHandler
structures. Each of these structures contains a vardata data type and a pointer to the routine that is to handle it. All the handler routines must be in the same segment as the handler table.
handlerData
Vardata Handler Format:
A vardata handler routine must have the following format:
void _pascal (MemHandle mh, ChunkHandle chnk, VarDataEntry *extraData, word dataType, void *handlerData)
The handler should not free the object chunk or destroy the object; it can do anything else it pleases. The handler returns nothing and takes the following parameters:
mh:chnk
extraData
VarDataTypePtr()
,
VarDataFlagsPtr()
, and
VarDataSizePtr()
.
dataType
VardataKey
.
handlerData
ObjVarScanData()
. This buffer may be used for passing additional data to the handlers.
Structures: The
VarDataCHandler
structure contains two elements:
typedef struct {
word VDCH_dataType;
void _pascal (*VDCH_handler) (
MemHandle mh,
ChunkHandle chnk,
VarDataEntry * extraData,
word dataType
void * handlerData);
} VarDataCHandler;
The first element is the data type, a record containing the data type and the vardata flags. The second element is a far pointer to the handler routine for the type.
Include: object.h
void ObjVarScanDataHandles(
MemHandle mh, /* handle portion of optr */
ChunkHandle ch, /* chunk portion of optr */
word numHandlers, /* number of handlers in table */
VarDataCHandler * handlerTable, /* pointer to handler table */
void * handlerData); /* pointer to handler data */
This routine is the same as
ObjVarScanData()
except that the object is specified via its handles rather than its optr.
Include: object.h
word offsetof(struc, field);
This macro returns the offset of the specified field within the specified structure.
ChunkHandle OptrToChunk(op);
optr op;
This macro extracts the chunk handle portion of the given optr.
See Also: ConstructOptr(),
OptrToHandle().
MemHandle OptrToHandle(op);
optr op;
This macro extracts the MemHandle portion of the given optr.
See Also: ConstructOptr(),
OptrToChunk().
GEOS SDK TechDocs
|
|
ObjVarDeleteDataAt() ...
|
ParallelClose() ...