From: Mikko Rasa Date: Mon, 12 Apr 2021 11:53:59 +0000 (+0300) Subject: Deprecate LoadableTypeRegistry X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=6b702cdd97e3788d3bf07a6c3b6004c653e1eaa7;p=libs%2Fdatafile.git Deprecate LoadableTypeRegistry The general-purpose TypeRegistry in mspcore solves the same problems better. --- diff --git a/source/loadabletyperegistry.h b/source/loadabletyperegistry.h index 7b027cd..2cf7d6f 100644 --- a/source/loadabletyperegistry.h +++ b/source/loadabletyperegistry.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -14,9 +15,11 @@ namespace DataFile { Associates types with keywords for adding to a Loader. The target Loader class must be given as a template parameter, as well as a helper template struct to handle the actual adding of keywords. + +Deprecated; use TypeRegistry from mspcore instead. */ template class A> -class LoadableTypeRegistry: private NonCopyable +class DEPRECATED LoadableTypeRegistry: private NonCopyable { private: class TypeBase @@ -53,6 +56,8 @@ public: void add_all(L &) const; }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" template class A> LoadableTypeRegistry::~LoadableTypeRegistry() { @@ -76,6 +81,7 @@ void LoadableTypeRegistry::add_all(L &ldr) const for(typename TypeMap::const_iterator i=types.begin(); i!=types.end(); ++i) i->second->add(ldr); } +#pragma GCC diagnostic pop } // namespace DataFile } // namespace Msp