schema_editor/comdel/domain/addressspace.cpp

29 lines
610 B
C++

#include <algorithm>
#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() const {
return start;
}
long long AddressSpace::getEnd() const {
return end;
}
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;
}
} // namespace domain