From: Mikko Rasa Date: Tue, 21 Aug 2012 23:15:41 +0000 (+0300) Subject: Change DerivedObjectLoader to take the base loader as template argument X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=2f1bd0bcbdf17a7f1015f4fdf0e4ad8c97eb1966;p=libs%2Fdatafile.git Change DerivedObjectLoader to take the base loader as template argument This makes it much more versatile, as it can now be used to derive from a protected loader or one with a nonstandard name. --- diff --git a/source/objectloader.h b/source/objectloader.h index 5928714..4dcb981 100644 --- a/source/objectloader.h +++ b/source/objectloader.h @@ -40,7 +40,7 @@ Convenience class for loading derived objects. Inherits from the base class loader and shadows its members with ones for the derived type. */ template -class DerivedObjectLoader: public B::Loader +class DerivedObjectLoader: public B { public: typedef O Object; @@ -48,7 +48,7 @@ public: protected: O &obj; - DerivedObjectLoader(O &o): B::Loader(o), obj(o) { } + DerivedObjectLoader(O &o): B(o), obj(o) { } public: O &get_object() const { return obj; }