(C++)  1.1.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
WorldObject.hh
1 #ifndef GRAIL_WORLD_OBJECT_H
2 #define GRAIL_WORLD_OBJECT_H
3 
4 #include "WorldObjectType.hh"
5 
6 #include <set>
7 #include <map>
8 
9 namespace grail
10 {
11  namespace planning
12  {
14  {
15  public:
16  WorldObject(const WorldObjectType& type);
17  WorldObject(const WorldObject& other) = default;
18  WorldObject(WorldObject&& other) = default;
19  ~WorldObject() = default;
20 
21  bool IsOfType(unsigned int typeId) const;
22  bool IsOfType(const std::string& typeName) const;
23  void SetObjectIndex(unsigned int id);
24  unsigned int GetObjectIndex() const;
25 
30  std::string GetTypeName() const;
31  bool operator == (const WorldObject& other) const;
32  WorldObject& operator = (const WorldObject&) = delete;
33  WorldObject& operator = (WorldObject&& other) = delete; //REVIEW: problem with deleted move assigmnent, because WorldObject is used inside a class that can be moved
34 
35  private:
36  const WorldObjectType& type;
37  unsigned int objectIndex = 0;
38  };
39  }
40 }
41 #endif //GRAIL_WORLD_OBJECT_H
Definition: ParametrizedObject.h:21
Definition: WorldObject.hh:14
std::string GetTypeName() const
GetTypeName.
Definition: WorldObject.cpp:27
A class representing planner WorldObject type - its name and inheritance structure.
Definition: WorldObjectType.hh:12