Made Goal a proper class.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include <plasp/sas/AxiomRule.h>
|
||||
#include <plasp/sas/Goal.h>
|
||||
#include <plasp/sas/InitialState.h>
|
||||
#include <plasp/sas/MutexGroup.h>
|
||||
#include <plasp/sas/Operator.h>
|
||||
@@ -35,7 +36,7 @@ class Description
|
||||
const std::vector<Variable> &variables() const;
|
||||
const std::vector<MutexGroup> &mutexGroups() const;
|
||||
const InitialState &initialState() const;
|
||||
const std::vector<AssignedVariable> &goalFacts() const;
|
||||
const Goal &goal() const;
|
||||
const std::vector<Operator> &operators() const;
|
||||
const std::vector<AxiomRule> &axiomRules() const;
|
||||
|
||||
@@ -58,7 +59,7 @@ class Description
|
||||
std::vector<Variable> m_variables;
|
||||
std::vector<MutexGroup> m_mutexGroups;
|
||||
std::unique_ptr<InitialState> m_initialState;
|
||||
std::vector<AssignedVariable> m_goalFacts;
|
||||
std::unique_ptr<Goal> m_goal;
|
||||
std::vector<Operator> m_operators;
|
||||
std::vector<AxiomRule> m_axiomRules;
|
||||
};
|
||||
|
39
include/plasp/sas/Goal.h
Normal file
39
include/plasp/sas/Goal.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef __SAS__GOAL_H
|
||||
#define __SAS__GOAL_H
|
||||
|
||||
#include <plasp/sas/AssignedVariable.h>
|
||||
|
||||
namespace plasp
|
||||
{
|
||||
namespace sas
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Goal
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class Goal
|
||||
{
|
||||
public:
|
||||
using Fact = AssignedVariable;
|
||||
using Facts = std::vector<Fact>;
|
||||
|
||||
static Goal fromSAS(std::istream &istream, const std::vector<Variable> &variables);
|
||||
|
||||
public:
|
||||
const Facts &facts() const;
|
||||
|
||||
private:
|
||||
Goal() = default;
|
||||
|
||||
Facts m_facts;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user