#ifndef _AS68HC11_LABEL_HPP_ #define _AS68HC11_LABEL_HPP_ #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_STRING_HPP_ #include #endif class Label { public: enum Disposition{Absolute,Reference,Ignore}; Label(void); Label(const Label &someLabel); Label(const String &strLabel,DWORD offset=0L,Disposition disposition=Reference); virtual ~Label(); Label &operator=(const Label &someLabel); BOOL operator==(const Label &someLabel)const; BOOL operator<(const Label &someLabel)const; BOOL operator>(const Label &someLabel)const; const String &strLabel(void)const; void strLabel(const String &strLabel); DWORD offset(void)const; void offset(DWORD offset); Disposition disposition(void)const; void disposition(Disposition disposition); private: String mStrLabel; DWORD mOffset; Disposition mDisposition; }; inline Label::Label(void) : mOffset(0), mDisposition(Ignore) { } inline Label::Label(const String &strLabel,DWORD offset,Disposition disposition) : mStrLabel(strLabel), mOffset(offset), mDisposition(disposition) { } inline Label::Label(const Label &someLabel) { *this=someLabel; } inline Label::~Label() { } inline Label &Label::operator=(const Label &someLabel) { strLabel(someLabel.strLabel()); offset(someLabel.offset()); disposition(someLabel.disposition()); return *this; } inline BOOL Label::operator==(const Label &someLabel)const { return (strLabel()==someLabel.strLabel()); } inline BOOL Label::operator<(const Label &someLabel)const { return (strLabel()(const Label &someLabel)const { return (strLabel()>someLabel.strLabel()); } inline const String &Label::strLabel(void)const { return mStrLabel; } inline void Label::strLabel(const String &strLabel) { mStrLabel=strLabel; } inline DWORD Label::offset(void)const { return mOffset; } inline void Label::offset(DWORD offset) { mOffset=offset; } inline Label::Disposition Label::disposition(void)const { return mDisposition; } inline void Label::disposition(Disposition disposition) { mDisposition=disposition; } #endif