Skip to content

Commit

Permalink
extended python api
Browse files Browse the repository at this point in the history
  • Loading branch information
drexlerd committed Oct 16, 2023
1 parent 6b2b4cc commit e163757
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions api/python/src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ void init_core(py::module_ &m_core) {
py::class_<SyntacticElementFactory, std::shared_ptr<SyntacticElementFactory>>(m_core, "SyntacticElementFactory")
.def(py::init<std::shared_ptr<VocabularyInfo>>())

.def("parse_concept", &SyntacticElementFactory::parse_concept)
.def("parse_role", &SyntacticElementFactory::parse_role)
.def("parse_numerical", &SyntacticElementFactory::parse_numerical)
.def("parse_boolean", &SyntacticElementFactory::parse_boolean)
.def("parse_concept", py::overload_cast<const std::string&, const std::string&>(&SyntacticElementFactory::parse_concept), py::arg("description"), py::arg("filename") = "")
.def("parse_role", py::overload_cast<const std::string&, const std::string&>(&SyntacticElementFactory::parse_role), py::arg("description"), py::arg("filename") = "")
.def("parse_numerical", py::overload_cast<const std::string&, const std::string&>(&SyntacticElementFactory::parse_numerical), py::arg("description"), py::arg("filename") = "")
.def("parse_boolean", py::overload_cast<const std::string&, const std::string&>(&SyntacticElementFactory::parse_boolean), py::arg("description"), py::arg("filename") = "")

.def("make_empty_boolean", py::overload_cast<const std::shared_ptr<const Concept>&>(&SyntacticElementFactory::make_empty_boolean))
.def("make_empty_boolean", py::overload_cast<const std::shared_ptr<const Role>&>(&SyntacticElementFactory::make_empty_boolean))
Expand Down
8 changes: 4 additions & 4 deletions api/python/src/dlplan/core/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ class Numerical(BaseElement):

class SyntacticElementFactory:
def __init__(self, vocabulary: VocabularyInfo) -> None: ...
def parse_concept(self, description: str) -> Concept: ...
def parse_role(self, description: str) -> Role: ...
def parse_boolean(self, description: str) -> Boolean: ...
def parse_numerical(self, description: str) -> Numerical: ...
def parse_concept(self, description: str, filename: str = "") -> Concept: ...
def parse_role(self, description: str, filename: str = "") -> Role: ...
def parse_boolean(self, description: str, filename: str = "") -> Boolean: ...
def parse_numerical(self, description: str, filename: str = "") -> Numerical: ...

@overload
def make_empty_boolean(self, concept: Concept) -> Boolean: ...
Expand Down

0 comments on commit e163757

Please sign in to comment.