Grail (C#)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Utility.Blueprint< InstanceType, ContextType, DataType > Class Template Reference

Responsible for producing contexts and instances of data used by UtilityReasoner. More...

Public Member Functions

delegate List< ContextType > ContextProducerDelegate (in DataType data)
 Delegate allowing for production of collections of ContextTypes given provided DataType. More...
 
delegate InstanceType InstanceProducerDelegate (in ContextType context)
 Delegate allowing for production of instances of InstanceType given provided ContextType. More...
 
 Blueprint (string name, ContextProducerDelegate contextProducer, InstanceProducerDelegate instanceProducer)
 Constructor. More...
 
List< ContextType > ProduceContexts (in DataType data)
 Uses ContextProducerDelegate provided in constructor to produce collection of ContextTypes. More...
 
InstanceType ProduceInstance (in ContextType context)
 Uses InstanceProducerDelegate provided in constructor to produce instance of InstanceType based on given ContextType. More...
 

Properties

string Name [get]
 Provides a name of this blueprint and instances it produces. More...
 

Detailed Description

Responsible for producing contexts and instances of data used by UtilityReasoner.

Template Parameters
InstanceTypeType of objects which can be produced from Blueprints and selected by Selector. By default - Behavior.
ContextTypeType of objects which can be paired with Blueprints of InstanceType and evaluated by Selector. Data contained in ContextType object must contain all information needed to produce an instance from Blueprint. By default - ValueTuple(AIEntity, Blackboard).
DataTypeType of objects from which ContextType can be generated. Be default - AIEntity.

Constructor & Destructor Documentation

◆ Blueprint()

Grail.Utility.Blueprint< InstanceType, ContextType, DataType >.Blueprint ( string  name,
ContextProducerDelegate  contextProducer,
InstanceProducerDelegate  instanceProducer 
)
inline

Constructor.

Parameters
nameName of this blueprint.
contextProducerDelegate responsible for producing collection of ContextTypes.
instanceProducerDelegate responsible for producing instance of InstanceType based on provided ContextType.

Member Function Documentation

◆ ContextProducerDelegate()

delegate List<ContextType> Grail.Utility.Blueprint< InstanceType, ContextType, DataType >.ContextProducerDelegate ( in DataType  data)

Delegate allowing for production of collections of ContextTypes given provided DataType.

◆ InstanceProducerDelegate()

delegate InstanceType Grail.Utility.Blueprint< InstanceType, ContextType, DataType >.InstanceProducerDelegate ( in ContextType  context)

Delegate allowing for production of instances of InstanceType given provided ContextType.

◆ ProduceContexts()

List<ContextType> Grail.Utility.Blueprint< InstanceType, ContextType, DataType >.ProduceContexts ( in DataType  data)
inline

Uses ContextProducerDelegate provided in constructor to produce collection of ContextTypes.

Parameters
dataObject containing data necessary to produce contexts.
Returns
Collection of produces ContextTypes.

◆ ProduceInstance()

InstanceType Grail.Utility.Blueprint< InstanceType, ContextType, DataType >.ProduceInstance ( in ContextType  context)
inline

Uses InstanceProducerDelegate provided in constructor to produce instance of InstanceType based on given ContextType.

Parameters
contextContext object containing data necessary to produce an instance.
Returns
New instance of InstanceType.

Property Documentation

◆ Name

string Grail.Utility.Blueprint< InstanceType, ContextType, DataType >.Name
get

Provides a name of this blueprint and instances it produces.


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