void AbstractAnalysisData::addModule(AnalysisDataModulePointer module) { if ((columnCount() > 1 && !(module->flags() & AnalysisDataModuleInterface::efAllowMulticolumn)) || (isMultipoint() && !(module->flags() & AnalysisDataModuleInterface::efAllowMultipoint)) || (!isMultipoint() && (module->flags() & AnalysisDataModuleInterface::efOnlyMultipoint))) { GMX_THROW(APIError("Data module not compatible with data object properties")); } if (impl_->bDataStart_) { GMX_RELEASE_ASSERT(!impl_->bInFrame_, "Cannot add data modules in mid-frame"); impl_->presentData(this, module.get()); } if (!(module->flags() & AnalysisDataModuleInterface::efAllowMissing)) { impl_->bAllowMissing_ = false; } impl_->modules_.push_back(module); }
void AnalysisDataModuleManager::addModule(AbstractAnalysisData *data, AnalysisDataModulePointer module) { impl_->checkModuleProperties(*module); // TODO: Ensure that the system does not end up in an inconsistent state by // adding a module in mid-data during parallel processing (probably best to // prevent alltogether). GMX_RELEASE_ASSERT(impl_->state_ != Impl::eInFrame, "Cannot add a data module in mid-frame"); impl_->presentData(data, module.get()); if (!(module->flags() & AnalysisDataModuleInterface::efAllowMissing)) { impl_->bAllowMissing_ = false; } impl_->modules_.push_back(Impl::ModuleInfo(module)); }