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: Jupp Tscheak's avatarJupp Tscheak <>
parent f1a2e347
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment