AbstractAnalysisData module handling into a separate class.
Move all logic related to maintaining the list of attached modules,
checking their compatibility with the data, and notifying them from
AbstractAnalysisData into a separate AnalysisDataModuleManager class.
AbstractAnalysisData now contains an instance of this class, and
provires a moduleManager() protected method for derived classes to
access it.
Module notification methods are no longer responsible of keeping the
frame count. Instead, made the frameCount() method pure virtual and
added a method in AnalysisDataStorage to conveniently implement this
method.
Moved the responsibility of calling all data notification methods into
AnalysisDataStorage (including notifyDataStart() and
notifyDataFinish()). This allows modules that use AnalysisDataStorage to
not even know of the implementation details of the module manager.
Improved the semantics of setColumnCount() etc. such that they now
immediately check the compatibility of data modules and throw if there
is a problem.
Rationale:
- Remove implementation details from the installed abstractdata.h
header: AbstractAnalysisData is one of the main public interfaces in
the module, and it exposed unnecessary complexity in the header. Now
only the subclasses that actually need it see these details.
In particular with #869, the module notification interface is only
going to get more complex.
- Reduce the responsibilities of AbstractAnalysisData: now it only
keeps track of the dimensionality of the data (and notifies the
module manager of relevant changes). Now it is closer to a pure
interface, which is possibly should be.
- Makes it possible to remove friendship between AbstractAnalysisData
and AnalysisDataStorage. This allows further simplification in
datastorage.cpp.
Related to #869.
Change-Id: Ic42d4b27bb6d1e445e3f74aa06ae52b354bf4403
18 files changed: