#ifndef CONTENT_PACKS_MANAGER_H_ #define CONTENT_PACKS_MANAGER_H_ #include "ContentPack.h" #include #include #include namespace fs = std::filesystem; class PacksManager { std::unordered_map packs; std::vector sources; public: PacksManager(); /// @brief Set content packs sources (search folders) void setSources(std::vector sources); /// @brief Scan sources and collect all found packs excluding duplication. /// Scanning order depends on sources order void scan(); /// @brief Get all found packs std::vector getAllNames(); /// @brief Resolve all dependencies and fix packs order /// @param names required packs (method can add extra packs) /// @return resulting ordered vector of pack names /// @throws contentpack_error if required dependency not found or /// circular dependency detected std::vector assembly(const std::vector& names); }; #endif // CONTENT_PACKS_MANAGER_H_