aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/Model/Template/Template_RTTI.cpp
blob: 40403abc82bfbe42bc3faefbab2ce63d083c5cc6 (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 "Template.hpp"

#include <Cplt/Model/Template/TableTemplate.hpp>
#include <Cplt/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;
}