Skip to content
Snippets Groups Projects
  1. Jan 31, 2022
  2. Jan 28, 2022
  3. Dec 02, 2021
  4. Nov 30, 2021
  5. Nov 24, 2021
  6. Nov 23, 2021
  7. Nov 22, 2021
  8. Nov 16, 2021
  9. Oct 18, 2021
  10. Oct 07, 2021
  11. Oct 06, 2021
  12. Sep 29, 2021
  13. Sep 27, 2021
  14. Sep 14, 2021
  15. Sep 10, 2021
  16. Sep 01, 2021
  17. Aug 25, 2021
  18. Aug 18, 2021
  19. Aug 17, 2021
  20. Aug 13, 2021
  21. Aug 12, 2021
  22. Aug 10, 2021
  23. Aug 09, 2021
  24. Aug 06, 2021
  25. Aug 04, 2021
  26. Aug 03, 2021
  27. Jul 30, 2021
  28. Jul 28, 2021
  29. Jul 16, 2021
  30. Jul 15, 2021
    • Jupp Tscheak's avatar
      Added possibility to register callback function when entity has been created/deleted. · 49e6a3d9
      Jupp Tscheak authored
      
      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>
      49e6a3d9
    • Jupp Tscheak's avatar
      Interface function IEntityRepository::Get is returning an optional reference to query an IEntity. · f1a2e347
      Jupp Tscheak authored
      
      In order to check whether an IEntity with a certain name/id exists, function IEntityRepository::Contains could be used to query this information. If IEntityRepository::Get is called on a non-existing name/id, the function would throw, so for defensive programming reasons a IEntityRepository::Contains should always be done before actually calling IEntityRepository::Get. The good thing about plain old C-pointers is that assignment and existence check can be done in one call. Since C++17 the same functionality is managed by std::optional.
      
      Another disadvantage of using a plain reference to IEntity is when it is used as a class member, where it needs to be initialized when an object of that class is defined. It might be that during construction time this IEntity is not known/existing yet. Of cource, a plain old C-pointer could be used in this case, but it wouldn't be a consistant usage.
      
      The proposal is to use std::optional<std::reference_wrapper<IEntity>> as return value for IEntityRepository::Get.
      
      Signed-off-by: default avatarJupp Tscheak <jupp.tscheak@daimler.com>
      f1a2e347
Loading