ctkLDAPSearchFilter.cpp

Go to the documentation of this file.
00001 /*=============================================================================
00002 
00003   Library: CTK
00004 
00005   Copyright (c) 2010 German Cancer Research Center,
00006     Division of Medical and Biological Informatics
00007 
00008   Licensed under the Apache License, Version 2.0 (the "License");
00009   you may not use this file except in compliance with the License.
00010   You may obtain a copy of the License at
00011 
00012     http://www.apache.org/licenses/LICENSE-2.0
00013 
00014   Unless required by applicable law or agreed to in writing, software
00015   distributed under the License is distributed on an "AS IS" BASIS,
00016   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017   See the License for the specific language governing permissions and
00018   limitations under the License.
00019 
00020 =============================================================================*/
00021 
00022 #include "ctkLDAPSearchFilter.h"
00023 
00024 
00025   class ctkLDAPSearchFilterPrivate {
00026   public:
00027 
00028     ctkLDAPSearchFilterPrivate()
00029       : ref(1)
00030     {}
00031 
00032     QAtomicInt ref;
00033 
00034   };
00035 
00036   ctkLDAPSearchFilter::ctkLDAPSearchFilter(const QString& filter)
00037     : d(new ctkLDAPSearchFilterPrivate())
00038   {
00039 
00040   }
00041 
00042   ctkLDAPSearchFilter::ctkLDAPSearchFilter(const ctkLDAPSearchFilter& filter)
00043     : d(filter.d)
00044   {
00045     d->ref.ref();
00046   }
00047 
00048   ctkLDAPSearchFilter::~ctkLDAPSearchFilter()
00049   {
00050     if (!d->ref.deref())
00051       delete d;
00052   }
00053 
00054   bool ctkLDAPSearchFilter::match(const Dictionary& dictionary) const
00055   {
00056     return true;
00057   }
00058 
00059   bool ctkLDAPSearchFilter::matchCase(const Dictionary& dictionary) const
00060   {
00061     return true;
00062   }
00063 
00064   bool ctkLDAPSearchFilter::operator==(const ctkLDAPSearchFilter& other) const
00065   {
00066     // TODO
00067     return true;
00068   }
00069 
00070   ctkLDAPSearchFilter& ctkLDAPSearchFilter::operator=(const ctkLDAPSearchFilter& filter)
00071   {
00072     if (d != filter.d)
00073     {
00074       if (!d->ref.deref())
00075         delete d;
00076 
00077       d = filter.d;
00078       d->ref.ref();
00079     }
00080 
00081     return *this;
00082 
00083 
00084 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1