X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdirectorycollection.h;h=a796054b43569d4892e919ec5a337c4daba25409;hb=8955db30f9cd1c1566b349da29e669f065f84e36;hp=e9a946332c767d0831afced78f4f981c593037cc;hpb=eed15dceed29d1bb378082e08114ea81005203c1;p=libs%2Fdatafile.git diff --git a/source/directorycollection.h b/source/directorycollection.h index e9a9463..a796054 100644 --- a/source/directorycollection.h +++ b/source/directorycollection.h @@ -13,9 +13,6 @@ A Collection that can automatically load items from files in a directory. class DirectoryCollection: public Collection { private: - template::value> - class ItemLoader; - std::list dirs; public: @@ -25,6 +22,10 @@ protected: void set_directory(const FS::Path &); void add_directory(const FS::Path &); + /** Examines the names of files in the designated directories and adds any + applicable ones as future objects. */ + void load_names(); + template CollectionItemType &add_type() { @@ -53,24 +54,6 @@ protected: bool lookup_file(const std::string &, FS::Path &) const; }; -template -class DirectoryCollection::ItemLoader: public T::Loader -{ -public: - ItemLoader(T &o, Collection &): - T::Loader(o) - { } -}; - -template -class DirectoryCollection::ItemLoader: public T::Loader -{ -public: - ItemLoader(T &o, Collection &c): - T::Loader(o, dynamic_cast(c)) - { } -}; - } // namespace DataFile } // namespace Msp