template<typename T>
CollectionItemTypeBase *get_type() const;
+ /// Gets a descriptor with the same type as another descriptor.
+ CollectionItemTypeBase *get_type(const CollectionItemTypeBase &) const;
+
/// Returns the descriptor for an item, or null if it's of an unknown type.
CollectionItemTypeBase *get_type_for_item(const Variant &) const;
Creator(FuncPtr f): func(f) { }
virtual T *create(Collection &coll, const std::string &name) const
- { return (static_cast<C &>(coll).*func)(name); }
+ { return (dynamic_cast<C &>(coll).*func)(name); }
};
template<typename B>