summaryrefslogtreecommitdiff
path: root/project2/rowProcessor.h
blob: c25dc7335a152871cc57fae063b4c7c9d4d14da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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