2013-09-29 07:11:57 +00:00
|
|
|
#ifndef CONTENTLOADER_HPP
|
|
|
|
#define CONTENTLOADER_HPP
|
|
|
|
|
|
|
|
#include <boost/filesystem/path.hpp>
|
2017-08-25 10:05:56 +00:00
|
|
|
#include <MyGUI_TextIterator.h>
|
2013-09-29 07:11:57 +00:00
|
|
|
|
2018-08-14 19:05:43 +00:00
|
|
|
#include <components/debug/debuglog.hpp>
|
2013-09-29 07:11:57 +00:00
|
|
|
#include "components/loadinglistener/loadinglistener.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
|
|
|
|
struct ContentLoader
|
|
|
|
{
|
|
|
|
ContentLoader(Loading::Listener& listener)
|
|
|
|
: mListener(listener)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~ContentLoader()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void load(const boost::filesystem::path& filepath, int& index)
|
|
|
|
{
|
2018-08-14 19:05:43 +00:00
|
|
|
Log(Debug::Info) << "Loading content file " << filepath.string();
|
|
|
|
mListener.setLabel(MyGUI::TextIterator::toTagsString(filepath.string()));
|
2013-09-29 07:11:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Loading::Listener& mListener;
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace MWWorld */
|
|
|
|
|
|
|
|
#endif /* CONTENTLOADER_HPP */
|