Fawkes API  Fawkes Development Version
fawkes::stn::DomainAction Class Reference

#include "domain_action.h"

Public Member Functions

 DomainAction (const std::string &name, const std::vector< std::string > &params, const std::vector< Predicate > &preconds, const std::vector< Predicate > &effects, int duration=0, const std::vector< std::string > &cond_breakups={}, const std::vector< std::string > &temp_breakups={})
 Constructor. More...
 
const std::string getName ()
 Get the name of the action. More...
 
const std::vector< std::string > params ()
 Get the list of parameters of the action. More...
 
StnAction generateStnAction (const std::string &name, const std::string &params)
 Generate an StnAction from the DomainAction. More...
 

Friends

std::ostream & operator<< (std::ostream &, const DomainAction &)
 Print a DomainAction. More...
 

Detailed Description

A representation of an action used by the STN generator.

Definition at line 46 of file domain_action.h.

Constructor & Destructor Documentation

◆ DomainAction()

fawkes::stn::DomainAction::DomainAction ( const std::string &  name,
const std::vector< std::string > &  params,
const std::vector< Predicate > &  preconds,
const std::vector< Predicate > &  effects,
int  duration = 0,
const std::vector< std::string > &  cond_breakups = {},
const std::vector< std::string > &  temp_breakups = {} 
)

Constructor.

Parameters
nameThe name of the action
paramsThe list of parameters of the action
precondsA list of preconditions, each precondition is a Predicate
effectsA list of effects, each effect is a Predicate
durationThe duration of the action
cond_breakupsA list of conditional breakups
temp_breakupsA list of temporal breakups

Definition at line 48 of file domain_action.cpp.

Member Function Documentation

◆ generateStnAction()

StnAction fawkes::stn::DomainAction::generateStnAction ( const std::string &  name,
const std::string &  params 
)

Generate an StnAction from the DomainAction.

Parameters
nameThe name of the resulting StnAction.
paramsThe parameters of the resulting StnAction.
Returns
The generated StnAction.

Definition at line 123 of file domain_action.cpp.

◆ getName()

const std::string fawkes::stn::DomainAction::getName ( void  )

Get the name of the action.

Returns
The name as string.

Definition at line 103 of file domain_action.cpp.

◆ params()

const std::vector< std::string > fawkes::stn::DomainAction::params ( )

Get the list of parameters of the action.

Returns
A vector of parameters as strings.

Definition at line 112 of file domain_action.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  strm,
const DomainAction a 
)
friend

Print a DomainAction.

This prints all relevant facts about a DomainAction including its name, preconditions, effects.

Parameters
strmThe std::ostream to pass the information to.
aThe DomainAction to print.

Definition at line 72 of file domain_action.cpp.


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