INodeStorage.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 "../constants/EntityIdentifiers.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 void calculateNeighbours(
  27. std::vector<CGPathNode *> & result,
  28. const PathNodeInfo & source,
  29. EPathfindingLayer layer,
  30. const PathfinderConfig * pathfinderConfig,
  31. const CPathfinderHelper * pathfinderHelper) = 0;
  32. virtual std::vector<CGPathNode *> calculateTeleportations(
  33. const PathNodeInfo & source,
  34. const PathfinderConfig * pathfinderConfig,
  35. const CPathfinderHelper * pathfinderHelper) = 0;
  36. virtual void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) = 0;
  37. virtual void initialize(const PathfinderOptions & options, const IGameInfoCallback & gameInfo) = 0;
  38. };
  39. VCMI_LIB_NAMESPACE_END