#pragma once #include "asset.h" #include "persistence.h" #include "shape.h" #include class AssetFactory : public Persistence::Persistable { public: using Shapes = std::map>; using Assets = std::map>; using Colour = glm::vec3; using ColourAlpha = glm::vec4; using Colours = std::map>; AssetFactory(); [[nodiscard]] static std::shared_ptr loadXML(const std::filesystem::path &); [[nodiscard]] ColourAlpha parseColour(std::string_view) const; Shapes shapes; Assets assets; Colours colours; static Colours parseX11RGB(const char * rgbtxtpath); static void normalizeColourName(std::string &); private: friend Persistence::SelectionPtrBase>; bool persist(Persistence::PersistenceStore & store) override; };