![]() |
Crossfire Server, Trunk
1.75.0
|
Loader calling a function for files ending with a specific string. More...
#include <WrapperLoader.h>
Inheritance diagram for WrapperLoader:
Collaboration diagram for WrapperLoader:Public Types | |
| typedef std::function< void(BufferReader *, const char *)> | wrapped |
| Wrapper to the function to call for each file. More... | |
Public Member Functions | |
| virtual void | load (BufferReader *reader, const std::string &filename) override |
| Load assets from the specified reader. More... | |
| virtual bool | willLoad (const std::string &filename) override |
| Whether this instance will process or not the specified file. More... | |
| WrapperLoader (const std::string &name, wrapped fct) | |
| Standard construction. More... | |
Public Member Functions inherited from AssetLoader | |
| virtual | ~AssetLoader () |
| Virtual destructor for inheritance. More... | |
Private Attributes | |
| wrapped | m_function |
| Function to call. More... | |
| std::string | m_name |
| File name. More... | |
Loader calling a function for files ending with a specific string.
Definition at line 23 of file WrapperLoader.h.
| typedef std::function<void(BufferReader *, const char *)> WrapperLoader::wrapped |
Wrapper to the function to call for each file.
Definition at line 26 of file WrapperLoader.h.
|
inline |
Standard construction.
| name | suffix to match to load the file. |
| fct | function to call to load the file. |
Definition at line 33 of file WrapperLoader.h.
|
inlineoverridevirtual |
Load assets from the specified reader.
| reader | reader. |
| filename | full filename. |
Implements AssetLoader.
Definition at line 40 of file WrapperLoader.h.
References m_function.
|
inlineoverridevirtual |
Whether this instance will process or not the specified file.
| filename | full file path. |
Implements AssetLoader.
Definition at line 36 of file WrapperLoader.h.
References Utils::endsWith(), and m_name.
Here is the call graph for this function:
|
private |
|
private |