+ virtual void load_item(Collection &, Parser &, const std::string &) const
+ {
+ throw std::runtime_error("this type cannot be loaded");
+ }
+
+ virtual void notify_item(const std::string &name, const Variant &var) const
+ {
+ RefPtr<T> obj = var.value<RefPtr<T> >();
+ for(const auto &n: notify_funcs)
+ n(name, *obj);
+ }
+};
+
+
+template<typename T>
+class LoadableCollectionItemType: public CollectionItemType<T>
+{
+public:
+ virtual void add_to_loader(Collection::Loader &loader) const
+ { loader.add(this->kwd, &Collection::Loader::item<T, T>); }
+