Grail (C++)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::planner::Domain Struct Reference

Public Member Functions

 Domain (const std::vector< WorldObjectType > &types)
 
 Domain (const Domain &other)=delete
 
 Domain (Domain &&other)=delete
 
Domainoperator= (Domain &&other)=delete
 
Domainoperator= (const Domain &)=delete
 
void AddActionTemplate (const std::string &name, const std::vector< std::string > &paramNames, PreconditionFunction preconditionFunction, EffectFunction effectFunction, CostFunction costFunction)
 
WorldObject CreateObjectOfType (const std::string &name) const
 Creates and object of a type identified by name parameter.
 
unsigned int GetTypeIndex (const std::string &typeName) const
 

Public Attributes

std::vector< std::string > objectTypes {}
 
std::vector< WorldObjectTypetypes {}
 
std::map< std::string, unsigned int > typemap {}
 
std::vector< ActionTemplateactionTemplates {}
 

Constructor & Destructor Documentation

◆ Domain()

grail::planner::Domain::Domain ( const std::vector< WorldObjectType > &  types)
Parameters
types- the vector of all possible world object types

Member Function Documentation

◆ AddActionTemplate()

void grail::planner::Domain::AddActionTemplate ( const std::string &  name,
const std::vector< std::string > &  paramNames,
PreconditionFunction  preconditionFunction,
EffectFunction  effectFunction,
CostFunction  costFunction 
)

Creates a new ActionTemplate for this domain

Parameters
name- ActionTemplate name
paramNames- names of action parameter (argument) types

◆ GetTypeIndex()

unsigned int grail::planner::Domain::GetTypeIndex ( const std::string &  typeName) const
Returns
The generated type index for a given type name

The documentation for this struct was generated from the following files: