Page MenuHomePhabricator

US_DECLARE_SERVICE_INTERFACE macro expects manual inclusion of US_BASECLASS_HEADER for QT modules
Closed, ResolvedPublic

Description

When you want to provide a service from your MITK module which is QT enabled, the US_DECLARE_SERVICE_INTERFACE macro expands to code which uses dynamic casts to US_BASECLASS_NAME (itkLightObject).

In case you register your service as interface to an implementation you usually don't need to include itkLightObject.h to declare your interface. This is implementation detail.

In order to successfully compile your module you have to include <itkLightObject.h> (directly or indirectly) before using the US_DECLARE_SERVICE_INTERFACE macro. However, the macro should include US_BASECLASS_HEADER itself.

Event Timeline

[0a9caf]: Merge branch 'bug-13198-hide-baseclass-header'

Merged commits:

2012-09-26 14:42:56 Sascha Zelzer [f5b112]
Include the service base class header in usServiceInterface.h

[3603b9]: Merge branch 'bug-13198-hide-baseclass-header'

Merged commits:

2012-09-26 18:38:39 Sascha Zelzer [e4b532]
COMP: Added missing include directory for test code.