Added method for checking whether PDDL description contains problem.

This commit is contained in:
Patrick Lühne 2016-06-10 17:26:36 +02:00
parent 6a83147ac0
commit da71d4947b
2 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,8 @@ class Description
public:
const Domain &domain() const;
bool containsProblem() const;
const Problem &problem() const;
private:

View File

@ -113,6 +113,13 @@ const Domain &Description::domain() const
////////////////////////////////////////////////////////////////////////////////////////////////////
bool Description::containsProblem() const
{
return m_problem.get() != nullptr;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const Problem &Description::problem() const
{
BOOST_ASSERT(m_problem);