Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
WorldObject.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_WORLD_OBJECT_H
4 #define GRAIL_WORLD_OBJECT_H
5 
6 #include "WorldObjectType.hh"
7 
8 #include <map>
9 #include <set>
10 
11 namespace grail
12 {
13 namespace planner
14 {
21  {
22  public:
25  WorldObject(const WorldObjectType& type);
26  WorldObject(const WorldObject& other) = default;
27  WorldObject(WorldObject&& other) = default;
28  virtual ~WorldObject() override = default;
29 
35  bool IsOfType(unsigned int typeId) const;
36 
42  bool IsOfType(const std::string& typeName) const;
43 
45  void SetObjectIndex(unsigned int id);
46 
48  unsigned int GetObjectIndex() const;
49 
54  std::string GetTypeName() const;
55  bool operator ==(const WorldObject& other) const;
56  WorldObject& operator =(const WorldObject&) = delete;
57  WorldObject& operator =(WorldObject&& other) = delete;
58 
59  private:
60  const WorldObjectType& type;
61  unsigned int objectIndex = 0;
62  };
63 }
64 }
65 
66 #endif //GRAIL_WORLD_OBJECT_H
grail::planner::WorldObject::GetTypeName
std::string GetTypeName() const
GetTypeName.
Definition: WorldObject.cpp:28
grail::planner::WorldObject
Definition: WorldObject.hh:20
grail::planner::WorldObject::IsOfType
bool IsOfType(unsigned int typeId) const
Definition: WorldObject.cpp:33
grail::planner::WorldObject::WorldObject
WorldObject(const WorldObjectType &type)
Definition: WorldObject.cpp:13
grail::planner::WorldObjectType
Definition: WorldObjectType.hh:14
grail::planner::WorldObject::SetObjectIndex
void SetObjectIndex(unsigned int id)
Sets an integer ID that uniquely identifies a specific WorldObject instance.
Definition: WorldObject.cpp:18
grail::planner::WorldObject::GetObjectIndex
unsigned int GetObjectIndex() const
Gets an integer ID that uniquely identifies a specific WorldObject instance.
Definition: WorldObject.cpp:23
grail::planner::ParametrizedObject
The base class for parametrized objects (objects with parameters) used by the planning algorithm for ...
Definition: ParametrizedObject.hh:30