(C++)  1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::Prefab< InstanceType, ContexType, DataType > Class Template Referencefinal

The Prefab class - responsible for producing contexts and instances of data used by UtilityReasoner. More...

#include <Prefab.hh>

Public Member Functions

 Prefab (std::string name, std::function< std::vector< ContexType >(const DataType &)> contextProducer, std::function< std::unique_ptr< InstanceType >(const ContexType &)> instanceProducer)
 Prefab - Contructor. More...
 
 Prefab (const Prefab &other)=default
 
 Prefab (Prefab &&other)=default
 
Prefaboperator= (const Prefab &other)=delete
 
Prefaboperator= (Prefab &&other)=delete
 
std::vector< ContexType > ProduceContexts (const DataType &data) const
 
std::unique_ptr< InstanceType > ProduceInstance (const ContexType &context) const
 
std::string GetName () const
 

Detailed Description

template<typename InstanceType, typename ContexType = EntityBlackboardPair, typename DataType = class AIEntity>
class grail::Prefab< InstanceType, ContexType, DataType >

The Prefab class - responsible for producing contexts and instances of data used by UtilityReasoner.

Constructor & Destructor Documentation

◆ Prefab()

template<typename InstanceType , typename ContexType = EntityBlackboardPair, typename DataType = class AIEntity>
grail::Prefab< InstanceType, ContexType, DataType >::Prefab ( std::string  name,
std::function< std::vector< ContexType >(const DataType &)>  contextProducer,
std::function< std::unique_ptr< InstanceType >(const ContexType &)>  instanceProducer 
)
inline

Prefab - Contructor.

Parameters
name- name of the prefab
contextProducer- callable responsible for producing vector of contexts
instanceProducer- callable responsible for producing instance of data based on provided context

The documentation for this class was generated from the following file: