schema_editor/comdel/domain/addressspace.cpp

28 lines
577 B
C++
Raw Normal View History

2022-03-31 21:20:41 +00:00
#include "addressspace.h"
namespace domain {
AddressSpace::AddressSpace(std::string name, long long start, long long end):
name(name), start(start), end(end)
{}
std::string AddressSpace::getName() {
return name;
}
long long AddressSpace::getStart() {
return start;
}
long long AddressSpace::getEnd() {
return end;
}
2022-04-10 12:23:18 +00:00
bool AddressSpace::contains(long long int address) {
return address >= start && address < end;
}
bool AddressSpace::contains(long long int pstart, long long int pend) {
return pstart >= start && pend < end;
}
2022-03-31 21:20:41 +00:00
} // namespace domain