This is the verbatim text of the qcollect.h include file. It is is provided only for illustration; the copyright remains with Troll Tech


/****************************************************************************
** $Id: qcollect.h,v 2.1 1997/08/06 15:05:50 hanord Exp $
**
** Definition of base class for all collection classes
**
** Created : 920629
**
** Copyright (C) 1992-1997 by Troll Tech AS.  All rights reserved.
**
*****************************************************************************/

#ifndef QCOLLECT_H
#define QCOLLECT_H

#include "qglobal.h"


typedef void *GCI;                              // generic collection item
typedef int (*GCF)(GCI,void*);                  // generic collection function

class QGVector;
class QGList;
class QGDict;


class QCollection                               // inherited by all collections
{
public:
    bool autoDelete()   const          { return del_item; }
    void setAutoDelete( bool enable )  { del_item = enable; }

    virtual uint  count() const = 0;
    virtual void  clear() = 0;                  // delete all objects

protected:
    QCollection() { del_item = FALSE; }         // no deletion of objects
    virtual ~QCollection() {}

    bool del_item;                              // default FALSE

    virtual GCI      newItem( GCI );            // create object
    virtual void     deleteItem( GCI );         // delete object
};


#endif // QCOLLECT_H


Generated at 19:08, 1997/10/09 for Qt version 1.31 by the webmaster at Troll Tech