Crossfire Server, Trunk
|
#include <WrapperLoader.h>
Public Types | |
typedef std::function< void(BufferReader *, const char *)> | wrapped |
Public Member Functions | |
virtual void | load (BufferReader *reader, const std::string &filename) override |
virtual bool | willLoad (const std::string &filename) override |
WrapperLoader (const std::string &name, wrapped fct) | |
Public Member Functions inherited from AssetLoader | |
virtual | ~AssetLoader () |
Private Attributes | |
wrapped | m_function |
std::string | m_name |
Loader calling a function for files ending with a specific string.
Definition at line 25 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 28 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 35 of file WrapperLoader.h.
|
inlineoverridevirtual |
Load assets from the specified reader.
reader | reader. |
filename | full filename. |
Implements AssetLoader.
Definition at line 42 of file WrapperLoader.h.
References npc_dialog::filename, and m_function.
|
inlineoverridevirtual |
Whether this instance will process or not the specified file.
filename | full file path. |
Implements AssetLoader.
Definition at line 38 of file WrapperLoader.h.
References Utils::endsWith(), npc_dialog::filename, and m_name.
|
private |
|
private |