00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef DATASOURCE_CACHE_HPP
00026 #define DATASOURCE_CACHE_HPP
00027
00028
00029 #include <map>
00030
00031 #include <boost/shared_ptr.hpp>
00032
00033 #include <mapnik/utils.hpp>
00034 #include <mapnik/params.hpp>
00035 #include <mapnik/plugin.hpp>
00036 #include <mapnik/datasource.hpp>
00037
00038 namespace mapnik {
00039 class MAPNIK_DECL datasource_cache :
00040 public singleton <datasource_cache,CreateStatic>
00041 {
00042 friend class CreateStatic<datasource_cache>;
00043 private:
00044 datasource_cache();
00045 ~datasource_cache();
00046 datasource_cache(const datasource_cache&);
00047 datasource_cache& operator=(const datasource_cache&);
00048 static std::map<std::string,boost::shared_ptr<PluginInfo> > plugins_;
00049 static bool registered_;
00050 static bool insert(const std::string& name,const lt_dlhandle module);
00051 public:
00052 static void register_datasources(const std::string& path);
00053 static boost::shared_ptr<datasource> create(parameters const& params);
00054 };
00055 }
00056
00057 #endif //DATASOURCE_CACHE_HPP