diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-02-21 01:25:34 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-02-21 01:25:34 +0000 |
commit | ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585 (patch) | |
tree | 810350a653292d54621b7c4e72275bcd48dc6785 /assetFactory/modelFactory.h | |
parent | Add missing override (diff) | |
download | ilt-ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585.tar.bz2 ilt-ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585.tar.xz ilt-ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585.zip |
Support for loading objects, uses and model factories from an XML resource
Diffstat (limited to 'assetFactory/modelFactory.h')
-rw-r--r-- | assetFactory/modelFactory.h | 9 |
1 files changed, 8 insertions, 1 deletions
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 <filesystem> -class ModelFactory { +class ModelFactory : public Persistence::Persistable { public: using Shapes = std::map<std::string, Shape::CPtr, std::less<>>; ModelFactory(); + [[nodiscard]] static std::shared_ptr<ModelFactory> loadXML(const std::filesystem::path &); Shapes shapes; + +private: + friend Persistence::SelectionPtrBase<std::shared_ptr<ModelFactory>, true>; + bool persist(Persistence::PersistenceStore & store) override; }; |