Make extension optional in --export command.

Added add_extension function
Added ExportTemplate::byName
Use ExportTemplate::byName in main
This commit is contained in:
Twan van Laarhoven
2020-04-21 00:23:42 +02:00
parent 59d59e97fd
commit e8e7e10fa0
5 changed files with 25 additions and 3 deletions
+4 -2
View File
@@ -24,7 +24,7 @@ DECLARE_POINTER_TYPE(Package);
/// A template for exporting sets to HTML or text format
class ExportTemplate : public Packaged {
public:
public:
ExportTemplate();
GameP game; ///< Game this template is for
@@ -38,7 +38,9 @@ class ExportTemplate : public Packaged {
virtual String typeName() const;
Version fileVersion() const;
virtual void validate(Version = app_version);
private:
/// Loads the export template with a particular name
static ExportTemplateP byName(const String & name);
private:
DECLARE_REFLECTION();
};