16 #ifndef SCENE_LAB_UTIL_H
17 #define SCENE_LAB_UTIL_H
21 #include <unordered_map>
35 std::unordered_map<std::string, time_t> ScanDirectory(
36 const std::string& directory,
const std::string& file_ext);
44 typedef std::function<void(const char* filename)> load_function_t;
45 std::string directory;
46 std::string file_extension;
47 load_function_t load_function;
48 AssetLoader(
const std::string& dir,
const std::string& file_ext,
49 const load_function_t& load_func)
50 : directory(dir), file_extension(file_ext), load_function(load_func) {}
60 const std::vector<AssetLoader>& asset_loaders);
69 const std::string& file_extension,
70 const AssetLoader::load_function_t& load_function);
74 #endif // SCENE_LAB_UTIL_H
AssetLoader struct, basically a tuple of directory, file extension, and loader function.
Definition: util.h:43
time_t LoadAssetsIfNewer(time_t threshold, const std::vector< AssetLoader > &asset_loaders)
Load assets via the designated asset loaders.