AIMemory.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * AIMemory.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 "../AIUtility.h"
  12. #include "../../../lib/mapObjects/MapObjects.h"
  13. class AIMemory
  14. {
  15. public:
  16. std::set<const CGObjectInstance *> visitableObjs;
  17. std::set<const CGObjectInstance *> alreadyVisited;
  18. std::map<TeleportChannelID, std::shared_ptr<TeleportChannel>> knownTeleportChannels;
  19. std::map<const CGObjectInstance *, const CGObjectInstance *> knownSubterraneanGates;
  20. void removeFromMemory(const CGObjectInstance * obj);
  21. void removeFromMemory(ObjectIdRef obj);
  22. void addSubterraneanGate(const CGObjectInstance * entrance, const CGObjectInstance * exit);
  23. void addVisitableObject(const CGObjectInstance * obj);
  24. void markObjectVisited(const CGObjectInstance * obj);
  25. void markObjectUnvisited(const CGObjectInstance * obj);
  26. bool wasVisited(const CGObjectInstance * obj) const;
  27. void removeInvisibleObjects(CCallback * cb);
  28. };