Skip to content

Commit

Permalink
Added bindings for IFilter::ProgressMessage
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Duffey <[email protected]>
  • Loading branch information
JDuffeyBQ committed Apr 18, 2024
1 parent ac12937 commit 6382412
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,17 @@ PYBIND11_MODULE(simplnx, mod)
filterMessage.def_readwrite("type", &IFilter::Message::type);
filterMessage.def_readwrite("message", &IFilter::Message::message);

py::class_<IFilter::ProgressMessage, IFilter::Message> progressMessage(filter, "ProgressMessage");
progressMessage.def(py::init([](std::string message, int32 progress) {
IFilter::ProgressMessage progressMessage;
progressMessage.type = IFilter::Message::Type::Progress;
progressMessage.message = std::move(message);
progressMessage.progress = progress;
return progressMessage;
}),
"message"_a, "progress"_a);
progressMessage.def_readwrite("progress", &IFilter::ProgressMessage::progress);

py::class_<IFilter::MessageHandler> messageHandler(filter, "MessageHandler");
messageHandler.def(py::init<>());
messageHandler.def_readwrite("callback", &IFilter::MessageHandler::m_Callback);
Expand Down

0 comments on commit 6382412

Please sign in to comment.