27 #include "../../common/Translator.h" 
   32 #include <boost/format.hpp> 
   34 std::map<std::string, te::da::DataSourceFactory::FactoryFnctType>
 
   39   std::map<std::string, FactoryFnctType>::const_iterator it = 
sm_factories.find(dsType);
 
   42     throw Exception((boost::format(
TR_DATAACCESS(
"Could not find a data source factory named: %1!")) % dsType).str());
 
   51   std::map<std::string, FactoryFnctType>::const_iterator it = sm_factories.find(dsType);
 
   53   return (it != sm_factories.end());
 
   58   std::map<std::string, FactoryFnctType>::const_iterator it = sm_factories.find(dsType);
 
   60   if(it != sm_factories.end())
 
   61     throw Exception((boost::format(
TR_DATAACCESS(
"A data source factory with name '%1' is already registered.")) % dsType).str());
 
   63   sm_factories[dsType] = f;
 
   68   std::map<std::string, FactoryFnctType>::iterator it = sm_factories.find(dsType);
 
   70   if(it == sm_factories.end())
 
   71     throw Exception((boost::format(
TR_DATAACCESS(
"There is no registered data source factory named '%1'.")) % dsType).str());
 
   73   sm_factories.erase(it);
 
A factory for data sources. 
 
static std::map< std::string, FactoryFnctType > sm_factories
 
static std::auto_ptr< DataSource > make(const std::string &dsType)
 
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
 
static bool find(const std::string &dsType)
 
#define TR_DATAACCESS(message)
It marks a string in order to get translated. This is a special mark used in the DataAccess module of...
 
static void remove(const std::string &dsType)
 
boost::function< DataSource *()> FactoryFnctType
 
static void add(const std::string &dsType, FactoryFnctType f)