10 #include "../GrailCore/Blackboard.hh"
11 #include "../GrailEvaluators/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{};
The Blueprint class - Responsible for producing contexts and instances of data used by UtilityReasone...
Definition: Blueprint.hh:29
std::vector< ContexType > ProduceContexts(const DataType &data) const
ProduceContexts - Uses ContextProducerDelegate provided in constructor to produce collection of Conte...
Definition: Blueprint.hh:57
Blueprint(std::string name, std::function< std::vector< ContexType >(const DataType &)> contextProducer, std::function< std::unique_ptr< InstanceType >(const ContexType &)> instanceProducer)
Blueprint - Contructor.
Definition: Blueprint.hh:37
std::string GetName() const
GetName.
Definition: Blueprint.hh:76
std::unique_ptr< InstanceType > ProduceInstance(const ContexType &context) const
ProduceInstance - Uses InstanceProducerDelegate provided in constructor to produce instance of Instan...
Definition: Blueprint.hh:67