patrick
/
plasp
Archived
1
0
Fork 0
This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
plasp/include/plasp/sas/Operator.h

64 lines
1.3 KiB
C
Raw Permalink Normal View History

#ifndef __PLASP__SAS__OPERATOR_H
#define __PLASP__SAS__OPERATOR_H
2016-05-20 15:29:24 +02:00
#include <string>
#include <vector>
#include <tokenize/Tokenizer.h>
#include <colorlog/ColorStream.h>
#include <plasp/sas/AssignedVariable.h>
2016-05-20 15:29:24 +02:00
#include <plasp/sas/Effect.h>
#include <plasp/sas/Predicate.h>
2016-05-20 15:29:24 +02:00
#include <plasp/sas/Variable.h>
2016-05-20 15:29:24 +02:00
namespace plasp
{
namespace sas
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Operator
//
////////////////////////////////////////////////////////////////////////////////////////////////////
2016-05-22 14:35:53 +02:00
class Operator;
using Operators = std::vector<Operator>;
////////////////////////////////////////////////////////////////////////////////////////////////////
2016-05-22 14:35:53 +02:00
class Operator
2016-05-20 15:29:24 +02:00
{
2016-05-22 14:35:53 +02:00
public:
using Condition = AssignedVariable;
using Conditions = AssignedVariables;
2017-05-12 14:17:57 +02:00
static Operator fromSAS(tokenize::Tokenizer<> &tokenizer, const Variables &variables);
2016-05-22 14:43:57 +02:00
2016-05-22 14:35:53 +02:00
public:
void printPredicateAsASP(colorlog::ColorStream &stream) const;
2016-05-22 14:35:53 +02:00
const Predicate &predicate() const;
const Conditions &preconditions() const;
const Effects &effects() const;
size_t costs() const;
private:
2016-05-22 14:45:31 +02:00
Operator() = default;
2016-05-22 14:35:53 +02:00
Predicate m_predicate;
Conditions m_preconditions;
Effects m_effects;
size_t m_costs;
2016-05-20 15:29:24 +02:00
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif