blob: 0049e9dceaa916010c09938d2a0e46afa76414f6 (
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
|
#include "view.h"
#include "presenter.h"
class ViewGroup : public View {
public:
ViewGroup(ScriptNodePtr s) :
SourceObject(s),
View(s)
{
s->script->loader.addLoadTarget(s, Storer::into<ElementLoader>(&subViews));
}
void execute(const MultiRowSetPresenter * presenter, ExecContext * ec) const
{
presenter->addNewRowSet(name);
for (const SubViews::value_type & sq : subViews) {
sq->execute(presenter, ec);
}
presenter->finishRowSet();
}
typedef ANONORDEREDSTORAGEOF(View) SubViews;
SubViews subViews;
};
DECLARE_LOADER("viewgroup", ViewGroup);
|