Added accessors to parsed SAS information.

This commit is contained in:
Patrick Lühne 2016-05-20 18:18:30 +02:00
parent 2d3760b774
commit b083d77ad4
2 changed files with 49 additions and 0 deletions

View File

@ -31,6 +31,13 @@ class Description
public: public:
Description(); Description();
const std::vector<Variable> &variables() const;
const std::vector<MutexGroup> &mutexGroups() const;
const std::vector<AssignedVariable> &initialStateFacts() const;
const std::vector<AssignedVariable> &goalFacts() const;
const std::vector<Operator> &operators() const;
const std::vector<AxiomRule> &axiomRules() const;
void print(std::ostream &ostream) const; void print(std::ostream &ostream) const;
private: private:

View File

@ -58,6 +58,48 @@ Description Description::fromFile(const boost::filesystem::path &path)
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
const std::vector<Variable> &Description::variables() const
{
return m_variables;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const std::vector<MutexGroup> &Description::mutexGroups() const
{
return m_mutexGroups;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const std::vector<AssignedVariable> &Description::initialStateFacts() const
{
return m_initialStateFacts;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const std::vector<AssignedVariable> &Description::goalFacts() const
{
return m_goalFacts;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const std::vector<Operator> &Description::operators() const
{
return m_operators;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const std::vector<AxiomRule> &Description::axiomRules() const
{
return m_axiomRules;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void Description::print(std::ostream &ostream) const void Description::print(std::ostream &ostream) const
{ {
// Metric section // Metric section