Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
SuperElastix
Commits
53e9415e
Commit
53e9415e
authored
Aug 31, 2016
by
Floris Berendsen
Browse files
BUG: replaced CanProvideConnectionTo by reversed CanAcceptConnectionFrom
parent
14d67c57
Changes
3
Hide whitespace changes
Inline
Side-by-side
Modules/Core/ComponentInterface/include/selxSuperElastixComponent.h
View file @
53e9415e
...
...
@@ -88,7 +88,6 @@ class Providing<>
{
public:
static
unsigned
int
CountMeetsCriteria
(
const
ComponentBase
::
InterfaceCriteriaType
)
{
return
0
;
}
InterfaceStatus
CanProvideConnectionTo
(
ComponentBase
*
other
,
const
ComponentBase
::
InterfaceCriteriaType
interfaceCriteria
)
{
return
InterfaceStatus
::
noprovider
;
};
protected:
bool
HasInterface
(
const
char
*
)
{
return
false
;
}
...
...
@@ -99,7 +98,6 @@ class Providing< FirstInterface, RestInterfaces ... > : public FirstInterface, p
{
public:
static
unsigned
int
CountMeetsCriteria
(
const
ComponentBase
::
InterfaceCriteriaType
);
InterfaceStatus
CanProvideConnectionTo
(
ComponentBase
*
other
,
const
ComponentBase
::
InterfaceCriteriaType
interfaceCriteria
);
protected:
bool
HasInterface
(
const
char
*
);
...
...
Modules/Core/ComponentInterface/include/selxSuperElastixComponent.hxx
View file @
53e9415e
...
...
@@ -87,13 +87,6 @@ SuperElastixComponent< AcceptingInterfaces, ProvidingInterfaces >
return
AcceptingInterfaces
::
CanAcceptConnectionFrom
(
other
,
interfaceCriteria
);
}
template
<
typename
AcceptingInterfaces
,
typename
ProvidingInterfaces
>
InterfaceStatus
SuperElastixComponent
<
AcceptingInterfaces
,
ProvidingInterfaces
>
::
CanProvideConnectionTo
(
ComponentBase
*
other
,
const
InterfaceCriteriaType
interfaceCriteria
)
{
return
ProvidingInterfaces
::
CanProvideConnectionTo
(
other
,
interfaceCriteria
);
}
//////////////////////////////////////////////////////////////////////////
template
<
typename
FirstInterface
,
typename
...
RestInterfaces
>
InterfaceStatus
...
...
@@ -188,11 +181,6 @@ Accepting< FirstInterface, RestInterfaces ... >::CanAcceptConnectionFrom(Compone
return
InterfaceStatus
::
noaccepter
;
}
template
<
typename
FirstInterface
,
typename
...
RestInterfaces
>
bool
Providing
<
FirstInterface
,
RestInterfaces
...
>::
HasInterface
(
const
char
*
interfacename
)
...
...
Modules/Core/ComponentInterface/src/selxComponentSelector.cxx
View file @
53e9415e
...
...
@@ -80,7 +80,7 @@ unsigned int ComponentSelector::RequireAcceptingInterfaceFrom(ComponentBasePoint
}
unsigned
int
ComponentSelector
::
RequireProvidingInterfaceTo
(
ComponentBasePointer
other
,
const
InterfaceCriteriaType
&
interfaceCriteria
)
{
this
->
m_PossibleComponents
.
remove_if
([
&
](
ComponentBasePointer
component
){
auto
status
=
component
->
CanProvideConnectionTo
(
other
,
interfaceCriteria
);
this
->
m_PossibleComponents
.
remove_if
([
&
](
ComponentBasePointer
component
){
auto
status
=
other
->
CanAcceptConnectionFrom
(
component
,
interfaceCriteria
);
return
status
==
InterfaceStatus
::
noaccepter
||
status
==
InterfaceStatus
::
noprovider
;
});
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment