Purpose:
dkCollection is an abstract base class that represents a collection of DKAny objects, therefore it doesn't require a template. A collection may have a name; the default name is an empty string, but it could be set to anything. For example, this could be the name of the item type or table where the members belong.
dkCollection cannot evaluate a query, and only supports dkIterator, the base class for all iterators.
Class summary:
class dkCollection { public: dkCollection(); virtual dkCollection(); virtual unsigned long cardinality() = 0; virtual DKAny* retrieveElementAt(dkIterator& where) = 0; virtual dkIterator *createIterator() = 0; virtual void addElement(const DKAny& element) = 0; virtual void insertElementAt(const DKAny& element, dkIterator& where) = 0; virtual void replaceElementAt(const DKAny& element, dkIterator& where) = 0; virtual void removeElementAt(dkIterator& where) = 0; virtual void removeAllElements() = 0; virtual void apply(void (*function)(DKAny& )); virtual DKString getName() const; virtual void setName(const char* collName); virtual dkDataObjectBase* getowner() = 0; virtual DKString getAssociatedAttrName() = 0; };
Members:
virtual unsigned long cardinality() = 0;
virtual DKAny* retrieveElementAt(dkIterator& where) = 0;
virtual dkIterator *createIterator() = 0;
virtual void addElement(const DKAny& element) = 0;
virtual void insertElementAt(const DKAny& element, dkIterator& where) = 0;
virtual void replaceElementAt(const DKAny& element, dkIterator& where) = 0;
virtual void removeElementAt(dkIterator& where) = 0;
virtual void removeAllElements() = 0;
virtual void apply(void (*function)(DKAny& ));
virtual DKString getName() const;
virtual void setName(const char* collName);
virtual dkDataObjectBase* getOwner() = 0;
virtual DKString getAssociatedAttrName() = 0;
(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.