summaryrefslogtreecommitdiff
path: root/assetFactory/modelFactory.h
blob: 94db055a29c4d961f560ce5cd3fa825fa57951a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include "persistence.h"
#include "shape.h"
#include <filesystem>

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;
};