23 #include "usServiceListenerEntry_p.h"
24 #include "usServiceListenerHook_p.h"
30 class ServiceListenerEntryData :
public ServiceListenerHook::ListenerInfoData
35 void* data,
const std::string& filter)
36 : ServiceListenerHook::ListenerInfoData(mc, l, data, filter)
42 ldap = LDAPExpr(filter);
46 ~ServiceListenerEntryData()
71 LDAPExpr::LocalCache local_cache;
73 std::size_t hashValue;
78 ServiceListenerEntryData(
const ServiceListenerEntryData&);
79 ServiceListenerEntryData& operator=(
const ServiceListenerEntryData&);
82 ServiceListenerEntry::ServiceListenerEntry(
const ServiceListenerEntry& other)
83 : ServiceListenerHook::ListenerInfo(other)
87 ServiceListenerEntry::ServiceListenerEntry(
const ServiceListenerHook::ListenerInfo&
info)
88 : ServiceListenerHook::ListenerInfo(info)
93 ServiceListenerEntry::~ServiceListenerEntry()
97 ServiceListenerEntry& ServiceListenerEntry::operator=(
const ServiceListenerEntry& other)
103 void ServiceListenerEntry::SetRemoved(
bool removed)
const
105 d->bRemoved = removed;
109 void* data,
const std::string& filter)
110 : ServiceListenerHook::ListenerInfo(new ServiceListenerEntryData(mc, l, data, filter))
114 const LDAPExpr& ServiceListenerEntry::GetLDAPExpr()
const
116 return static_cast<ServiceListenerEntryData*
>(d.Data())->ldap;
119 LDAPExpr::LocalCache& ServiceListenerEntry::GetLocalCache()
const
121 return static_cast<ServiceListenerEntryData*
>(d.Data())->local_cache;
124 void ServiceListenerEntry::CallDelegate(
const ServiceEvent& event)
const
131 return ((d->mc == NULL || other.d->mc == NULL) || d->mc == other.d->mc) &&
132 (d->data == other.d->data) && ServiceListenerCompare()(d->listener, other.d->listener);
137 using namespace US_HASH_FUNCTION_NAMESPACE;
139 if (static_cast<ServiceListenerEntryData*>(d.Data())->hashValue == 0)
141 static_cast<ServiceListenerEntryData*
>(d.Data())->hashValue =
145 return static_cast<ServiceListenerEntryData*
>(d.Data())->hashValue;
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
static void info(const char *fmt,...)
US_BEGIN_NAMESPACE typedef US_SERVICE_LISTENER_FUNCTOR ServiceListener
US_HASH_FUNCTION_NAMESPACE_BEGIN return arg Hash()
US_MSVC_POP_WARNING US_HASH_FUNCTION_NAMESPACE_BEGIN return US_HASH_FUNCTION(us::ServiceRegistrationBasePrivate *, arg.d)