|
NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Go to the documentation of this file.
14 #include <QStringList>
44 if (mCurrent >= 0 && mCurrent <
mChildren.size())
56 reportError(
"Attempt to restart CompositeSerialTimedAlgorithm while running failed.");
72 this->jumpToNextChild();
75 void CompositeSerialTimedAlgorithm::jumpToNextChild()
78 if (mCurrent >= 0 && mCurrent <
mChildren.size())
80 disconnect(
mChildren[mCurrent].get(), SIGNAL(
finished()),
this, SLOT(jumpToNextChild()));
84 if (mCurrent >= 0 && mCurrent <
mChildren.size())
86 connect(
mChildren[mCurrent].get(), SIGNAL(
finished()),
this, SLOT(jumpToNextChild()));
102 return mCurrent == -1;
107 return mCurrent >= 0;
121 QStringList products;
122 for (
unsigned i=0; i<
mChildren.size(); ++i)
127 if (products.isEmpty())
128 return "composite parallel";
130 return products.join(
", ");
139 reportError(
"Attempt to restart CompositeSerialTimedAlgorithm while running failed.");
150 for (
unsigned i=0; i<
mChildren.size(); ++i)
154 for (
unsigned i=0; i<
mChildren.size(); ++i)
160 void CompositeParallelTimedAlgorithm::oneFinished()
171 for (
unsigned i=0; i<
mChildren.size(); ++i)
Namespace for all CustusX production code.
virtual bool isFinished() const
virtual void append(TimedAlgorithmPtr child)
boost::shared_ptr< class TimedBaseAlgorithm > TimedAlgorithmPtr
virtual bool isRunning() const
virtual bool isFinished() const
CompositeSerialTimedAlgorithm(QString name="composite")
void aboutToStart()
emitted at start of execute. Use to perform preprocessing
CompositeTimedAlgorithm(QString name)
std::vector< TimedAlgorithmPtr > mChildren
CompositeParallelTimedAlgorithm(QString name="parallel")
void started(int maxSteps)
emitted at start of run.
Base class for algorithms that wants to time their execution.
void finished()
should be emitted when at the end of postProcessingSlot
virtual QString getProduct() const
virtual bool isRunning() const
void productChanged()
emitted whenever product string has changed
void reportError(QString msg)
virtual QString getProduct() const