7 #ifndef HOST_DATA_SOURCE_FACTORY_H
8 #define HOST_DATA_SOURCE_FACTORY_H
13 #include <boost/scoped_ptr.hpp>
95 const std::string& dbaccess,
bool if_unusable =
true);
101 typedef std::function<HostDataSourcePtr (const db::DatabaseConnection::ParameterMap&)>
Factory;
115 const Factory& factory,
bool no_log =
false);
127 bool no_log =
false);
144 static std::map<std::string, Factory> map_;
static bool deregisterFactory(const std::string &db_type, bool no_log=false)
Deregister a host data source factory.
static bool registerFactory(const std::string &db_type, const Factory &factory, bool no_log=false)
Register a host data source factory.
static bool registeredFactory(const std::string &db_type)
Check if a host data source factory was registered.
std::function< HostDataSourcePtr(const db::DatabaseConnection::ParameterMap &)> Factory
Type of host data source factory.
Host Data Source Factory.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
static void printRegistered()
Prints out all registered backends.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
static void add(HostDataSourceList &sources, const std::string &dbaccess)
Create and add an instance of a host data source.
static bool del(HostDataSourceList &sources, const std::string &db_type)
Delete a host data source.
std::vector< HostDataSourcePtr > HostDataSourceList
HostDataSource list.
No host data source instance exception.
NoHostDataSourceManager(const char *file, size_t line, const char *what)