summaryrefslogtreecommitdiff
path: root/project2/common/rowView.h
blob: d2745db11a4b28f6a1d00b47b0c67b7825869878 (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
#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 *, ExecContext *) const;
		void rowReady(const RowState *, const MultiRowSetPresenter *, ExecContext *, bool & found) 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 MultiRowSetPresenter * presenter, ExecContext *) const;
		typedef ANONORDEREDSTORAGEOF(View) SubViews;
		SubViews subViews;
		typedef ANONSTORAGEOF(ValueAggregate) ValueAggregates;
		ValueAggregates valueAggregates;
		typedef ANONSTORAGEOF(SetAggregate) SetAggregates;
		SetAggregates setAggregates;
};

#endif