summaryrefslogtreecommitdiff
path: root/assetFactory/assetFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'assetFactory/assetFactory.h')
-rw-r--r--assetFactory/assetFactory.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/assetFactory/assetFactory.h b/assetFactory/assetFactory.h
new file mode 100644
index 0000000..5cf90dd
--- /dev/null
+++ b/assetFactory/assetFactory.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "persistence.h"
+#include "shape.h"
+#include <filesystem>
+
+class AssetFactory : public Persistence::Persistable {
+public:
+ using Shapes = std::map<std::string, Shape::CPtr, std::less<>>;
+
+ AssetFactory();
+ [[nodiscard]] static std::shared_ptr<AssetFactory> loadXML(const std::filesystem::path &);
+
+ Shapes shapes;
+
+private:
+ friend Persistence::SelectionPtrBase<std::shared_ptr<AssetFactory>, true>;
+ bool persist(Persistence::PersistenceStore & store) override;
+};