10 #include "../GrailCore/Blackboard.hh"
11 #include "../GrailCore/EntityBlackboardPair.hh"
19 template <
typename InstanceType,
typename ContexType = EntityBlackboardPair,
typename DataType =
class AIEntity>
38 std::function<std::vector<ContexType>(
const DataType&)> contextProducer,
39 std::function<std::unique_ptr<InstanceType>(
const ContexType&)> instanceProducer)
40 : name{name}, contextProducer{contextProducer}, instanceProducer{instanceProducer}
59 return contextProducer(data);
69 return instanceProducer(context);
76 std::string
GetName()
const {
return name; }
79 const std::string name =
"";
80 const std::function<std::vector<ContexType>(
const DataType&)> contextProducer{};
81 const std::function<std::unique_ptr<InstanceType>(
const ContexType&)> instanceProducer{};
85 #endif //GRAIL_PREFAB_H