author | mickeyl <mickeyl> | 2003-08-10 15:40:31 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-08-10 15:40:31 (UTC) |
commit | 616e919ff6aea6a30e18edb37128c229e806beae (patch) (unidiff) | |
tree | 31e36f7d631b3dc55460aefd05bc6a455e73ace1 /libopie2/opiedb/osqlbackend.cpp | |
parent | dfcbe21d8b263c13283e226bd16596c2d7c2f9a3 (diff) | |
download | opie-616e919ff6aea6a30e18edb37128c229e806beae.zip opie-616e919ff6aea6a30e18edb37128c229e806beae.tar.gz opie-616e919ff6aea6a30e18edb37128c229e806beae.tar.bz2 |
merge zeckes libsql into libopie2
Diffstat (limited to 'libopie2/opiedb/osqlbackend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiedb/osqlbackend.cpp | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqlbackend.cpp b/libopie2/opiedb/osqlbackend.cpp new file mode 100644 index 0000000..d6c39a9 --- a/dev/null +++ b/libopie2/opiedb/osqlbackend.cpp | |||
@@ -0,0 +1,73 @@ | |||
1 | |||
2 | #include "osqlbackend.h" | ||
3 | |||
4 | |||
5 | OSQLBackEnd::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 | } | ||
14 | OSQLBackEnd::OSQLBackEnd( const OSQLBackEnd& back ) { | ||
15 | (*this) = back; | ||
16 | } | ||
17 | OSQLBackEnd::~OSQLBackEnd() { | ||
18 | } | ||
19 | bool 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 | } | ||
29 | OSQLBackEnd &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 | } | ||
38 | QString OSQLBackEnd::name() const { | ||
39 | return m_name; | ||
40 | } | ||
41 | QString OSQLBackEnd::vendor() const { | ||
42 | return m_vendor; | ||
43 | } | ||
44 | QString OSQLBackEnd::license() const { | ||
45 | return m_license; | ||
46 | } | ||
47 | QCString OSQLBackEnd::library() const { | ||
48 | return m_lib; | ||
49 | } | ||
50 | bool OSQLBackEnd::isDefault()const { | ||
51 | return m_default; | ||
52 | } | ||
53 | int OSQLBackEnd::preference()const { | ||
54 | return m_pref; | ||
55 | } | ||
56 | void OSQLBackEnd::setName( const QString& name ) { | ||
57 | m_name = name; | ||
58 | } | ||
59 | void OSQLBackEnd::setVendor( const QString& vendor ) { | ||
60 | m_vendor = vendor; | ||
61 | } | ||
62 | void OSQLBackEnd::setLicense( const QString & license ) { | ||
63 | m_license = license; | ||
64 | } | ||
65 | void OSQLBackEnd::setLibrary( const QCString& lib ) { | ||
66 | m_lib = lib; | ||
67 | } | ||
68 | void OSQLBackEnd::setDefault( bool def) { | ||
69 | m_default = def; | ||
70 | } | ||
71 | void OSQLBackEnd::setPreference( int pref ) { | ||
72 | m_pref = pref; | ||
73 | } | ||