diff options
author | rtk0c <[email protected]> | 2022-06-30 21:38:53 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-06-30 21:38:53 -0700 |
commit | 7fe47a9d5b1727a61dc724523b530762f6d6ba19 (patch) | |
tree | e95be6e66db504ed06d00b72c579565bab873277 /app/source/Cplt/Model/Template/Template_RTTI.cpp | |
parent | 2cf952088d375ac8b2f45b144462af0953436cff (diff) |
Restructure project
Diffstat (limited to 'app/source/Cplt/Model/Template/Template_RTTI.cpp')
-rw-r--r-- | app/source/Cplt/Model/Template/Template_RTTI.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/source/Cplt/Model/Template/Template_RTTI.cpp b/app/source/Cplt/Model/Template/Template_RTTI.cpp new file mode 100644 index 0000000..a96680b --- /dev/null +++ b/app/source/Cplt/Model/Template/Template_RTTI.cpp @@ -0,0 +1,29 @@ +#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; +} |