From b083d77ad4238d62bf08f3d59ad013dff07030e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Fri, 20 May 2016 18:18:30 +0200 Subject: [PATCH] Added accessors to parsed SAS information. --- include/plasp/sas/Description.h | 7 ++++++ src/plasp/sas/Description.cpp | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/include/plasp/sas/Description.h b/include/plasp/sas/Description.h index 67e2c37..3100a13 100644 --- a/include/plasp/sas/Description.h +++ b/include/plasp/sas/Description.h @@ -31,6 +31,13 @@ class Description public: Description(); + const std::vector &variables() const; + const std::vector &mutexGroups() const; + const std::vector &initialStateFacts() const; + const std::vector &goalFacts() const; + const std::vector &operators() const; + const std::vector &axiomRules() const; + void print(std::ostream &ostream) const; private: diff --git a/src/plasp/sas/Description.cpp b/src/plasp/sas/Description.cpp index 1961396..9f308b3 100644 --- a/src/plasp/sas/Description.cpp +++ b/src/plasp/sas/Description.cpp @@ -58,6 +58,48 @@ Description Description::fromFile(const boost::filesystem::path &path) //////////////////////////////////////////////////////////////////////////////////////////////////// +const std::vector &Description::variables() const +{ + return m_variables; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +const std::vector &Description::mutexGroups() const +{ + return m_mutexGroups; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +const std::vector &Description::initialStateFacts() const +{ + return m_initialStateFacts; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +const std::vector &Description::goalFacts() const +{ + return m_goalFacts; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +const std::vector &Description::operators() const +{ + return m_operators; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +const std::vector &Description::axiomRules() const +{ + return m_axiomRules; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + void Description::print(std::ostream &ostream) const { // Metric section