#ifndef AssetDatabase_h__ #define AssetDatabase_h__ #include #include #include #include "AssetMetadata.h" #include "AssetImporter.h" #include "AssetFile.h" class AssetDatabase{ public: static AssetDatabase& get() { static AssetDatabase instance; return instance; } static std::wstring asset_to_meta_path(const std::wstring& asset_path); Guid file_to_guid(const std::wstring& path) const; std::shared_ptr open_asset_file(const std::wstring& path); void set_root_path(const std::wstring& path); static void register_importer(std::shared_ptr importer); std::shared_ptr find_importer(const std::wstring& asset_path) const; std::shared_ptr LoadReference(const AssetFileLink& link); std::shared_ptr OpenArchive(Guid guid); std::shared_ptr LoadObject(AssetFileLink link); std::vector> load_all_objects(std::shared_ptr asset); private: std::vector> open_archives; AssetDatabase(); std::vector> _importers; }; #endif // AssetDatabase_h__