2016-06-04 17:10:50 +02:00
|
|
|
#ifndef __PLASP__PDDL__EXPRESSIONS__PREDICATE_H
|
|
|
|
#define __PLASP__PDDL__EXPRESSIONS__PREDICATE_H
|
2016-06-02 18:31:47 +02:00
|
|
|
|
|
|
|
#include <plasp/pddl/Expression.h>
|
|
|
|
|
|
|
|
namespace plasp
|
|
|
|
{
|
|
|
|
namespace pddl
|
|
|
|
{
|
|
|
|
namespace expressions
|
|
|
|
{
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2016-06-03 13:33:05 +02:00
|
|
|
// Predicate
|
2016-06-02 18:31:47 +02:00
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-06-12 22:12:09 +02:00
|
|
|
class Predicate: public ExpressionCRTP<Predicate>
|
2016-06-02 18:31:47 +02:00
|
|
|
{
|
|
|
|
public:
|
2016-06-12 22:12:09 +02:00
|
|
|
static const Expression::Type ExpressionType = Expression::Type::Predicate;
|
|
|
|
|
2016-06-09 17:51:10 +02:00
|
|
|
static PredicatePointer parse(Context &context, ExpressionContext &expressionContext);
|
|
|
|
static PredicatePointer parse(Context &context, const Problem &problem);
|
2016-06-02 18:31:47 +02:00
|
|
|
|
|
|
|
public:
|
2016-06-03 17:12:39 +02:00
|
|
|
const std::string &name() const;
|
2016-06-13 01:38:56 +02:00
|
|
|
const std::vector<const Expression *> &arguments() const;
|
2016-06-03 17:12:39 +02:00
|
|
|
|
|
|
|
bool isDeclared() const;
|
2016-06-03 13:20:52 +02:00
|
|
|
|
2016-06-02 18:31:47 +02:00
|
|
|
private:
|
2016-06-03 17:12:39 +02:00
|
|
|
Predicate();
|
|
|
|
|
|
|
|
void setDeclared();
|
|
|
|
|
|
|
|
bool m_isDeclared;
|
2016-06-02 18:31:47 +02:00
|
|
|
|
|
|
|
std::string m_name;
|
2016-06-13 01:38:56 +02:00
|
|
|
std::vector<const Expression *> m_arguments;
|
2016-06-02 18:31:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|