Clear
TheClearmethod clears the content of this link-source object.
void Clear (in ODUpdateID id, in ODLinkKey key);
id- The update ID associated with the new empty content.
key- A valid link key obtained by a prior call to the
Lockmethod.DISCUSSION
If your part is the source part for this link-source object, you call this method to remove the link-source object's previous content before updating the source data. This method removes all data in the contents property (kODPropContents) from the link-source object's content storage unit.The
idparameter identifies the new version of this link-source object's content; its value depends on the circumstance in which this method is called:
The
- If your part originated the changes to its source content, the
idparameter should be a new update ID that you obtained by calling theUniqueUpdateIDmethod of the session object.- If the changes occurred because the source content of this link contains the destination content of another link that was updated, the
idparameter should be the update ID that your part received when it was notified to update the destination content within the source content for this link.- If your part originally created this link-source object with promise data and its
CreateLinkmethod is being called again to create a new link destination, theidparameter should be the current update ID for this link-source object. You can call theGetUpdateIDmethod to get the current update ID.
keyparameter ensures thread safety. Before calling this method, you must call this link-source object'sLockmethod to obtain this key.EXCEPTIONS
kODErrInvalidLinkKey- The
keyparameter is not a valid key for this link-source object.kODErrInvalidPermissions- Draft permissions do not allow modifications.
kODErrUnknownUpdateID- The specified update ID is the reserved value
kODUnknownUpdate.SEE ALSO
TheODLinkKeytype (page 924).
TheODUpdateIDtype (page 917).
TheODLinkSource::GetContentStorageUnitmethod (page 380).
TheODLinkSource::GetUpdateIDmethod (page 381).
TheODLinkSource::Lockmethod (page 382).
TheODSession::UniqueUpdateIDmethod (page 623).
"Updating a Link at the Source" on page 386 in OpenDoc Programmer's Guide.