00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Base Library 00005 * Module : IQueue 00006 * Package : Zeus.ZeusBase.System.Interfaces 00007 * Author : Benjamin Hadorn 00008 * Date : 27.12.2011 00009 * System : Zeus-Framework 00010 ***************************************************************************** 00011 * Licence: * 00012 * This library is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU Lesser General Public License as * 00014 * published by the Free Software Foundation; either version * 00015 * 2.1 of the License, or (at your option) any later version. * 00016 * * 00017 * This library is distributed in the hope that it will be useful, * 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00020 * GNU Lesser General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU Lesser General Public * 00023 * License along with this library; if not, write to the Free Software * 00024 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA * 00025 *****************************************************************************/ 00026 00027 /***************************************************************************** 00028 * Changes: 00029 * 27.12.2011 bha: created zeus 2.0 00030 *****************************************************************************/ 00031 00032 #ifndef IQueueHPP 00033 #define IQueueHPP 00034 00035 #include <zeusbase/System/Interfaces/IValueType.hpp> 00036 #include <zeusbase/System/Interfaces/IList.hpp> 00037 00038 #ifdef _MSC_VER 00039 #pragma warning(push, 1) 00040 #endif 00041 00042 #include <stddef.h> 00043 00044 #ifdef _MSC_VER 00045 #pragma warning(pop) 00046 #endif 00047 00048 00049 BEGIN_NAMESPACE_Zeus 00050 00051 /*****************************************************************************/ 00054 /*****************************************************************************/ 00055 template <class T> class IQueue : public IValueType 00056 { 00057 HIDE_ASSIGNMENT_OPERATOR(IQueue<T>) 00058 00059 public: 00060 00061 /*************************************************************************/ 00065 /*************************************************************************/ 00066 virtual void MQUALIFIER appendItem(const T& tData) = 0; 00067 00068 /*************************************************************************/ 00072 /*************************************************************************/ 00073 virtual void MQUALIFIER copyToQueue(IQueue<T>& rQueue) const = 0; 00074 00075 /*************************************************************************/ 00079 /*************************************************************************/ 00080 virtual void MQUALIFIER copyToList(IList<T>& rList) const = 0; 00081 00082 /*************************************************************************/ 00086 /*************************************************************************/ 00087 virtual T MQUALIFIER removeItem() = 0; 00088 00089 /*************************************************************************/ 00093 /*************************************************************************/ 00094 virtual Int MQUALIFIER getCount() const = 0; 00095 00096 /*************************************************************************/ 00099 /*************************************************************************/ 00100 virtual void MQUALIFIER flush() = 0; 00101 00102 /*************************************************************************/ 00107 /*************************************************************************/ 00108 virtual bool MQUALIFIER isEmpty() const = 0; 00109 00110 /*************************************************************************/ 00114 /*************************************************************************/ 00115 virtual T& MQUALIFIER peekItem() = 0; 00116 00117 /*************************************************************************/ 00121 /*************************************************************************/ 00122 virtual const T& MQUALIFIER peekItemConst() const = 0; 00123 }; 00124 00125 00126 END_NAMESPACE_Zeus 00127 00128 #endif 00129