Kooky
cDBInterface Class Referenceabstract

This is the base class for all database connector plugins. More...

#include <cdbinterface.h>

+ Inheritance diagram for cDBInterface:
+ Collaboration diagram for cDBInterface:

Public Member Functions

 cDBInterface ()
 Constructor. More...
 
virtual ~cDBInterface ()
 Destructor. More...
 
virtual bool connect ()=0
 Opens a connection to the database. More...
 
virtual bool init ()=0
 Initializes the module with default values. More...
 
bool connected ()
 Returns the current connection status. More...
 
QString lastError ()
 Returns the last error message of the last operation. More...
 
- Public Member Functions inherited from cInterface
virtual qint16 pluginAPIVersion ()=0
 Returns the version of the API. More...
 
virtual QString pluginName ()=0
 Returns the name of the plugin. More...
 
virtual qint16 pluginVersion ()=0
 Version of the plugin. More...
 
virtual iType pluginType ()=0
 Returns the type of the plugin. More...
 
virtual bool config ()=0
 Calls the configuration dialog (if any). More...
 

Protected Attributes

bool m_bConnected
 

Additional Inherited Members

- Public Types inherited from cInterface
enum  iType { iTypeImport = 0, iTypeExport = 1, iTypeDB = 2 }
 Defines the type of the interface. More...
 

Detailed Description

This class implements basic interface functionality for all Kooky database connector plugins. All functions may be overwritten by derriving classes.

Note
Author
Herwig Birke
Version
1.0
Date
2016/02/09

Constructor & Destructor Documentation

cDBInterface::cDBInterface ( )
inline
virtual cDBInterface::~cDBInterface ( )
inlinevirtual

References connect(), and init().

+ Here is the call graph for this function:

Member Function Documentation

virtual bool cDBInterface::connect ( )
pure virtual
Note
This function must be derived by the subclass.
Returns
bool true on success, false otherwise.

Implemented in cMySQLPlugin, and cSQLitePlugin.

Referenced by ~cDBInterface().

+ Here is the caller graph for this function:

bool cDBInterface::connected ( )
inline
Note
This function must be derived by the subclass.
Returns
bool true if connected, false otherwise.

References m_bConnected.

virtual bool cDBInterface::init ( )
pure virtual
Note
This function must be derived by the subclass.
Returns
bool true on success, false otherwise.

Implemented in cMySQLPlugin, and cSQLitePlugin.

Referenced by cMainWindow::pluginDBTriggered(), and ~cDBInterface().

+ Here is the caller graph for this function:

QString cDBInterface::lastError ( )
inline
Returns
QString error message of the last operation.

Member Data Documentation

bool cDBInterface::m_bConnected
protected

The documentation for this class was generated from the following file: