Implemented parsing the operator predicates.

This commit is contained in:
2016-05-21 02:03:45 +02:00
parent 0e4233cc65
commit 6e36fc128e
4 changed files with 96 additions and 6 deletions

View File

@@ -5,6 +5,7 @@
#include <vector>
#include <plasp/sas/Effect.h>
#include <plasp/sas/Predicate.h>
#include <plasp/sas/Variable.h>
namespace plasp
@@ -24,7 +25,7 @@ struct Operator
using Conditions = std::vector<Condition>;
using Effects = std::vector<Effect>;
std::string name;
Predicate predicate;
Conditions preconditions;
Effects effects;
size_t costs;

View File

@@ -0,0 +1,34 @@
#ifndef __SAS__PREDICATE_H
#define __SAS__PREDICATE_H
#include <iosfwd>
#include <string>
#include <vector>
namespace plasp
{
namespace sas
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Predicate
//
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Predicate
{
std::string name;
std::vector<std::string> arguments;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
std::ostream &operator <<(std::ostream &ostream, const Predicate &predicate);
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif