00001 00002 #include "osqlbackend.h" 00003 00004 namespace Opie { 00005 namespace DB { 00006 00007 00008 OSQLBackEnd::OSQLBackEnd( const QString& name, 00009 const QString& vendor, 00010 const QString& license, 00011 const QCString& lib ) 00012 : m_name( name), m_vendor( vendor), m_license( license ), m_lib( lib ) 00013 { 00014 m_default = false; 00015 m_pref = -1; 00016 } 00017 OSQLBackEnd::OSQLBackEnd( const OSQLBackEnd& back ) { 00018 (*this) = back; 00019 } 00020 OSQLBackEnd::~OSQLBackEnd() { 00021 } 00022 bool OSQLBackEnd::operator==( const OSQLBackEnd& other ) { 00023 if ( m_pref != other.m_pref ) return false; 00024 if ( m_default != other.m_default ) return false; 00025 if ( m_name != other.m_name ) return false; 00026 if ( m_vendor != other.m_vendor ) return false; 00027 if ( m_license != other.m_license ) return false; 00028 if ( m_lib != other.m_lib ) return false; 00029 00030 return true; 00031 } 00032 OSQLBackEnd &OSQLBackEnd::operator=(const OSQLBackEnd& back ) { 00033 m_name = back.m_name; 00034 m_vendor = back.m_vendor; 00035 m_license = back.m_license; 00036 m_lib = back.m_lib; 00037 m_pref = back.m_pref; 00038 m_default = back.m_default; 00039 return *this; 00040 } 00041 QString OSQLBackEnd::name() const { 00042 return m_name; 00043 } 00044 QString OSQLBackEnd::vendor() const { 00045 return m_vendor; 00046 } 00047 QString OSQLBackEnd::license() const { 00048 return m_license; 00049 } 00050 QCString OSQLBackEnd::library() const { 00051 return m_lib; 00052 } 00053 bool OSQLBackEnd::isDefault()const { 00054 return m_default; 00055 } 00056 int OSQLBackEnd::preference()const { 00057 return m_pref; 00058 } 00059 void OSQLBackEnd::setName( const QString& name ) { 00060 m_name = name; 00061 } 00062 void OSQLBackEnd::setVendor( const QString& vendor ) { 00063 m_vendor = vendor; 00064 } 00065 void OSQLBackEnd::setLicense( const QString & license ) { 00066 m_license = license; 00067 } 00068 void OSQLBackEnd::setLibrary( const QCString& lib ) { 00069 m_lib = lib; 00070 } 00071 void OSQLBackEnd::setDefault( bool def) { 00072 m_default = def; 00073 } 00074 void OSQLBackEnd::setPreference( int pref ) { 00075 m_pref = pref; 00076 } 00077 00078 00079 } 00080 }
1.4.2