DbPlugin Class ReferenceDatabase plugin loader.
More...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| void | close () |
| Unloads library. | |
| Database * | createHandle () const throw (Exception) |
| Creates new Database object. | |
| DbPlugin (const char *pFilename) throw (Exception) | |
| Loads library from path. | |
| DbPlugin () | |
| Default constructor creates empty plugin (with no library loaded). | |
| void | destroyHandle (Database *pDb) |
| Destroys Database object. | |
| dbaPluginInfo | getInfo () const throw (Exception) |
| Loads plugin information. | |
| void | load (const char *pFilename) throw (Exception) |
| Loads library from path. | |
| virtual | ~DbPlugin () |
| Destructor. | |
Detailed Description
Database plugin loader.Loads plugin library and unloads it upon destruction. Usage:
try { DbPlugin* plugin = new DbPlugin("libsqlite3"); Database* db(plugin->createHandle()); DbConnection* conn = db->getConnection(); [...] delete conn; delete db; } catch (const dba::Exception& ex) { //error handling code }; //cleanup only when all created databases and connections are deleted delete plugin;
Constructor & Destructor Documentation
Loads library from path.
- Parameters:
-
pFilename OS specific path to library name
Member Function Documentation
| dbaPluginInfo getInfo | ( | ) | const throw (Exception) |
Loads plugin information.
- Returns:
- pluginInfo structure that contains version, vendor and license information
| void load | ( | const char * | pFilename | ) | throw (Exception) |
Loads library from path.
- Parameters:
-
pFilename OS specific path to library name
The documentation for this class was generated from the following file:
| Documentation |
|---|
| Quick start |
| Examples |
| API Documentation |
|---|
| Class hierarchy |
| Member index |
| API Reference |
| Store filters |
| Store table macros |
Generated by doxygen at Fri Oct 22 23:15:43 2010
