Index

DKParts

Purpose:

DKParts is a subclass of sequential collection. Its purpose is to hold part XDO members of a document. The DDO representing a document has an attribute with the reserved name DKParts, its value being a pointer to DKParts collection.

The public interface of DKParts is the same as sequential collection, but internally it keeps track of member additions and deletions; this is reflected when the object is saved to the Content Manager datastore. As DKParts always has XDO collection members, its destructor can destroy the elements implicitly, that is, the user does not need to delete each member. However, the end user must still manage memory for the following operations: removeElementAt(), and replaceElementAt().

In addition to the methods inherited from the sequential collection class, DKParts has two additional methods:

Members:

Member functions

addMember
Adds the member part into the parts collection and reflects the results immediately in the datastore. At the end of the operation, the member item will be in the DKParts collection in memory, as well as in item in the Content Manager datastore. This operation has the same effect as the sequencing of member-->add() and parts-->addElement(member), where member is the part XDO and parts is the collection of parts in this item.
    void  addMember(DKDDO* item, dkXDO* member)                                

removeMember
Removes the member item from the folder and reflects the results immediately in the datastore. At the end of the operation, the member item will not be in the DKParts collection in memory, as well as be removed from the item in the datastore. This operation has the same effect as the sequencing of parts-->removeElement(member) and member-->del(), where member is the part XDO and parts is the collection of parts in this item.
    void  removeMember(DKDDO* item, dkXDO* member)                                

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.