2
0

ObjectVisitEnded.h 923 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * ObjectVisitEnded.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "Event.h"
  12. #include "SubscriptionRegistry.h"
  13. class PlayerColor;
  14. class ObjectInstanceID;
  15. namespace events
  16. {
  17. class DLL_LINKAGE ObjectVisitEnded : public Event
  18. {
  19. public:
  20. using Sub = SubscriptionRegistry<ObjectVisitEnded>;
  21. using PreHandler = Sub::PreHandler;
  22. using PostHandler = Sub::PostHandler;
  23. using ExecHandler = Sub::ExecHandler;
  24. virtual PlayerColor getPlayer() const = 0;
  25. virtual ObjectInstanceID getHero() const = 0;
  26. static Sub * getRegistry();
  27. static void defaultExecute(const EventBus * bus, const ExecHandler & execHandler,
  28. const PlayerColor & player, const ObjectInstanceID & heroId);
  29. friend class SubscriptionRegistry<ObjectVisitEnded>;
  30. };
  31. }