00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _SK_UTIL_LIST_
00009 #define _SK_UTIL_LIST_
00010
00011 #include <sk/util/Collection.h>
00012
00013 namespace sk {
00014 namespace util {
00015 template<class T>
00016 class List
00017 : public virtual sk::util::Collection<T>
00018 {
00019 public:
00020 virtual void add(int index, T& object) = 0;
00021 virtual void add(int index, T* object) = 0;
00022 using Collection<T>::add;
00023
00024 virtual bool addAll(int index, const Collection<T>& other) = 0;
00025 using Collection<T>::addAll;
00026
00027 virtual bool moveAll(int index, Collection<T>& other) = 0;
00028 using Collection<T>::moveAll;
00029
00030 virtual T& get(int index) const = 0;
00031 using Collection<T>::get;
00032
00033 virtual int indexOf(const T& object) const = 0;
00034 virtual int indexOf(const Selector<T>& selector) const = 0;
00035
00036 virtual int lastIndexOf(const T& object) const = 0;
00037 virtual int lastIndexOf(const Selector<T>& selector) const = 0;
00038
00039 virtual T& remove(int index) = 0;
00040 using Collection<T>::remove;
00041
00042 virtual T* cutoff(int index) = 0;
00043 using Collection<T>::cutoff;
00044
00045 virtual T* release(int index) = 0;
00046 using Collection<T>::release;
00047
00048 virtual void set(int index, T& object) = 0;
00049 virtual void set(int index, T* object) = 0;
00050 };
00051 }
00052 }
00053
00054 #endif