Simple C++ Game
ComponentFamily.hpp
1 #pragma once
2 
3 #include <EntityFamily.hpp>
4 
5 #include <unordered_set>
6 
11 {
12 public:
20 
29  ComponentFamily(const std::unordered_set<std::string> componentIds);
30 
38  bool isInFamily(const Entity &entity) const;
39 
40 private:
41  const std::unordered_set<std::string> _componentIds;
42 };
An EntityFamily that defines a class as having a component of each of the specified types.
Definition: ComponentFamily.hpp:11
ComponentFamily()
Construct a default new Component Family object.
bool isInFamily(const Entity &entity) const
Checks if the entity has all of the required componets to fit the family.
ComponentFamily(const std::unordered_set< std::string > componentIds)
Construct a new Component Family object.
An abstract class that allows for the definition of a class of entity.
Definition: EntityFamily.hpp:10
An entity in the game's component entity system.
Definition: Entity.hpp:14