pddl_planner
Public Member Functions | Static Public Member Functions | List of all members
pddl_planner::representation::VariableManager Class Reference

Manage variable, i.e. for PDDL description these variables start with a quotation mark. More...

#include <Domain.hpp>

Public Member Functions

 VariableManager (const ArgumentList &arguments=ArgumentList())
 
void push (const Label &label)
 
Label pop ()
 
std::vector< LabelgetOperatorStack () const
 
std::string getOperatorStackAsString () const
 
void registerVariable (const std::string &name)
 
bool isKnownVariable (const std::string &name) const
 
bool hasTypedVariable (const TypedItemList &list, const TypedItem &item) const
 

Static Public Member Functions

static std::string canonize (const std::string &name)
 
static bool isVariable (const std::string &name)
 
static void addTypedVariable (TypedItemList &list, const TypedItem &item)
 

Detailed Description

Manage variable, i.e. for PDDL description these variables start with a quotation mark.

Constructor & Destructor Documentation

◆ VariableManager()

pddl_planner::representation::VariableManager::VariableManager ( const ArgumentList arguments = ArgumentList())

Member Function Documentation

◆ addTypedVariable()

void pddl_planner::representation::VariableManager::addTypedVariable ( TypedItemList list,
const TypedItem item 
)
static

Add a typed variable to a list This makes sure that the label provided in TypedItem is a variable

◆ canonize()

std::string pddl_planner::representation::VariableManager::canonize ( const std::string &  name)
static

◆ getOperatorStack()

std::vector<Label> pddl_planner::representation::VariableManager::getOperatorStack ( ) const
inline

Get operator stack as list

Returns
list of operators, latest operator at the end of the list

◆ getOperatorStackAsString()

std::string pddl_planner::representation::VariableManager::getOperatorStackAsString ( ) const

Get the operator stack as string for debugging purposes

Returns
list of operators

◆ hasTypedVariable()

bool pddl_planner::representation::VariableManager::hasTypedVariable ( const TypedItemList list,
const TypedItem item 
) const

Check whether the provided item already exists in the list

Exceptions
ifthe types of the existing item and the item for testing differ, though the labels are the same

◆ isKnownVariable()

bool pddl_planner::representation::VariableManager::isKnownVariable ( const std::string &  name) const

Test is variable is known / registered

Parameters
nameName of variable
Returns
True is variable is known, false otherwise

◆ isVariable()

bool pddl_planner::representation::VariableManager::isVariable ( const std::string &  name)
static

◆ pop()

Label pddl_planner::representation::VariableManager::pop ( )

◆ push()

void pddl_planner::representation::VariableManager::push ( const Label label)

◆ registerVariable()

void pddl_planner::representation::VariableManager::registerVariable ( const std::string &  name)

Register variable by name

Parameters
nameName of variable

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