Class DomainReader
Defined in File DomainReader.hpp
Class Documentation
-
class DomainReader
Utility class for parsing and managing multiple PDDL domains.
The DomainReader class provides methods to add and parse PDDL domain definitions and extract their components.
Public Functions
-
DomainReader()
Construct a new DomainReader object.
-
void add_domain(const std::string &domain)
Add a new PDDL domain to the internal list.
- Parameters:
domain – [in] The PDDL domain definition as a string.
-
std::string get_joint_domain() const
Get a joint domain definition combining all added domains.
- Returns:
std::string The combined domain definition.
Protected Functions
-
int get_end_block(const std::string &domain, std::size_t init_pos)
Find the end position of a block in the domain definition.
- Parameters:
domain – [in] The domain definition string.
init_pos – [in] Initial position to start searching.
- Returns:
int The position of the end of the block.
-
std::string get_name(std::string &domain)
Extract the name of the domain.
- Parameters:
domain – [inout] The domain definition string.
- Returns:
std::string The name of the domain.
-
std::string get_requirements(std::string &domain)
Extract the requirements section from the domain.
- Parameters:
domain – [inout] The domain definition string.
- Returns:
std::string The requirements section.
-
std::string get_types(const std::string &domain)
Extract the types defined in the domain.
- Parameters:
domain – [in] The domain definition string.
- Returns:
std::string The types section.
-
std::string get_constants(const std::string &domain)
Extract the constants defined in the domain.
- Parameters:
domain – [in] The domain definition string.
- Returns:
std::string The constants section.
-
std::string get_predicates(const std::string &domain)
Extract the predicates defined in the domain.
- Parameters:
domain – [in] The domain definition string.
- Returns:
std::string The predicates section.
-
std::string get_functions(const std::string &domain)
Extract the functions defined in the domain.
- Parameters:
domain – [in] The domain definition string.
- Returns:
std::string The functions section.
-
std::vector<std::string> get_derived_predicates(const std::string &domain)
Extract the derived predicates defined in the domain.
- Parameters:
domain – [in] The domain definition string.
- Returns:
std::vector<std::string> Vector containing derived predicates.
-
std::vector<std::string> get_actions(const std::string &domain)
Extract the actions defined in the domain.
- Parameters:
domain – [in] The domain definition string.
- Returns:
std::vector<std::string> Vector containing actions.
-
DomainReader()