Skip to content
Snippets Groups Projects
Commit 54cb15be authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Fix overload of getEntity(), fix _checkContainerName() being public

parent def519e4
No related branches found
No related tags found
2 merge requests!140armem/dev -> master,!133Add Object Memory with Class and Instance Segments
...@@ -83,16 +83,16 @@ namespace armarx::armem::base ...@@ -83,16 +83,16 @@ namespace armarx::armem::base
} }
} }
using Base::_checkContainerName; using Base::getEntity;
const EntityT& getEntity(const MemoryID& id) const override const EntityT& getEntity(const MemoryID& id) const override
{ {
_checkContainerName(id.coreSegmentName, this->getKeyString()); this->_checkContainerName(id.coreSegmentName, this->getKeyString());
return getProviderSegment(id.providerSegmentName).getEntity(id); return getProviderSegment(id.providerSegmentName).getEntity(id);
} }
virtual MemoryID update(const EntityUpdate& update) override virtual MemoryID update(const EntityUpdate& update) override
{ {
_checkContainerName(update.entityID.coreSegmentName, this->name()); this->_checkContainerName(update.entityID.coreSegmentName, this->name());
auto it = this->_container.find(update.entityID.providerSegmentName); auto it = this->_container.find(update.entityID.providerSegmentName);
if (it != _container.end()) if (it != _container.end())
......
...@@ -85,10 +85,10 @@ namespace armarx::armem::base ...@@ -85,10 +85,10 @@ namespace armarx::armem::base
} }
} }
using Base::_checkContainerName; using Base::getEntity;
const EntityT& getEntity(const MemoryID& id) const override const EntityT& getEntity(const MemoryID& id) const override
{ {
_checkContainerName(id.memoryName, this->name()); this->_checkContainerName(id.memoryName, this->name());
return getCoreSegment(id.coreSegmentName).getEntity(id); return getCoreSegment(id.coreSegmentName).getEntity(id);
} }
...@@ -144,7 +144,7 @@ namespace armarx::armem::base ...@@ -144,7 +144,7 @@ namespace armarx::armem::base
virtual MemoryID update(const EntityUpdate& update) override virtual MemoryID update(const EntityUpdate& update) override
{ {
_checkContainerName(update.entityID.memoryName, this->name()); this->_checkContainerName(update.entityID.memoryName, this->name());
auto it = _container.find(update.entityID.coreSegmentName); auto it = _container.find(update.entityID.coreSegmentName);
if (it != _container.end()) if (it != _container.end())
......
...@@ -65,10 +65,10 @@ namespace armarx::armem::base ...@@ -65,10 +65,10 @@ namespace armarx::armem::base
return _container.count(name) > 0; return _container.count(name) > 0;
} }
using Base::_checkContainerName; using Base::getEntity;
const EntityT& getEntity(const MemoryID& id) const override const EntityT& getEntity(const MemoryID& id) const override
{ {
_checkContainerName(id.providerSegmentName, this->getKeyString()); this->_checkContainerName(id.providerSegmentName, this->getKeyString());
return getEntity(id.entityName); return getEntity(id.entityName);
} }
...@@ -97,7 +97,7 @@ namespace armarx::armem::base ...@@ -97,7 +97,7 @@ namespace armarx::armem::base
*/ */
virtual MemoryID update(const EntityUpdate& update) override virtual MemoryID update(const EntityUpdate& update) override
{ {
_checkContainerName(update.entityID.providerSegmentName, this->name()); this->_checkContainerName(update.entityID.providerSegmentName, this->name());
EntityT* entity; EntityT* entity;
auto it = this->_container.find(update.entityID.providerSegmentName); auto it = this->_container.find(update.entityID.providerSegmentName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment