10#include <boost/python/class.hpp>
11#include <boost/python/register_ptr_to_python.hpp>
18 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
23 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
28 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
33 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
41 register_ptr_to_python<std::shared_ptr<AlgorithmObserver>>();
43 class_<AlgorithmObserver, bases<>, std::shared_ptr<AlgorithmObserverAdapter>, boost::noncopyable>(
44 "AlgorithmObserver",
"Observes Algorithm notifications: start,progress,finish,error.")
46 "Observe the AlgorithmManager for starting algorithms.")
47 .def(
"observeFinish", &
observeFinish, (arg(
"self"), arg(
"alg")),
"Observe algorithm for its finish notification.")
48 .def(
"observeError", &
observeError, (arg(
"self"), arg(
"alg")),
"Observe algorithm for its error notification.")
50 "Observe algorithm for its progress notification.")
51 .def(
"stopObserving", &
stopObserving, (arg(
"self"), arg(
"alg")),
"Remove all observers from the algorithm.");
#define GET_POINTER_SPECIALIZATION(TYPE)
void stopObserving(AlgorithmObserver &self, const boost::python::object &alg)
void observeProgress(AlgorithmObserver &self, const boost::python::object &alg)
void observeFinish(AlgorithmObserver &self, const boost::python::object &alg)
void export_algorithm_observer()
void observeError(AlgorithmObserver &self, const boost::python::object &alg)
Observes Algorithm notifications: start,progress,finish,error.
void observeFinish(const IAlgorithm_const_sptr &alg)
Connect to algorithm alg and observe its finish notification.
void observeStarting()
Connect to AlgorithmManager and observe its starting notifications.
void observeProgress(const IAlgorithm_const_sptr &alg)
Connect to algorithm alg and observe its progress notification.
void stopObserving(const IAlgorithm_const_sptr &alg)
Disconnect from algorithm alg.
void observeError(const IAlgorithm_const_sptr &alg)
Connect to algorithm alg and observe its error notification.
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm