add Space::getRegion(id)

This commit is contained in:
Andrew Meadows 2018-04-06 07:20:53 -07:00
parent 89b8ce2b01
commit b96a4ed4be
2 changed files with 5 additions and 0 deletions

View file

@ -127,6 +127,10 @@ const Owner Space::getOwner(int32_t proxyID) const {
return Owner();
}
uint8_t Space::getRegion(int32_t proxyID) const {
return _IDAllocator.checkIndex(proxyID) ? _proxies[proxyID].region : Region::INVALID;
}
void Space::clear() {
std::unique_lock<std::mutex> lock(_proxiesMutex);
_IDAllocator.clear();

View file

@ -49,6 +49,7 @@ public:
uint32_t copyProxyValues(Proxy* proxies, uint32_t numDestProxies) const;
const Owner getOwner(int32_t proxyID) const;
uint8_t getRegion(int32_t proxyID) const;
void clear();
private: