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/Effect.h

53 lines
1.2 KiB
C
Raw Normal View History

#ifndef __PLASP__SAS__EFFECT_H
#define __PLASP__SAS__EFFECT_H
2016-05-20 15:29:24 +02:00
#include <vector>
#include <tokenize/Tokenizer.h>
#include <plasp/sas/AssignedVariable.h>
2016-05-20 15:29:24 +02:00
#include <plasp/sas/Variable.h>
namespace plasp
{
namespace sas
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Effect
//
////////////////////////////////////////////////////////////////////////////////////////////////////
2016-05-22 15:46:41 +02:00
class Effect;
using Effects = std::vector<Effect>;
////////////////////////////////////////////////////////////////////////////////////////////////////
2016-05-22 15:46:41 +02:00
class Effect
2016-05-20 15:29:24 +02:00
{
2016-05-22 15:46:41 +02:00
public:
using Condition = AssignedVariable;
using Conditions = AssignedVariables;
2016-05-20 15:29:24 +02:00
2017-05-12 14:17:57 +02:00
static Effect fromSAS(tokenize::Tokenizer<> &tokenizer, const Variables &variables, Conditions &preconditions);
2016-05-22 15:46:41 +02:00
public:
const Conditions &conditions() const;
const Condition &postcondition() const;
private:
Effect() = default;
explicit Effect(Conditions conditions, Condition postcondition);
Conditions m_conditions;
Condition m_postcondition;
2016-05-20 15:29:24 +02:00
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif