Made Effect a proper class.
This commit is contained in:
@@ -30,7 +30,7 @@ class AssignedVariable
|
||||
static AssignedVariable fromSAS(std::istream &istream, const Variable &variable);
|
||||
|
||||
public:
|
||||
AssignedVariable(const Variable &variable, const Value &value);
|
||||
explicit AssignedVariable(const Variable &variable, const Value &value);
|
||||
|
||||
const Variable &variable() const;
|
||||
const Value &value() const;
|
||||
|
@@ -36,7 +36,7 @@ class AxiomRule
|
||||
|
||||
private:
|
||||
AxiomRule() = default;
|
||||
AxiomRule(Conditions conditions, Condition postcondition);
|
||||
explicit AxiomRule(Conditions conditions, Condition postcondition);
|
||||
|
||||
Conditions m_conditions;
|
||||
Condition m_postcondition;
|
||||
|
@@ -17,18 +17,29 @@ namespace sas
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct Effect;
|
||||
class Effect;
|
||||
using Effects = std::vector<Effect>;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct Effect
|
||||
class Effect
|
||||
{
|
||||
using Condition = AssignedVariable;
|
||||
using Conditions = AssignedVariables;
|
||||
public:
|
||||
using Condition = AssignedVariable;
|
||||
using Conditions = AssignedVariables;
|
||||
|
||||
Conditions conditions;
|
||||
Condition postcondition;
|
||||
static Effect fromSAS(std::istream &istream, const Variables &variables, Conditions &preconditions);
|
||||
|
||||
public:
|
||||
const Conditions &conditions() const;
|
||||
const Condition &postcondition() const;
|
||||
|
||||
private:
|
||||
Effect() = default;
|
||||
explicit Effect(Conditions conditions, Condition postcondition);
|
||||
|
||||
Conditions m_conditions;
|
||||
Condition m_postcondition;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user