 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
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;
virtual void load(BufferReader *reader, const std::string &filename) override
Load assets from the specified reader.
virtual bool willLoad(const std::string &) override
Whether this instance will process or not the specified file.
Abstract buffer handler, processing a BufferReader.
std::vector< AssetLoader * > m_loaders
Registered loaders.
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.
AssetCollector()
Constructor.
the server will also quite happily load unpacked files as long as they have the right file which is convenient if you want to edit your maps and archetypes live It also contains a few files
void processFiles(const std::vector< std::string > &files)
Process a list of files.
void addLoader(AssetLoader *loader)
Register a loader to be called on found files.
virtual ~AssetCollector()
Destructor.
Assets collector, recursing in directories and calling loaders on found files.