diff options
Diffstat (limited to 'assetFactory/modelFactory.cpp')
| -rw-r--r-- | assetFactory/modelFactory.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/assetFactory/modelFactory.cpp b/assetFactory/modelFactory.cpp deleted file mode 100644 index 2642900..0000000 --- a/assetFactory/modelFactory.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "modelFactory.h" -#include "cuboid.h" -#include "cylinder.h" -#include "modelFactoryMesh_fwd.h" -#include "object.h" -#include "plane.h" -#include "saxParse-persistence.h" -#include <filesystem.h> - -ModelFactory::ModelFactory() : - shapes { - {"plane", std::make_shared<Plane>()}, - {"cuboid", std::make_shared<Cuboid>()}, - {"cylinder", std::make_shared<Cylinder>()}, - } -{ -} - -std::shared_ptr<ModelFactory> -ModelFactory::loadXML(const std::filesystem::path & filename) -{ - filesystem::FileStar file {filename.c_str(), "r"}; - return Persistence::SAXParsePersistence {}.loadState<std::shared_ptr<ModelFactory>>(file); -} - -bool -ModelFactory::persist(Persistence::PersistenceStore & store) -{ - using MapObjects = Persistence::MapByMember<Shapes, Object>; - return STORE_TYPE && STORE_NAME_HELPER("object", shapes, MapObjects); -} |
