+ std::string kwd;
+ std::vector<std::string> suffixes;
+ std::vector<ExtractorBase *> extractors;
+
+ CollectionItemTypeBase() = default;
+public:
+ virtual ~CollectionItemTypeBase();
+
+protected:
+ void set_keyword(const std::string &);
+ void add_suffix(const std::string &);
+public:
+ const std::string &get_keyword() const { return kwd; }
+ bool match_name(const std::string &) const;
+ virtual bool is_same_type(const CollectionItemTypeBase &) const = 0;
+ virtual bool check_item_type(const Variant &) const = 0;
+ virtual void add_to_loader(Collection::Loader &) const = 0;
+ virtual bool can_create() const = 0;
+ virtual void create_item(Collection &, const std::string &) const = 0;
+ virtual void load_item(Collection &, Parser &, const std::string &) const = 0;
+ virtual void notify_item(const std::string &, const Variant &) const = 0;
+
+ template<typename T>
+ bool can_extract() const
+ {
+ for(ExtractorBase *e: extractors)
+ if(dynamic_cast<Extractor<T> *>(e))
+ return true;
+ return false;