]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/directorycollection.h
Simplify loading collection items
[libs/datafile.git] / source / directorycollection.h
index cbaffd65532d048735edabaef6610533ced96c01..a796054b43569d4892e919ec5a337c4daba25409 100644 (file)
@@ -13,9 +13,6 @@ A Collection that can automatically load items from files in a directory.
 class DirectoryCollection: public Collection
 {
 private:
-       template<typename T, bool = NeedsCollection<typename T::Loader>::value>
-       class ItemLoader;
-
        std::list<FS::Path> dirs;
 
 public:
@@ -57,24 +54,6 @@ protected:
        bool lookup_file(const std::string &, FS::Path &) const;
 };
 
-template<typename T>
-class DirectoryCollection::ItemLoader<T, false>: public T::Loader
-{
-public:
-       ItemLoader(T &o, Collection &):
-               T::Loader(o)
-       { }
-};
-
-template<typename T>
-class DirectoryCollection::ItemLoader<T, true>: public T::Loader
-{
-public:
-       ItemLoader(T &o, Collection &c):
-               T::Loader(o, dynamic_cast<typename T::Loader::Collection &>(c))
-       { }
-};
-
 } // namespace DataFile
 } // namespace Msp