Qt logo

qcollection.h


This is the verbatim text of the qcollection.h include file. It is is provided only for illustration; the copyright remains with Troll Tech.
/****************************************************************************
** $Id: qcollection.h,v 2.4.2.3 1998/08/25 09:20:54 hanord Exp $
**
** Definition of base class for all collection classes
**
** Created : 920629
**
** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
**
** This file is part of Troll Tech's internal development tree for Qt.
**
** This header text will be replaced by an appropriate text by the
** mkdist script which generates external distributions.
**
** If you are using the Qt Professional Edition or the Qt Free Edition,
** please notify Troll Tech at <info@troll.no> if you see this text.
**
** To Troll Tech developers: This header was generated by the script
** fixcopyright-int. It has the same number of text lines as the free
** and professional editions to avoid line number inconsistency.
**
*****************************************************************************/

#ifndef QCOLLECTION_H
#define QCOLLECTION_H

#ifndef QT_H
#include "qglobal.h"
#endif // QT_H


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

class QGVector;
class QGList;
class QGDict;


class Q_EXPORT 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
    QCollection(const QCollection &) { del_item = FALSE; }
    virtual ~QCollection() {}

    bool del_item;                              // default FALSE

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


#endif // QCOLLECTION_H


Copyright © 1998 Troll TechTrademarks
Qt version 1.41