OpenMW
apps/openmw/mwworld/contentloader.hpp
Go to the documentation of this file.
00001 #ifndef CONTENTLOADER_HPP
00002 #define CONTENTLOADER_HPP
00003 
00004 #include <iosfwd>
00005 #include <iostream>
00006 #include <boost/filesystem/path.hpp>
00007 
00008 #include "components/loadinglistener/loadinglistener.hpp"
00009 
00010 namespace MWWorld
00011 {
00012 
00013 struct ContentLoader
00014 {
00015     ContentLoader(Loading::Listener& listener)
00016       : mListener(listener)
00017     {
00018     }
00019 
00020     virtual ~ContentLoader()
00021     {
00022     }
00023 
00024     virtual void load(const boost::filesystem::path& filepath, int& index)
00025     {
00026       std::cout << "Loading content file " << filepath.string() << std::endl;
00027       mListener.setLabel(filepath.string());
00028     }
00029 
00030     protected:
00031         Loading::Listener& mListener;
00032 };
00033 
00034 } /* namespace MWWorld */
00035 
00036 #endif /* CONTENTLOADER_HPP */