1 #ifndef COLLECTIONSOURCE_H_
2 #define COLLECTIONSOURCE_H_
11 class CollectionItemTypeBase;
14 Provides automatically loadable objects for collections. This is a base class;
15 see DirectorySource and PackSource for concrete classes.
17 class CollectionSource
20 typedef std::list<std::string> NameList;
23 CollectionSource() { }
27 virtual bool is_loadable(const CollectionItemTypeBase &type, const std::string &name) const = 0;
29 /** Returns the names of loadable objects of a specific type. Implementors
30 should use the keyword and/or suffixes of the type to */
31 virtual NameList get_names(const CollectionItemTypeBase &type) const = 0;
33 virtual void load(Collection &, const CollectionItemTypeBase &, const std::string &) const = 0;
36 } // namespace DataFile