INodeStorage.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * INodeStorage.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 "../GameConstants.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. struct CDestinationNodeInfo;
  14. struct CGPathNode;
  15. struct PathfinderOptions;
  16. struct PathNodeInfo;
  17. class CGameState;
  18. class CPathfinderHelper;
  19. class PathfinderConfig;
  20. class DLL_LINKAGE INodeStorage
  21. {
  22. public:
  23. using ELayer = EPathfindingLayer;
  24. virtual ~INodeStorage() = default;
  25. virtual std::vector<CGPathNode *> getInitialNodes() = 0;
  26. virtual std::vector<CGPathNode *> calculateNeighbours(
  27. const PathNodeInfo & source,
  28. const PathfinderConfig * pathfinderConfig,
  29. const CPathfinderHelper * pathfinderHelper) = 0;
  30. virtual std::vector<CGPathNode *> calculateTeleportations(
  31. const PathNodeInfo & source,
  32. const PathfinderConfig * pathfinderConfig,
  33. const CPathfinderHelper * pathfinderHelper) = 0;
  34. virtual void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) = 0;
  35. virtual void initialize(const PathfinderOptions & options, const CGameState * gs) = 0;
  36. };
  37. VCMI_LIB_NAMESPACE_END