--- /dev/null
+#ifndef COLLECTIONSOURCE_H_
+#define COLLECTIONSOURCE_H_
+
+#include <list>
+#include <string>
+
+namespace Msp {
+namespace DataFile {
+
+class Collection;
+class CollectionItemTypeBase;
+
+/**
+Provides automatically loadable objects for collections. This is a base class;
+see DirectorySource and PackSource for concrete classes.
+*/
+class CollectionSource
+{
+public:
+ typedef std::list<std::string> NameList;
+
+protected:
+ CollectionSource() { }
+
+public:
+ /** Determines */
+ virtual bool is_loadable(const CollectionItemTypeBase &type, const std::string &name) const = 0;
+
+ /** Returns the names of loadable objects of a specific type. Implementors
+ should use the keyword and/or suffixes of the type to */
+ virtual NameList get_names(const CollectionItemTypeBase &type) const = 0;
+
+ virtual void load(Collection &, const CollectionItemTypeBase &, const std::string &) const = 0;
+};
+
+} // namespace DataFile
+} // namespace Msp
+
+#endif