Crossfire Server, Trunk
TarLoader.h
Go to the documentation of this file.
1 #ifndef TARLOADER_H
2 #define TARLOADER_H
3 
4 #include "AssetLoader.h"
5 #include "Utils.h"
6 
7 
8 class TarLoader : public AssetLoader {
9 public:
10  TarLoader(AssetLoader *loader);
11  virtual ~TarLoader();
12 
13  virtual bool willLoad(const std::string &filename) override {
14  return Utils::endsWith(filename, ".tar");
15  };
16 
17  virtual void load(BufferReader *reader, const std::string &filename) override;
18 
19 private:
22 };
23 
24 #endif /* TARLOADER_H */
25 
TarLoader::TarLoader
TarLoader(AssetLoader *loader)
Definition: TarLoader.cpp:18
TarLoader::load
virtual void load(BufferReader *reader, const std::string &filename) override
Definition: TarLoader.cpp:45
TarLoader::m_reader
BufferReader * m_reader
Definition: TarLoader.h:20
AssetLoader
Definition: AssetLoader.h:24
npc_dialog.filename
filename
Definition: npc_dialog.py:99
Utils.h
TarLoader::m_loader
AssetLoader * m_loader
Definition: TarLoader.h:21
TarLoader::~TarLoader
virtual ~TarLoader()
Definition: TarLoader.cpp:22
Utils::endsWith
static bool endsWith(const std::string &str, const std::string &with)
Definition: Utils.cpp:16
TarLoader::willLoad
virtual bool willLoad(const std::string &filename) override
Definition: TarLoader.h:13
TarLoader
Definition: TarLoader.h:8
BufferReader
Definition: bufferreader.c:21
AssetLoader.h