summaryrefslogtreecommitdiff
path: root/assetFactory/assetFactory.h
blob: 5cf90ddafa31af5df682e9b5ac6a88c4422bf97b (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 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;
};