113 lines
2.0 KiB
C++
113 lines
2.0 KiB
C++
#ifndef _AS68HC11_EQUATE_HPP_
|
|
#define _AS68HC11_EQUATE_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common/string.hpp>
|
|
#endif
|
|
|
|
class Equate
|
|
{
|
|
public:
|
|
enum Disposition{Absolute,Reference};
|
|
Equate(void);
|
|
Equate(const Equate &someEquate);
|
|
Equate(const String &strLabel,DWORD value=0,Disposition disposition=Reference);
|
|
virtual ~Equate();
|
|
Equate &operator=(const Equate &someEquate);
|
|
BOOL operator==(const Equate &someEquate)const;
|
|
BOOL operator<(const Equate &someEquate)const;
|
|
const String &strLabel(void)const;
|
|
void strLabel(const String &strLabel);
|
|
DWORD value(void)const;
|
|
void value(DWORD value);
|
|
Disposition disposition(void)const;
|
|
void disposition(Disposition disposition);
|
|
private:
|
|
String mStrLabel;
|
|
DWORD mValue;
|
|
Disposition mDisposition;
|
|
};
|
|
|
|
inline
|
|
Equate::Equate(void)
|
|
: mValue(0), mDisposition(Reference)
|
|
{
|
|
}
|
|
|
|
inline
|
|
Equate::Equate(const Equate &someEquate)
|
|
{
|
|
*this=someEquate;
|
|
}
|
|
|
|
inline
|
|
Equate::Equate(const String &strLabel,DWORD value,Disposition disposition)
|
|
: mStrLabel(strLabel), mValue(value), mDisposition(disposition)
|
|
{
|
|
}
|
|
|
|
inline
|
|
Equate::~Equate()
|
|
{
|
|
}
|
|
|
|
inline
|
|
Equate &Equate::operator=(const Equate &someEquate)
|
|
{
|
|
strLabel(someEquate.strLabel());
|
|
value(someEquate.value());
|
|
disposition(someEquate.disposition());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
BOOL Equate::operator==(const Equate &someEquate)const
|
|
{
|
|
return (strLabel()==someEquate.strLabel());
|
|
}
|
|
|
|
|
|
inline
|
|
BOOL Equate::operator<(const Equate &someEquate)const
|
|
{
|
|
return (strLabel()<someEquate.strLabel());
|
|
}
|
|
|
|
inline
|
|
const String &Equate::strLabel(void)const
|
|
{
|
|
return mStrLabel;
|
|
}
|
|
|
|
inline
|
|
void Equate::strLabel(const String &strLabel)
|
|
{
|
|
mStrLabel=strLabel;
|
|
}
|
|
|
|
inline
|
|
DWORD Equate::value(void)const
|
|
{
|
|
return mValue;
|
|
}
|
|
|
|
inline
|
|
void Equate::value(DWORD value)
|
|
{
|
|
mValue=value;
|
|
}
|
|
|
|
inline
|
|
Equate::Disposition Equate::disposition(void)const
|
|
{
|
|
return mDisposition;
|
|
}
|
|
|
|
inline
|
|
void Equate::disposition(Disposition disposition)
|
|
{
|
|
mDisposition=disposition;
|
|
}
|
|
#endif |