From ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 21 Feb 2023 01:25:34 +0000 Subject: Support for loading objects, uses and model factories from an XML resource --- assetFactory/modelFactory.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'assetFactory/modelFactory.h') diff --git a/assetFactory/modelFactory.h b/assetFactory/modelFactory.h index f2b1b48..94db055 100644 --- a/assetFactory/modelFactory.h +++ b/assetFactory/modelFactory.h @@ -1,12 +1,19 @@ #pragma once +#include "persistence.h" #include "shape.h" +#include -class ModelFactory { +class ModelFactory : public Persistence::Persistable { public: using Shapes = std::map>; ModelFactory(); + [[nodiscard]] static std::shared_ptr loadXML(const std::filesystem::path &); Shapes shapes; + +private: + friend Persistence::SelectionPtrBase, true>; + bool persist(Persistence::PersistenceStore & store) override; }; -- cgit v1.2.3