summaryrefslogtreecommitdiff
path: root/project2/common/rowView.h
blob: 9ba46993e71fd8225dbaaa5b20b5fc1bd91fce33 (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
38
39
40
41
#ifndef ROWVIEW_H
#define ROWVIEW_H

#include <boost/intrusive_ptr.hpp>
#include "rowProcessor.h"
#include "view.h"
#include "aggregate.h"

/// Project2 component to create output based on a records in a row set
class RowView : public View, public RowProcessor {
	public:
		RowView(ScriptNodePtr);
		virtual ~RowView();

		void loadComplete(const CommonObjects *);
		void execute(const MultiRowSetPresenter *) const;
		void rowReady(const RowState *) const;

		const Variable rootName;
		const Variable recordName;
		const Variable required;
		const Variable isObject;

	protected:
		typedef std::map<Glib::ustring, Variable> Columns;
		Columns viewColumns;

		void executeChildren() const;
		typedef ANONSTORAGEOF(View) SubViews;
		SubViews subViews;
		typedef ANONSTORAGEOF(ValueAggregate) ValueAggregates;
		ValueAggregates valueAggregates;
		typedef ANONSTORAGEOF(SetAggregate) SetAggregates;
		SetAggregates setAggregates;
		mutable const MultiRowSetPresenter * presenter;

		mutable bool rowsFound;
};

#endif