X-Git-Url: http://git.tdb.fi/?p=libs%2Fgui.git;a=blobdiff_plain;f=source%2Fgraphics%2Fimageloader.h;h=cb3f54ac204f303afe23e5bfc30b111ece28f33a;hp=9dc17269ef7d8054224492ad792795f0ad133afd;hb=2ebdf45974a0a7649b3488f9da4b8cf90a1db584;hpb=7672cbffb3efd3cce448f85a5e0acd4bed7ec0dd diff --git a/source/graphics/imageloader.h b/source/graphics/imageloader.h index 9dc1726..cb3f54a 100644 --- a/source/graphics/imageloader.h +++ b/source/graphics/imageloader.h @@ -23,6 +23,13 @@ public: class ImageLoader { +public: + enum State + { + INITIAL, + FINISHED + }; + protected: class RegisterBase { @@ -56,6 +63,7 @@ protected: private: IO::Base *source; + State state; protected: ImageLoader(); @@ -65,7 +73,12 @@ public: static ImageLoader *open_file(const std::string &); static ImageLoader *open_io(IO::Seekable &); - virtual void load(Image::Data &) = 0; + virtual void load(Image::Data &); +protected: + virtual void load_(Image::Data &) = 0; + +public: + State get_state() const { return state; } template static void register_loader();