/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
* \param[in] bSet Value of the property to check against.
* \throws APIError if \p module is not compatible with the data.
*/
- void checkModuleProperty(const AnalysisDataModuleInterface &module,
+ void checkModuleProperty(const IAnalysisDataModule &module,
DataProperty property, bool bSet) const;
/*! \brief
* Checks whether a module is compatible with the data properties.
* Does not currently check the actual data (e.g., missing values), but
* only the dimensionality and other preset properties of the data.
*/
- void checkModuleProperties(const AnalysisDataModuleInterface &module) const;
+ void checkModuleProperties(const IAnalysisDataModule &module) const;
/*! \brief
* Present data already added to the data object to a module.
* been registered to the data object when the data was added.
*/
void presentData(AbstractAnalysisData *data,
- AnalysisDataModuleInterface *module);
+ IAnalysisDataModule *module);
//! List of modules added to the data.
ModuleList modules_;
void
AnalysisDataModuleManager::Impl::checkModuleProperty(
- const AnalysisDataModuleInterface &module,
+ const IAnalysisDataModule &module,
DataProperty property, bool bSet) const
{
bool bOk = true;
switch (property)
{
case eMultipleDataSets:
- if (bSet && !(flags & AnalysisDataModuleInterface::efAllowMultipleDataSets))
+ if (bSet && !(flags & IAnalysisDataModule::efAllowMultipleDataSets))
{
bOk = false;
}
break;
case eMultipleColumns:
- if (bSet && !(flags & AnalysisDataModuleInterface::efAllowMulticolumn))
+ if (bSet && !(flags & IAnalysisDataModule::efAllowMulticolumn))
{
bOk = false;
}
break;
case eMultipoint:
- if ((bSet && !(flags & AnalysisDataModuleInterface::efAllowMultipoint))
- || (!bSet && (flags & AnalysisDataModuleInterface::efOnlyMultipoint)))
+ if ((bSet && !(flags & IAnalysisDataModule::efAllowMultipoint))
+ || (!bSet && (flags & IAnalysisDataModule::efOnlyMultipoint)))
{
bOk = false;
}
void
AnalysisDataModuleManager::Impl::checkModuleProperties(
- const AnalysisDataModuleInterface &module) const
+ const IAnalysisDataModule &module) const
{
for (int i = 0; i < eDataPropertyNR; ++i)
{
}
void
-AnalysisDataModuleManager::Impl::presentData(AbstractAnalysisData *data,
- AnalysisDataModuleInterface *module)
+AnalysisDataModuleManager::Impl::presentData(AbstractAnalysisData *data,
+ IAnalysisDataModule *module)
{
if (state_ == eNotStarted)
{
"Cannot apply a modules in mid-frame");
module->dataStarted(data);
const bool bCheckMissing = bAllowMissing_
- && !(module->flags() & AnalysisDataModuleInterface::efAllowMissing);
+ && !(module->flags() & IAnalysisDataModule::efAllowMissing);
for (int i = 0; i < data->frameCount(); ++i)
{
AnalysisDataFrameRef frame = data->getDataFrame(i);
"Cannot add a data module in mid-frame");
impl_->presentData(data, module.get());
- if (!(module->flags() & AnalysisDataModuleInterface::efAllowMissing))
+ if (!(module->flags() & IAnalysisDataModule::efAllowMissing))
{
impl_->bAllowMissing_ = false;
}
}
void
-AnalysisDataModuleManager::applyModule(AbstractAnalysisData *data,
- AnalysisDataModuleInterface *module)
+AnalysisDataModuleManager::applyModule(AbstractAnalysisData *data,
+ IAnalysisDataModule *module)
{
impl_->checkModuleProperties(*module);
GMX_RELEASE_ASSERT(impl_->state_ == Impl::eFinished,