void * ObjVarAddData(
optr obj, /* object to add vardata to */
VardataKey dataType, /* vardata type */
word dataSize); /* vardata data size, if any */
This routine adds or alters a variable data entry for the specified object. If the data type does not currently exist in the instance chunk, it will be allocated and added to the chunk. If it does exist, the extra data of the entry will be re-initialized to all zeroes.
This routine returns a pointer to the extra data of the new or modified entry; if the entry has no extra data, an opaque pointer to the entry is passed, and you can use this pointer with
ObjVarDeleteDataAt()
. In either case, the object will be marked dirty.
If it is possible that you are adding the object's first/only field of
variable data, set the object's OCF_VARDATA_RELOC flag by means
of the
ObjSetFlags()
routine or
MSG_META_SET_FLAGS.
The parameters of this routine are
obj
dataType
VardataKey
word declaring the data type and its flags. The VDF_SAVE_TO_STATE flag must be properly set; the VDF_EXTRA_DATA flag is ignored, however, as the routine will set it properly.
dataSize
Include: object.h
Warnings: This routine should be called only by the object whose vardata is affected. To operate on other objects' vardata remotely, use messages provided by
MetaClass
(see below under "See Also").
See Also: MSG_META_ADD_VAR_DATA,
ObjVarDeleteDataAt().
void * ObjVarAddDataHandles(
MemHandle mh, /* handle portion of optr */
ChunkHandle ch, /* chunk portion of optr */
VardataKey dataType, /* vardata type */
word dataSize); /* vardata data size, if any */
This routine is the same as
ObjVarAddData()
except that the object is specified via its handles rather than its optr.
Include: object.h
void ObjVarCopyDataRange(
optr source, /* the optr of the source object */
optr dest, /* the optr of the destination (calling) object */
word rangeStart, /* the smallest data type value to be copied */
word rangeEnd); /* the largest data type value to be copied */
This routine copies all the vardata entries within the specified range from the
source
object to the
dest
object. The range to be copied is specified by data types and is between
rangeStart
and
rangeEnd
, inclusive. If any data entries are copied, the destination object will be marked dirty.
Warnings: This routine should be called only by the destination object; it is against OOP doctrine for one object to alter another's instance data.
Include: object.h
Boolean ObjVarDeleteData(
optr obj, /* object to delete from */
VardataKey dataType); /* data type to delete */
This routine deletes a vardata entry from the specified object's instance chunk, if the entry exists. The entry is specified by its data type; to delete an entry specified by a pointer to it, use
ObjVarDeleteDataAt()
, below. It returns an error flag:
true
if the entry was not found,
false
if the entry was successfully deleted. The object will also be marked dirty by the routine.
The parameters for this routine are
obj
dataType
VardataKey
word declaring the data type and its flags. Both the VDF_SAVE_TO_STATE flag and the VDF_EXTRA_DATA flag are ignored.
Warnings: This routine should be called only by the object whose vardata is affected. To operate on other objects' vardata remotely, use messages provided by
MetaClass
(see below under "See Also").
Include: object.h
See Also: MSG_META_DELETE_VAR_DATA,
ObjVarDeleteDataAt().
Boolean ObjVarDeleteDataHandles(
MemHandle mh, /* handle portion of optr */
ChunkHandle ch, /* chunk portion of optr */
VardataKey dataType); /* data type to delete */
This routine is the same as
ObjVarDeleteData()
except that the object is specified via its handles rather than its optr.
Include: object.h
GEOS SDK TechDocs
|
|
ObjResizeMaster() ...
|
ObjVarDeleteDataAt() ...