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
35c05d55
Commit
35c05d55
authored
Sep 14, 2016
by
Floris Berendsen
Browse files
ENH: removed deprecated code left by refactoring ELX-151
parent
43a16ef0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Modules/Core/ComponentInterface/include/selxComponentBase.h
View file @
35c05d55
...
...
@@ -65,17 +65,11 @@ public:
virtual
bool
MeetsCriterion
(
const
CriterionType
&
criterion
)
=
0
;
virtual
InterfaceStatus
CanAcceptConnectionFrom
(
ComponentBase
*
,
const
InterfaceCriteriaType
)
=
0
;
//virtual InterfaceStatus CanProvideConnectionTo(ComponentBase*, const InterfaceCriteriaType) = 0;
//experimental:
virtual
unsigned
int
CountAcceptingInterfaces
(
const
InterfaceCriteriaType
)
=
0
;
virtual
unsigned
int
CountProvidingInterfaces
(
const
InterfaceCriteriaType
)
=
0
;
protected:
virtual
bool
HasAcceptingInterface
(
const
char
*
)
=
0
;
virtual
bool
HasProvidingInterface
(
const
char
*
)
=
0
;
ComponentBase
()
{}
virtual
~
ComponentBase
()
{}
...
...
Modules/Core/ComponentInterface/include/selxSuperElastixComponent.h
View file @
35c05d55
...
...
@@ -133,20 +133,15 @@ public:
using
AcceptingInterfacesTypeList
=
AcceptingInterfaces
;
using
ProvidingInterfacesTypeList
=
ProvidingInterfaces
;
// todo replace interfacename with interfaceCriteria
virtual
InterfaceStatus
AcceptConnectionFrom
(
const
char
*
,
ComponentBase
*
);
virtual
int
AcceptConnectionFrom
(
ComponentBase
*
);
protected:
virtual
bool
HasAcceptingInterface
(
const
char
*
);
virtual
bool
HasProvidingInterface
(
const
char
*
);
//experimental
virtual
InterfaceStatus
CanAcceptConnectionFrom
(
ComponentBase
*
other
,
const
InterfaceCriteriaType
interfaceCriteria
)
override
;
//virtual InterfaceStatus CanProvideConnectionTo(ComponentBase* other, const InterfaceCriteriaType interfaceCriteria) override;
//
virtual
unsigned
int
CountAcceptingInterfaces
(
const
ComponentBase
::
InterfaceCriteriaType
interfaceCriteria
){
return
AcceptingInterfaces
::
CountMeetsCriteria
(
interfaceCriteria
);
};
virtual
unsigned
int
CountProvidingInterfaces
(
const
ComponentBase
::
InterfaceCriteriaType
interfaceCriteria
){
return
ProvidingInterfaces
::
CountMeetsCriteria
(
interfaceCriteria
);
};
...
...
Modules/Core/ComponentInterface/include/selxSuperElastixComponent.hxx
View file @
35c05d55
...
...
@@ -63,22 +63,6 @@ SuperElastixComponent< AcceptingInterfaces, ProvidingInterfaces >::AcceptConnect
return
AcceptingInterfaces
::
ConnectFromImpl
(
other
);
}
template
<
typename
AcceptingInterfaces
,
typename
ProvidingInterfaces
>
bool
SuperElastixComponent
<
AcceptingInterfaces
,
ProvidingInterfaces
>::
HasAcceptingInterface
(
const
char
*
interfacename
)
{
return
AcceptingInterfaces
::
HasInterface
(
interfacename
);
}
template
<
typename
AcceptingInterfaces
,
typename
ProvidingInterfaces
>
bool
SuperElastixComponent
<
AcceptingInterfaces
,
ProvidingInterfaces
>::
HasProvidingInterface
(
const
char
*
interfacename
)
{
return
ProvidingInterfaces
::
HasInterface
(
interfacename
);
}
template
<
typename
AcceptingInterfaces
,
typename
ProvidingInterfaces
>
InterfaceStatus
SuperElastixComponent
<
AcceptingInterfaces
,
ProvidingInterfaces
>
...
...
Modules/Core/ComponentInterface/src/selxComponentBase.cxx
View file @
35c05d55
...
...
@@ -33,28 +33,6 @@ ComponentBase::MeetsCriterionBase( const CriterionType & criterion )
return
(
criterion
.
second
[
0
]
==
this
->
GetNameOfClass
()
);
}
else
if
(
criterion
.
first
==
"HasAcceptingInterface"
)
{
for
(
const
auto
&
value
:
criterion
.
second
)
{
if
(
this
->
HasAcceptingInterface
(
value
.
c_str
()
)
==
false
)
{
return
false
;
//if there is any failed criterion, return false (like a short-circuit AND)
}
}
return
true
;
}
else
if
(
criterion
.
first
==
"HasProvidingInterface"
)
{
for
(
const
auto
&
value
:
criterion
.
second
)
{
if
(
this
->
HasProvidingInterface
(
value
.
c_str
()
)
==
false
)
{
return
false
;
//if there is any failed criterion, return false (like a short-circuit AND)
}
}
return
true
;
}
// else pass criterion to derived Component
return
this
->
MeetsCriterion
(
criterion
);
}
...
...
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