From cd7e0db07c335f259e2048c5af64e45dc91b9303 Mon Sep 17 00:00:00 2001 From: Stuart James <chedburgh@gmail.com> Date: Thu, 9 Apr 2020 15:13:08 +0200 Subject: [PATCH] Another missing bit... --- include/hdb++/AbstractDB.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/hdb++/AbstractDB.h b/include/hdb++/AbstractDB.h index 860d08b..8c4535d 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 -- GitLab