This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
plasp/include/plasp/pddl/Problem.h

67 lines
1.3 KiB
C++

#ifndef __PLASP__PDDL__PROBLEM_H
#define __PLASP__PDDL__PROBLEM_H
#include <plasp/pddl/Context.h>
#include <plasp/pddl/Expression.h>
#include <plasp/pddl/Requirement.h>
namespace plasp
{
namespace pddl
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Problem
//
////////////////////////////////////////////////////////////////////////////////////////////////////
class Problem
{
public:
Problem(Context &context, Domain &domain);
void readPDDL();
bool isDeclared() const;
Domain &domain();
const Domain &domain() const;
const std::string &name() const;
const Requirements &requirements() const;
bool hasRequirement(Requirement::Type requirementType) const;
expressions::Constants &objects();
const expressions::Constants &objects() const;
void checkConsistency();
private:
void parseSection();
void parseRequirementSection();
void computeDerivedRequirements();
void parseDomainSection();
void parseObjectSection();
Context &m_context;
Domain &m_domain;
bool m_isDeclared;
std::string m_name;
Requirements m_requirements;
expressions::Constants m_objects;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif