00001 #ifndef __BCLIST_H_INCLUDED__ 00002 #define __BCLIST_H_INCLUDED__ 00003 00004 // $Id$ 00005 00006 //********************************************************************** 00007 // * 00008 // Description: List class to hold instances of BellCode class. * 00009 // * 00010 // Author: Chris White (whitecf@bcs.org.uk) * 00011 // * 00012 // Copyright (C) 2003 Monitor Computing Services Ltd. * 00013 // * 00014 // This program is free software; you can redistribute it and/or * 00015 // modify it under the terms of the GNU General Public License * 00016 // as published by the Free Software Foundation; either version 2 * 00017 // of the License, or any later version. * 00018 // * 00019 // This program is distributed in the hope that it will be useful, * 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00022 // GNU General Public License for more details. * 00023 // * 00024 // You should have received a copy of the GNU General Public * 00025 // License (http://www.gnu.org/copyleft/gpl.html) along with this * 00026 // program; if not, write to: * 00027 // The Free Software Foundation Inc., * 00028 // 59 Temple Place - Suite 330, * 00029 // Boston, MA 02111-1307, * 00030 // USA. * 00031 // * 00032 //********************************************************************** 00033 // * 00034 // Notes: * 00035 // * 00036 //********************************************************************** 00037 00038 00039 // Forward declerations 00040 class string; 00041 template <class T> class TSListImp; 00042 00043 00044 namespace Monitor { 00045 namespace BellMaster { 00046 00047 00048 // Forward declerations within namespace 00049 class BellCode; 00050 00051 00052 00053 class BellCodeList 00054 { 00055 public: 00059 BellCodeList(); 00060 00064 BellCodeList(const BellCodeList& other); 00065 00069 virtual ~BellCodeList(); 00070 00071 00075 const BellCodeList& 00076 operator=(const BellCodeList& other); 00077 00078 00079 void 00080 addBellCode(const BellCode &newBellCode); 00081 00082 void 00083 removeBellCode(const BellCode &oldBellCode); 00084 00088 void 00089 clear(); 00090 00094 const unsigned& 00095 size() const; 00096 00100 BellCode& 00101 operator[](int index) const; 00102 00110 const BellCodeList 00111 matchSequence(const string& sequence) const; 00112 00113 private: 00114 00118 TSListImp< BellCode > *myList; 00119 00123 unsigned listSize; 00124 00128 TSListImp< BellCode >& 00129 getList() const; 00130 }; // class BellCodeList 00131 00132 }; // namespace BellMaster 00133 }; // namespace Monitor 00134 00135 00136 #endif // __BCLIST_H_INCLUDED__