summaryrefslogtreecommitdiffstats
path: root/K2LABI/Common/list.h
blob: 4e34323daca2b787661287a88276b02463a2b037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef ILIST_H_
#define ILIST_H_

template<class T>

class IList
{
public:
    class IIterator
    {
    public:
        virtual ~IIterator(){}
        virtual bool hasNext() = 0;
        virtual T* next() = 0;
        virtual void release() = 0;
    };
    virtual ~IList(){}

    virtual IIterator* getIterator() = 0;
    virtual int add(T* pItem) = 0;
    virtual T* getAt(int nIndex) = 0;
    virtual void clear(bool bDelete = true, bool bArr = false) = 0;
    virtual bool isEmpty() = 0;
};

#endif