Gromacs
5.1
|
Private implementation class for AnalysisDataModuleManager.
Classes | |
struct | ModuleInfo |
Stores information about an attached module. More... | |
Public Types | |
enum | State { eNotStarted, eInData, eInFrame, eFinished } |
Describes the current state of the notification methods. More... | |
typedef std::vector< ModuleInfo > | ModuleList |
Shorthand for list of modules added to the data. | |
Public Member Functions | |
void | checkModuleProperty (const AnalysisDataModuleInterface &module, DataProperty property, bool bSet) const |
Checks whether a module is compatible with a given data property. More... | |
void | checkModuleProperties (const AnalysisDataModuleInterface &module) const |
Checks whether a module is compatible with the data properties. More... | |
void | presentData (AbstractAnalysisData *data, AnalysisDataModuleInterface *module) |
Present data already added to the data object to a module. More... | |
Public Attributes | |
ModuleList | modules_ |
List of modules added to the data. | |
bool | bDataProperty_ [eDataPropertyNR] |
Properties of the owning data for module checking. | |
bool | bAllowMissing_ |
true if all modules support missing data. | |
bool | bSerialModules_ |
true if there are modules that do not support parallel processing. | |
bool | bParallelModules_ |
true if there are modules that support parallel processing. | |
State | state_ |
Current state of the notification methods. More... | |
int | currIndex_ |
Index of currently active frame or the next frame if not in frame. | |
Describes the current state of the notification methods.
Enumerator | |
---|---|
eNotStarted |
Initial state (nothing called). |
eInData |
notifyDataStart() called, no frame in progress. |
eInFrame |
notifyFrameStart() called, but notifyFrameFinish() not. |
eFinished |
notifyDataFinish() called. |
void gmx::AnalysisDataModuleManager::Impl::checkModuleProperties | ( | const AnalysisDataModuleInterface & | module | ) | const |
Checks whether a module is compatible with the data properties.
[in] | module | Module to check. |
APIError | if module is not compatible with the data. |
Does not currently check the actual data (e.g., missing values), but only the dimensionality and other preset properties of the data.
void gmx::AnalysisDataModuleManager::Impl::checkModuleProperty | ( | const AnalysisDataModuleInterface & | module, |
DataProperty | property, | ||
bool | bSet | ||
) | const |
Checks whether a module is compatible with a given data property.
[in] | module | Module to check. |
[in] | property | Property to check. |
[in] | bSet | Value of the property to check against. |
APIError | if module is not compatible with the data. |
void gmx::AnalysisDataModuleManager::Impl::presentData | ( | AbstractAnalysisData * | data, |
AnalysisDataModuleInterface * | module | ||
) |
Present data already added to the data object to a module.
[in] | data | Data object to read data from. |
[in] | module | Module to present the data to. |
APIError | if module is not compatible with the data. |
APIError | if all data is not available through getDataFrame(). |
unspecified | Any exception thrown by module in its data notification methods. |
Uses getDataFrame() in data
to access all data in the object, and calls the notification functions in module
as if the module had been registered to the data object when the data was added.
|
mutable |
Current state of the notification methods.
This is used together with currIndex_ for sanity checks on the input data; invalid call sequences trigger asserts. The state of these variables does not otherwise affect the behavior of this class; this is the reason they can be changed in const methods.Whether notifyDataStart() has been called.