00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
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