ctkServiceReference.h

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 #ifndef CTKSERVICEREFERENCE_H
00023 #define CTKSERVICEREFERENCE_H
00024 
00025 #include <QVariant>
00026 
00027 #include "ctkPlugin.h"
00028 
00029 #include "CTKPluginFrameworkExport.h"
00030 
00031 
00032   class ctkServiceRegistrationPrivate;
00033   class ctkServiceReferencePrivate;
00034 
00064   class CTK_PLUGINFW_EXPORT ctkServiceReference {
00065 
00066     Q_DECLARE_PRIVATE(ctkServiceReference)
00067 
00068   public:
00069 
00070     ~ctkServiceReference();
00071 
00089     QVariant getProperty(const QString& key) const;
00090 
00110     QStringList getPropertyKeys() const;
00111 
00126     ctkPlugin* getPlugin() const;
00127 
00137     QList<ctkPlugin*> getUsingPlugins() const;
00138 
00165     bool operator<(const ctkServiceReference& reference) const;
00166 
00167     bool operator==(const ctkServiceReference& reference) const;
00168 
00169 
00170   protected:
00171 
00172     friend class ctkServiceRegistrationPrivate;
00173     friend class ctkPluginContext;
00174 
00175     ctkServiceReference(ctkServiceRegistrationPrivate* reg);
00176 
00177     ctkServiceReferencePrivate * const d_ptr;
00178 
00179   };
00180 
00181 
00182 #endif // CTKSERVICEREFERENCE_H
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines