00001 #ifndef __PCBELL_H_INCLUDED__ 00002 #define __PCBELL_H_INCLUDED__ 00003 00004 // $Id 00005 00006 //********************************************************************** 00007 // * 00008 // Description: 'Bell Master' implementation of block instrument * 00009 // bell using PC (hardware to produce actual ring * 00010 // abstracted by 'Note' class). * 00011 // * 00012 // Author: Chris White (whitecf@bcs.org.uk) * 00013 // * 00014 // Copyright (C) 2003 Monitor Computing Services Ltd. * 00015 // * 00016 // This program is free software; you can redistribute it and/or * 00017 // modify it under the terms of the GNU General Public License * 00018 // as published by the Free Software Foundation; either version 2 * 00019 // of the License, or any later version. * 00020 // * 00021 // This program is distributed in the hope that it will be useful, * 00022 // but WITHOUT ANY WARRANTY; without even the implied warranty of * 00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00024 // GNU General Public License for more details. * 00025 // * 00026 // You should have received a copy of the GNU General Public * 00027 // License (http://www.gnu.org/copyleft/gpl.html) along with this * 00028 // program; if not, write to: * 00029 // The Free Software Foundation Inc., * 00030 // 59 Temple Place - Suite 330, * 00031 // Boston, MA 02111-1307, * 00032 // USA. * 00033 // * 00034 //********************************************************************** 00035 // * 00036 // Notes: * 00037 // * 00038 //********************************************************************** 00039 00040 00041 #include "bell.h" 00042 00043 00044 // Forward Declerations 00045 namespace Monitor { 00046 namespace Utility { 00047 class Note; 00048 }; 00049 namespace BellMaster { 00050 00051 00052 00057 class PcBell : public Bell 00058 { 00059 public: 00063 PcBell(Monitor::Utility::Note& newNote); 00064 00068 virtual ~PcBell(); 00069 00070 00076 virtual void 00077 ring() const 00078 throw (Bell::Busy); 00079 00088 virtual void 00089 ring(unsigned* newSequence) 00090 throw (Bell::Busy); 00091 00095 Monitor::Utility::Note& 00096 getNote() const; 00097 00098 private: 00103 void 00104 nextRing(); 00105 00109 unsigned* currentSequence; 00110 00114 Monitor::Utility::Note& note; 00115 }; // class PcBell 00116 00117 }; // namespace BellMaster 00118 }; // namespace Monitor 00119 00120 00121 #endif // __PCBELL_H_INCLUDED__