00001 #ifndef __BELLCODE_H_INCLUDED__
00002 #define __BELLCODE_H_INCLUDED__
00003
00004 // $Id$
00005
00006 //**********************************************************************
00007 // *
00008 // Description: 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 #include <cstring.h>
00040
00041
00042 namespace Monitor {
00043 namespace BellMaster {
00044
00045
00046
00047 class BellCode
00048 {
00049 public:
00053 BellCode();
00054
00061 BellCode(const unsigned char* newSequence,
00062 const char* newDescription);
00063
00070 BellCode(const string& newSequence,
00071 const string& newDescription);
00072
00076 BellCode(const BellCode& other);
00077
00081 virtual ~BellCode();
00082
00083
00087 const string&
00088 getSequence() const { return sequence; }
00089
00093 const string&
00094 getDescription() const { return description; }
00095
00096 BellCode&
00097 operator=(const BellCode& other);
00098
00103 int
00104 operator==(const BellCode& other) const;
00105
00110 int
00111 matchesSequence(const string& targetSequence) const;
00112
00117 int
00118 operator<(const BellCode& other) const;
00119
00120 private:
00121 string sequence;
00122 string description;
00123 }; // class BellCode
00124
00125 }; // namespace BellMaster
00126 }; // namespace Monitor
00127
00128
00129 #endif // __BELLCODE_H_INCLUDED__
1.2.14 written by Dimitri van Heesch,
© 1997-2002