#ifndef ASSET_MANAGER_H #define ASSET_MANAGER_H #include "asset.h" #include namespace vb01{ class AbstractAssetReader; class AssetManager{ public: static AssetManager* getSingleton(); void readDir(std::string, std::vector&, bool); void load(std::string, bool = false); void editAsset(std::string, Asset&); Asset* getAsset(std::string); std::vector getAssets(std::vector); inline std::vector getImageFormats(){return imageFormats;} inline std::vector getShaderFormats(){return shaderFormats;} inline std::vector getModelFormats(){return modelFormats;} inline std::vector getFontFormats(){return fontFormats;} inline Asset* getAsset(int i){return assets[i];} inline std::vector getAssets(){return assets;} inline int getNumAssets(){return assets.size();} private: AssetManager(){} std::vector assets; const std::vector imageFormats = std::vector{"png", "jpeg", "jpg"}; const std::vector shaderFormats = std::vector{"vert", "frag", "geo"}; const std::vector modelFormats = std::vector{"xml"}; const std::vector fontFormats = std::vector{"ttf"}; }; } #endif