diff --git a/include/hdb++/AbstractDB.h b/include/hdb++/AbstractDB.h index 860d08b6883e37a83a2e1075442735607be70ffe..8c4535dd7d58ef04161f9897aa296dab75850a76 100644 --- a/include/hdb++/AbstractDB.h +++ b/include/hdb++/AbstractDB.h @@ -96,5 +96,16 @@ public: virtual bool supported(HdbppFeatures feature) = 0; }; +// Abstract factory class that backend must implement to help create an instance +// of the storage class deriving from AbstractDB +class DBFactory +{ +public: + // Create a backend database object, and return it as a pointer + virtual AbstractDB *create_db(const string &id, const std::vector<std::string> &configuration) = 0; + virtual ~DBFactory() {}; +}; + } // namespace hdbpp + #endif // _HDBPP_ABSTRACTDB_H