+protected:
+ template<typename T>
+ struct Property
+ {
+ T value;
+ const Texture *texture;
+
+ Property(): value(T()), texture(0) { }
+ };
+
+ template<typename C>
+ class LoaderBase: public DataFile::CollectionObjectLoader<Material>
+ {
+ protected:
+ LoaderBase(C &m): CollectionObjectLoader<Material>(m, 0) { }
+ LoaderBase(C &m, Collection &c): CollectionObjectLoader<Material>(m, &c) { }
+
+ void add_property(const std::string &, void (C::*)(float), void (C::*)(const Texture *));
+ void add_property(const std::string &, void (C::*)(const Color &), void (C::*)(const Texture *), bool);
+ void add_property(const std::string &, void (C::*)(const Texture *));
+
+ void property_value_scalar(void (C::*)(float), float);
+ void property_value_rgb(void (C::*)(const Color &), float, float, float);
+ void property_value_rgba(void (C::*)(const Color &), float, float, float, float);
+ void property_value_srgb(void (C::*)(const Color &), float, float, float);
+ void property_value_srgb_alpha(void (C::*)(const Color &), float, float, float, float);
+ void property_texture(void (C::*)(const Texture *), const std::string &);
+ };
+