diff options
Diffstat (limited to 'project2/common/rowProcessor.h')
-rw-r--r-- | project2/common/rowProcessor.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/project2/common/rowProcessor.h b/project2/common/rowProcessor.h new file mode 100644 index 0000000..c25dc73 --- /dev/null +++ b/project2/common/rowProcessor.h @@ -0,0 +1,37 @@ +#ifndef ROWPROCESSOR_H +#define ROWPROCESSOR_H + +#include <glibmm/ustring.h> +#include "sourceObject.h" +#include "iHaveParameters.h" +#include "rowSet.h" +#include "cache.h" +#include "xmlStorage.h" + +class Presenter; + +/// Base class for Project2 components that work with row sets +class RowProcessor : public IHaveParameters { + public: + RowProcessor(const xmlpp::Element *); + void loadComplete(const CommonObjects *); + + const std::string recordSource; + const Glib::ustring filter; + + protected: + boost::intrusive_ptr<RowSet> source; + void execute() const; + + private: + friend class RowState; + void rowReadyInternal(const RowState *) const; + virtual void rowReady(const RowState *) const = 0; + typedef ANONORDEREDSTORAGEOF(Cache) Caches; + Caches caches; + typedef std::set<PresenterPtr> TargetCaches; + mutable TargetCaches tc; +}; + +#endif + |