Page MenuHomePhabricator

Macros expecting being within mitk namespace
Closed, ResolvedPublic

Description

Macros such as CONNECT_FUNCTION, CONNECT_CONDITION expect that they are called while working within the mitk namespace. If this condition is not met, then compilation errors arise. Changing MessageDelegate2 to ::mitk::MessageDelegate2 and similar for other classes can fix this problem without need for additional changes to other mitk code (mitkEventStateMachine.h).

Similarly the parameter to the mitkCheckOperationTypeMacro expects the OperationType parameter to be a class within the mitk namespace. Therefore this macro isn't usable for classes outside mitk namespace. It would make sense to me if this macro doesn't make such assumptions and does not implicitly try the conversion to mitk::OperationType instead of simply OperationType (mitkOperationActor.h).

Event Timeline

User brehler has pushed new remote branch:

bug-16848-connect-macros-expect-mitk-namespace

@Michael Can you please also look at the mitkCheckOperationTypeMacro mentioned in the second paragraph. Maybe ask Christian for help.

User webechr has pushed new remote branch:

bug-16848-CheckOp-macros-expect-mitk-namespace

User zelzer has pushed new remote branch:

bug-16848-interaction-macros-expect-mitk-namespace

[642317]: Merge branch 'bug-16848-interaction-macros-expect-mitk-namespace'

Merged commits:

2014-09-12 03:37:17 Sascha Zelzer [5f9ad2]
Do not assume mitk namespace for macro arguments.


2014-09-12 03:25:15 Sascha Zelzer [c0e055]
Merge remote-tracking branch 'origin/bug-16848-CheckOp-macros-expect-mitk-namespace' into bug-16848-interaction-macros-expect-mitk-namespace

Conflicts:
Modules/Ext/DataManagement/mitkSeedsImage.cpp


2014-09-12 03:24:15 Sascha Zelzer [c0be5a]
Merge remote-tracking branch 'origin/bug-16848-connect-macros-expect-mitk-namespace' into bug-16848-interaction-macros-expect-mitk-namespace


2014-04-30 14:19:08 Christian Weber [8a2940]
move mitk namespace statement out marco declaration,
to allow external users to use the macro with non-mitk namespace objects


2014-04-16 18:18:40 Rostislav Khlebnikov [8a53f4]
Simple fix for T16848 - added ::mitk:: prefix where necessary

Signed-off-by: Rostislav Khlebnikov <r.khlebnikov@gmail.com>