Beispiel #1
0
/**
* Creates an unmanaged instance of the actual algorithm and sets its properties
* @param initOnly If true then the algorithm will only having its init step run,
* otherwise observers will
* also be added and rethrows will be true
*/
void AlgorithmProxy::createConcreteAlg(bool initOnly) {
  m_alg = boost::dynamic_pointer_cast<Algorithm>(
      AlgorithmManager::Instance().createUnmanaged(name(), version()));
  m_alg->initializeFromProxy(*this);
  if (!initOnly) {
    m_alg->setRethrows(this->m_rethrow);
    addObservers();
  }
}
Beispiel #2
0
/**
* Creates an unmanaged instance of the actual algorithm and sets its properties
* @param initOnly If true then the algorithm will only having its init step run,
* otherwise observers will
* also be added and rethrows will be true
*/
void AlgorithmProxy::createConcreteAlg(bool initOnly) {
    if ((m_alg) && initOnly) {
        // the cached algorithm exists and is not going to be executed,
        // use that one
    } else {
        m_alg = boost::dynamic_pointer_cast<Algorithm>(
                    AlgorithmManager::Instance().createUnmanaged(name(), version()));
        m_alg->initializeFromProxy(*this);
        if (!initOnly) {
            m_alg->setRethrows(this->m_rethrow);
            addObservers();
        }
    }
}