diff --git a/Core/CppMicroServices/src/service/usServiceListenerHook.cpp b/Core/CppMicroServices/src/service/usServiceListenerHook.cpp index b9245ddde3..aad095f852 100644 --- a/Core/CppMicroServices/src/service/usServiceListenerHook.cpp +++ b/Core/CppMicroServices/src/service/usServiceListenerHook.cpp @@ -1,92 +1,96 @@ /*============================================================================= Library: CppMicroServices 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. =============================================================================*/ #include "usServiceListenerHook.h" #include "usServiceListenerHook_p.h" US_BEGIN_NAMESPACE ServiceListenerHook::~ServiceListenerHook() { } ServiceListenerHook::ListenerInfoData::ListenerInfoData( ModuleContext* mc, const ServiceListenerEntry::ServiceListener& l, void* data, const std::string& filter) : mc(mc) , listener(l) , data(data) , filter(filter) , bRemoved(false) { } +ServiceListenerHook::ListenerInfoData::~ListenerInfoData() +{ +} + ServiceListenerHook::ListenerInfo::ListenerInfo(ListenerInfoData* data) : d(data) { } ServiceListenerHook::ListenerInfo::ListenerInfo() : d(NULL) { } ServiceListenerHook::ListenerInfo::ListenerInfo(const ListenerInfo& other) : d(other.d) { } ServiceListenerHook::ListenerInfo::~ListenerInfo() { } ServiceListenerHook::ListenerInfo& ServiceListenerHook::ListenerInfo::operator=(const ListenerInfo& other) { d = other.d; return *this; } bool ServiceListenerHook::ListenerInfo::IsNull() const { return !d; } ModuleContext* ServiceListenerHook::ListenerInfo::GetModuleContext() const { return d->mc; } std::string ServiceListenerHook::ListenerInfo::GetFilter() const { return d->filter; } bool ServiceListenerHook::ListenerInfo::IsRemoved() const { return d->bRemoved; } bool ServiceListenerHook::ListenerInfo::operator==(const ListenerInfo& other) const { return d == other.d; } US_END_NAMESPACE diff --git a/Core/CppMicroServices/src/service/usServiceListenerHook_p.h b/Core/CppMicroServices/src/service/usServiceListenerHook_p.h index 704d5d9206..322090519b 100644 --- a/Core/CppMicroServices/src/service/usServiceListenerHook_p.h +++ b/Core/CppMicroServices/src/service/usServiceListenerHook_p.h @@ -1,43 +1,45 @@ /*=================================================================== BlueBerry Platform Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef USSERVICELISTENERHOOK_P_H #define USSERVICELISTENERHOOK_P_H #include #include "usServiceListenerHook.h" #include "usServiceListenerEntry_p.h" #include "usSharedData.h" US_BEGIN_NAMESPACE class ServiceListenerHook::ListenerInfoData : public SharedData { public: ListenerInfoData(ModuleContext* mc, const ServiceListenerEntry::ServiceListener& l, void* data, const std::string& filter); + virtual ~ListenerInfoData(); + ModuleContext* const mc; ServiceListenerEntry::ServiceListener listener; void* data; std::string filter; bool bRemoved; }; US_END_NAMESPACE #endif // USSERVICELISTENERHOOK_P_H