/*============================================================================= Library: CTK Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =============================================================================*/ #ifndef CTKPLUGINTRACKERPRIVATE_H #define CTKPLUGINTRACKERPRIVATE_H #include "ctkPlugin.h" #include #include /** * \ingroup PluginFramework */ template class ctkPluginTrackerPrivate { public: ctkPluginTrackerPrivate(ctkPluginTracker* pt, ctkPluginContext* context, ctkPlugin::States stateMask, ctkPluginTrackerCustomizer* customizer); ~ctkPluginTrackerPrivate(); /** * Accessor method for the current ctkTrackedPlugin object. This method is only * intended to be used by the unsynchronized methods which do not modify the * trackedPlugin field. * * @return The current ctkTrackedPlugin object. */ QSharedPointer > tracked() const; /* set this to true to compile in debug messages */ static const bool DEBUG; // = false; /** * The Bundle Context used by this ctkPluginTracker. */ ctkPluginContext* const context; /** * The ctkPluginTrackerCustomizer object for this tracker. */ ctkPluginTrackerCustomizer* customizer; /** * Tracked plugins: ctkPlugin object -> customized Object and * plugin listener slot. */ QSharedPointer > trackedPlugin; /** * State mask for plugins being tracked. This field contains the ORed values * of the plugin states being tracked. */ ctkPlugin::States mask; mutable QMutex mutex; private: inline ctkPluginTracker* q_func() { return static_cast *>(q_ptr); } inline const ctkPluginTracker* q_func() const { return static_cast *>(q_ptr); } friend class ctkPluginTracker; ctkPluginTracker * const q_ptr; }; #include "ctkPluginTrackerPrivate.tpp" #endif // CTKPLUGINTRACKERPRIVATE_H