11#include <boost/python/class.hpp>
12#include <boost/python/register_ptr_to_python.hpp>
21 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
22 self.observeFinish(calg);
26 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
31 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
36 const IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
44 register_ptr_to_python<std::shared_ptr<AlgorithmObserver>>();
46 class_<AlgorithmObserver, bases<>, std::shared_ptr<AlgorithmObserverAdapter>, boost::noncopyable>(
47 "AlgorithmObserver",
"Observes Algorithm notifications: start,progress,finish,error.")
49 "Observe the AlgorithmManager for starting algorithms.")
50 .def(
"observeFinish", &
observeFinish, (arg(
"self"), arg(
"alg")),
"Observe algorithm for its finish notification.")
51 .def(
"observeError", &
observeError, (arg(
"self"), arg(
"alg")),
"Observe algorithm for its error notification.")
53 "Observe algorithm for its progress notification.")
54 .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)
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
Observes Algorithm notifications: start,progress,finish,error.
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