Index

DKFolder

Purpose:

DKFolder is a subclass of sequential collection. Its purpose is to hold document DDOs and folder DDO members of a folder. This collection can also hold other data objects, such as documents and other folders. The DDO representing a folder has an attribute with the reserved name DKFolder, its value being a pointer to DKFolder collection.

The public interface of DKFolder is the same as sequential collection, but internally, it keeps track of its member additions and deletions, to be reflected when the object is saved to the Content Manager datastore. As DKFolder always has DKDDO 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, DKFolder has two additional methods:

Members:

Member functions

addMember
Adds the member item into the folder and reflects the results immediately in the datastore. At the end of the operation, the member item will be in the DKFolder collection in memory, as well as in the folder in the datastore.
    void  addMember(DKDDO* folder, DKDDO* 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 DKFolder collection in memory, and it will also be removed from the folder in the datastore.
    void  removeMember(DKDDO* folder, DKDDO* member)                               

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