Skip to content
Snippets Groups Projects
Commit 49e6a3d9 authored by Jupp Tscheak's avatar Jupp Tscheak
Browse files

Added possibility to register callback function when entity has been created/deleted.


If scenario domain entities are having references to the same IEntity, it might be that another instance is deleting this IEntity invalidating all references pointing to it. Those situations could be handled using the callback mechanism.

Signed-off-by: default avatarJupp Tscheak <jupp.tscheak@daimler.com>
parent f1a2e347
No related branches found
No related tags found
1 merge request!9Interface function IEntityRepository::Get is returning an optional reference to query an IEntity.
......@@ -45,6 +45,9 @@ class IEntityRepository
virtual void Delete(UniqueId id) = 0;
virtual const std::vector<std::unique_ptr<mantle_api::IEntity>>& GetEntities() const = 0;
virtual void RegisterEntityCreatedCallback(const std::function<void(IEntity&)>& callback) = 0;
virtual void RegisterEntityDeletedCallback(const std::function<void(const std::string&)>& callback) = 0;
};
} // namespace mantle_api
......
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