1 #ifndef GRAIL_WORLD_STATE_H
2 #define GRAIL_WORLD_STATE_H
4 #include "WorldObject.hh"
5 #include "../Domain.hh"
18 WorldState(
const std::shared_ptr<Domain>& domain,
const std::vector<WorldObject>& worldObjects,
MemoryPool& memory);
26 bool operator==(
const WorldState& other)
const;
28 std::vector<class Action> GetLegalActions()
const;
29 std::vector<std::vector<unsigned int>> GenerateParameterLists(
const std::vector<std::vector<unsigned int>>& precedingParameterLists,
unsigned int searchedTypeIndex)
const;
31 const WorldObject* GetObjectByIndex(
unsigned int index)
const;
33 const std::map<unsigned int, WorldObject>& GetObjectMap()
const;
34 std::shared_ptr<Domain> GetDomain()
const;
36 WorldObject& AddObject(
const std::string& typeName);
41 void AddQueuedObjects();
42 void RemoveQueuedObjects();
45 std::vector<const WorldObject*>
GetObjectsOfType(
const std::string& typeName)
const;
54 std::shared_ptr<Domain> domain =
nullptr;
55 std::map<unsigned int, WorldObject> objects{};
56 std::vector<WorldObject> objectsToAdd{};
57 std::vector<unsigned int> indicesToRemove{};
58 unsigned int nextIndex = 0;
The MemoryPool class - preallocated memory container for optimization issues.
Definition: MemoryPool.hh:74
Definition: ParametrizedObject.h:21
Definition: WorldObject.hh:14
A class representing planner world state.
Definition: WorldState.hh:15
std::vector< const WorldObject * > GetObjectsOfType(const std::string &typeName) const
Definition: WorldState.cpp:108
int CountObjectsOfType(const std::string &typeName) const
Definition: WorldState.cpp:136
void RemoveObject(unsigned int objectIndex)
Definition: WorldState.cpp:84