13 #ifndef ASSETCOLLECTOR_H 14 #define ASSETCOLLECTOR_H 45 void collect(
const std::string& directory);
47 virtual bool willLoad(
const std::string &)
override {
51 virtual void load(
BufferReader *reader,
const std::string &filename)
override;
61 void processFiles(
const std::vector<std::string> &files);
void processFiles(const std::vector< std::string > &files)
Process a list of files.
Assets collector, recursing in directories and calling loaders on found files.
void collect(const std::string &directory)
Recurse in the specified directory, finding all files and calling loaders to process them...
BufferReader * m_reader
Reader used to load files.
virtual void load(BufferReader *reader, const std::string &filename) override
Load assets from the specified reader.
virtual ~AssetCollector()
Destructor.
void addLoader(AssetLoader *loader)
Register a loader to be called on found files.
AssetCollector()
Constructor.
virtual bool willLoad(const std::string &) override
Whether this instance will process or not the specified file.
std::vector< AssetLoader * > m_loaders
Registered loaders.
Abstract buffer handler, processing a BufferReader.