Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

bellcode.cpp

Go to the documentation of this file.
00001 // $Id$
00002 
00003 //**********************************************************************
00004 //                                                                     *
00005 //    Description:   BellCode class.                                   *
00006 //                                                                     *
00007 //    Author:        Chris White (whitecf@bcs.org.uk)                  *
00008 //                                                                     *
00009 //    Copyright (C) 2003  Monitor Computing Services Ltd.              *
00010 //                                                                     *
00011 //    This program is free software; you can redistribute it and/or    *
00012 //    modify it under the terms of the GNU General Public License      *
00013 //    as published by the Free Software Foundation; either version 2   *
00014 //    of the License, or any later version.                            *
00015 //                                                                     *
00016 //    This program is distributed in the hope that it will be useful,  *
00017 //    but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00018 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00019 //    GNU General Public License for more details.                     *
00020 //                                                                     *
00021 //    You should have received a copy of the GNU General Public        *
00022 //    License (http://www.gnu.org/copyleft/gpl.html) along with this   *
00023 //    program; if not, write to:                                       *
00024 //       The Free Software Foundation Inc.,                            *
00025 //       59 Temple Place - Suite 330,                                  *
00026 //       Boston, MA  02111-1307,                                       *
00027 //       USA.                                                          *
00028 //                                                                     *
00029 //**********************************************************************
00030 //                                                                     *
00031 //    Notes:                                                           *
00032 //                                                                     *
00033 //**********************************************************************
00034 
00035 #include "mytrace.h"
00036 
00037 #include "bellcode.h"
00038 
00039 
00040 using namespace Monitor::BellMaster;
00041 
00042 
00043 
00044 BellCode::BellCode() :
00045     sequence(""), description("")
00046 {
00047     _USEMYTRACE_("BellCode::BellCode()")
00048 }
00049 
00050 
00051 
00052 BellCode::BellCode(const unsigned char*    newSequence,
00053                    const char*             newDescription) :
00054     sequence((const char*)newSequence), description(newDescription)
00055 {
00056     _USEMYTRACE_("BellCode::BellCode(const unsigned char*, const char*)")
00057 }
00058 
00059 
00060 
00061 BellCode::BellCode(const string&    newSequence,
00062                    const string&    newDescription) :
00063     sequence(newSequence), description(newDescription)
00064 {
00065     _USEMYTRACE_("BellCode::BellCode(const string&, const string&)")
00066 }
00067 
00068 
00069 
00070 BellCode::BellCode(const BellCode&    other) :
00071     sequence(other.sequence), description(other.description)
00072 {
00073     _USEMYTRACE_("BellCode::BellCode(const BellCode&)")
00074 }
00075 
00076 
00077 
00078 BellCode::~BellCode()
00079 {
00080     _USEMYTRACE_("BellCode::~BellCode()")
00081 }
00082 
00083 
00084 
00085 BellCode&
00086 BellCode::operator=(const BellCode&    other)
00087 {
00088     sequence    = other.sequence;
00089     description = other.description;
00090 
00091     return *this;
00092 }
00093 
00094 
00095 
00096 int
00097 BellCode::operator==(const BellCode&    other) const
00098 {
00099     return ((sequence == other.sequence) &&
00100             (description == other.description));
00101 }
00102 
00103 
00104 
00105 int
00106 BellCode::matchesSequence(const string&    targetSequence) const
00107 {
00108     return (targetSequence == sequence);
00109 }
00110 
00111 
00112 
00113 int
00114 BellCode::operator<(const BellCode&    other) const
00115 {
00116     return description < other.description;
00117 }
00118 

Generated on Wed Oct 29 20:54:52 2003 for Bellmaster BC Common by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002