LiteSQL
plugin.hpp
1 #ifndef PLUGIN_HPP
2 #define PLUGIN_HPP
3 
4 #include "sharedlibrary.hpp"
5 namespace litesql {
6  class Backend;
7 
8 class Plugin {
9  typedef Backend* (*fpCreateBackend)(const std::string& param);
10  typedef void (*fpDeleteBackend)(litesql::Backend* backend);
11 
12  friend class PluginLoader;
13 public:
14  virtual ~Plugin();
15 
16  static Plugin* load(const char* libname);
17  Backend* create(const std::string& parameter);
18  void destroy(Backend* pBackend);
19 protected:
20  Plugin(SharedLibrary* sharedLib,
21  void* fCreate,
22  void* fDestroy );
23 private:
24 
25  void* m_fCreate = nullptr;
26  void* m_fDestroy = nullptr;
27  SharedLibrary* m_sharedLib = nullptr;
28 };
29 }
30 #endif // #ifndef PLUGIN_HPP
31 
contains the ability to load symbols from shared Libraries on *NIX and OSX or dynamic link Libraries ...
Definition: sharedlibrary.hpp:20
An abstract base class for interfacing with relational databases.
Definition: backend.hpp:20
Definition: plugin.hpp:8

SourceForge.net Logo