summaryrefslogtreecommitdiff
path: root/libsql/osqlbackend.cpp
authorzecke <zecke>2002-08-27 20:17:50 (UTC)
committer zecke <zecke>2002-08-27 20:17:50 (UTC)
commit86352e32f449ecf00de254674b7dcac72bc34a14 (patch) (unidiff)
treeb5803b69ca00dceea1e2a76a5eee390f0748f27e /libsql/osqlbackend.cpp
parent1398b50ffc193bc9ab69ebe198aeda847c39516e (diff)
downloadopie-86352e32f449ecf00de254674b7dcac72bc34a14.zip
opie-86352e32f449ecf00de254674b7dcac72bc34a14.tar.gz
opie-86352e32f449ecf00de254674b7dcac72bc34a14.tar.bz2
Initial check in of the light wrapper library
around normal SQL The first driver implementation is a SQLite version
Diffstat (limited to 'libsql/osqlbackend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libsql/osqlbackend.cpp73
1 files changed, 73 insertions, 0 deletions
diff --git a/libsql/osqlbackend.cpp b/libsql/osqlbackend.cpp
new file mode 100644
index 0000000..d6c39a9
--- a/dev/null
+++ b/libsql/osqlbackend.cpp
@@ -0,0 +1,73 @@
1
2#include "osqlbackend.h"
3
4
5OSQLBackEnd::OSQLBackEnd( const QString& name,
6 const QString& vendor,
7 const QString& license,
8 const QCString& lib )
9 : m_name( name), m_vendor( vendor), m_license( license ), m_lib( lib )
10{
11 m_default = false;
12 m_pref = -1;
13}
14OSQLBackEnd::OSQLBackEnd( const OSQLBackEnd& back ) {
15 (*this) = back;
16}
17OSQLBackEnd::~OSQLBackEnd() {
18}
19bool OSQLBackEnd::operator==( const OSQLBackEnd& other ) {
20 if ( m_pref != other.m_pref ) return false;
21 if ( m_default != other.m_default ) return false;
22 if ( m_name != other.m_name ) return false;
23 if ( m_vendor != other.m_vendor ) return false;
24 if ( m_license != other.m_license ) return false;
25 if ( m_lib != other.m_lib ) return false;
26
27 return true;
28}
29OSQLBackEnd &OSQLBackEnd::operator=(const OSQLBackEnd& back ) {
30 m_name = back.m_name;
31 m_vendor = back.m_vendor;
32 m_license = back.m_license;
33 m_lib = back.m_lib;
34 m_pref = back.m_pref;
35 m_default = back.m_default;
36 return *this;
37}
38QString OSQLBackEnd::name() const {
39 return m_name;
40}
41QString OSQLBackEnd::vendor() const {
42 return m_vendor;
43}
44QString OSQLBackEnd::license() const {
45 return m_license;
46}
47QCString OSQLBackEnd::library() const {
48 return m_lib;
49}
50bool OSQLBackEnd::isDefault()const {
51 return m_default;
52}
53int OSQLBackEnd::preference()const {
54 return m_pref;
55}
56void OSQLBackEnd::setName( const QString& name ) {
57 m_name = name;
58}
59void OSQLBackEnd::setVendor( const QString& vendor ) {
60 m_vendor = vendor;
61}
62void OSQLBackEnd::setLicense( const QString & license ) {
63 m_license = license;
64}
65void OSQLBackEnd::setLibrary( const QCString& lib ) {
66 m_lib = lib;
67}
68void OSQLBackEnd::setDefault( bool def) {
69 m_default = def;
70}
71void OSQLBackEnd::setPreference( int pref ) {
72 m_pref = pref;
73}