00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Benjamin Hadorn (bhadorn@swissinfo.org) * 00003 *************************************************************************** 00004 * Projekt : Zeus 00005 * Module : ISet 00006 * Package : System 00007 * Author : Benjamin Hadorn 00008 * Datum : 5.10.06 00009 * Ablage : $File$ 00010 * System : Cell Computing Model 00011 *************************************************************************** 00012 * Licence: * 00013 * This library is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU Lesser General Public License as * 00015 * published by the Free Software Foundation; either version * 00016 * 2.1 of the License, or (at your option) any later version. * 00017 * * 00018 * This library is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00021 * GNU Lesser General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU Lesser General Public * 00024 * License along with this library; if not, write to the Free Software * 00025 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA * 00026 ***************************************************************************/ 00027 00028 /*************************************************************************** 00029 Changes : 00030 $Log: /WinSteuerung2/dev/Zeus/src/zeusbase/System/Interfaces/ISet.hpp $ 00031 ** 00032 ** 9 3.09.07 7:04 bha 00033 ** New Framework using auto pointer and improved lists 00034 ** 00035 ** 8 5.03.07 7:18 bha 00036 ** Stack und Heap Schnittstellen definiert. 00037 ***************************************************************************/ 00038 00039 #ifndef ISetHPP 00040 #define ISetHPP 00041 00042 00043 #include <zeusbase/System/Interfaces/IList.hpp> 00044 00045 BEGIN_NAMESPACE_Zeus 00046 00047 /******************************************************************************/ 00050 /******************************************************************************/ 00051 template <class T> class ISet : public IValueType 00052 { 00053 HIDE_ASSIGNMENT_OPERATOR(ISet<T>) 00054 00055 public: 00056 /**************************************************************************/ 00062 /**************************************************************************/ 00063 virtual bool MQUALIFIER addItem(const T& rItem) = 0; 00064 00065 /**************************************************************************/ 00068 /**************************************************************************/ 00069 virtual void MQUALIFIER clear() = 0; 00070 00071 /**************************************************************************/ 00074 /**************************************************************************/ 00075 virtual Int MQUALIFIER getCount() const = 0; 00076 00077 /**************************************************************************/ 00083 /**************************************************************************/ 00084 virtual bool MQUALIFIER hasItem(const T& rItem) const=0; 00085 00086 /************************************************************************/ 00091 /************************************************************************/ 00092 virtual IListIterator<T>* MQUALIFIER getIterator() = 0; 00093 00094 /************************************************************************/ 00099 /************************************************************************/ 00100 virtual const IListIterator<T>* MQUALIFIER getConstIterator() const = 0; 00101 00102 /************************************************************************/ 00107 /************************************************************************/ 00108 virtual bool MQUALIFIER isEmpty() const = 0; 00109 00110 /************************************************************************/ 00114 /************************************************************************/ 00115 virtual void MQUALIFIER releaseIterator(const IListIterator<T>* pIterator) const =0; 00116 00117 /************************************************************************/ 00121 /************************************************************************/ 00122 virtual bool MQUALIFIER removeItem(const T& rItem) = 0; 00123 00124 /************************************************************************/ 00128 /************************************************************************/ 00129 virtual void MQUALIFIER copyToList(IList<T>& rList) const = 0; 00130 00131 /************************************************************************/ 00135 /************************************************************************/ 00136 virtual void MQUALIFIER copyToSet(ISet<T>& rSet) const = 0; 00137 00138 /************************************************************************/ 00144 /************************************************************************/ 00145 virtual bool MQUALIFIER equals(const ISet<T>& rSet) const = 0; 00146 00147 /************************************************************************/ 00153 /************************************************************************/ 00154 virtual T& MQUALIFIER getItem() = 0; 00155 00156 /************************************************************************/ 00159 /************************************************************************/ 00160 virtual const T& MQUALIFIER getItemConst() const = 0; 00161 }; 00162 00163 00164 END_NAMESPACE_Zeus 00165 00166 #endif