Services.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Services.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 "Metatype.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. class ArtifactService;
  14. class CreatureService;
  15. class FactionService;
  16. class HeroClassService;
  17. class HeroTypeService;
  18. class SkillService;
  19. class JsonNode;
  20. class BattleFieldService;
  21. class ObstacleService;
  22. class IGameSettings;
  23. namespace spells
  24. {
  25. class Service;
  26. namespace effects
  27. {
  28. class Registry;
  29. }
  30. }
  31. #if SCRIPTING_ENABLED
  32. namespace scripting
  33. {
  34. class Service;
  35. }
  36. #endif
  37. class DLL_LINKAGE Services
  38. {
  39. public:
  40. virtual ~Services() = default;
  41. virtual const ArtifactService * artifacts() const = 0;
  42. virtual const CreatureService * creatures() const = 0;
  43. virtual const FactionService * factions() const = 0;
  44. virtual const HeroClassService * heroClasses() const = 0;
  45. virtual const HeroTypeService * heroTypes() const = 0;
  46. #if SCRIPTING_ENABLED
  47. virtual const scripting::Service * scripts() const = 0;
  48. #endif
  49. virtual const spells::Service * spells() const = 0;
  50. virtual const SkillService * skills() const = 0;
  51. virtual const BattleFieldService * battlefields() const = 0;
  52. virtual const ObstacleService * obstacles() const = 0;
  53. virtual const IGameSettings * settings() const = 0;
  54. virtual void updateEntity(Metatype metatype, int32_t index, const JsonNode & data) = 0;
  55. virtual const spells::effects::Registry * spellEffects() const = 0;
  56. virtual spells::effects::Registry * spellEffects() = 0;
  57. //TODO: put map object types registry access here
  58. };
  59. VCMI_LIB_NAMESPACE_END