aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Template/Template_RTTI.cpp
blob: d1affe7d6a44f4bce2e35d33ffe5ce56240a2a59 (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
#include "Template.hpp"

#include "Model/Template/TableTemplate.hpp"
#include "Utils/I18n.hpp"

const char* Template::FormatKind(Kind kind)
{
	switch (kind) {
		case KD_Table: return I18N_TEXT("Table template", L10N_TEMPLATE_TABLE);

		case InvalidKind: break;
	}
	return "";
}

std::unique_ptr<Template> Template::CreateByKind(Kind kind)
{
	switch (kind) {
		case KD_Table: return std::make_unique<TableTemplate>();

		case InvalidKind: break;
	}
	return nullptr;
}

bool Template::IsInstance(const Template* tmpl)
{
	return true;
}