| 123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include "CContainer.h"
- #include <filesystem>
- #include <stdexcept>
- #include <vector>
- namespace WallpaperEngine::Assets {
- /**
- * A meta-container that allows backgrounds to have files spread across different containers
- */
- class CCombinedContainer final : public CContainer {
- public:
- CCombinedContainer ();
- /**
- * Adds a container to the list
- *
- * @param container
- */
- void add (CContainer* container);
- /**
- * Adds the given package to the list
- *
- * @param path
- */
- void addPkg (const std::filesystem::path& path);
- /** @inheritdoc */
- [[nodiscard]] std::filesystem::path resolveRealFile (const std::string& filename) const override;
- /** @inheritdoc */
- [[nodiscard]] const uint8_t* readFile (const std::string& filename, uint32_t* length) const override;
- private:
- /** The list of containers to search files off from */
- std::vector<CContainer*> m_containers;
- };
- }; // namespace WallpaperEngine::Assets
|