Commit 35c05d55 authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: removed deprecated code left by refactoring ELX-151

parent 43a16ef0
......@@ -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() {}
......
......@@ -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); };
......
......@@ -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 >
......
......@@ -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 );
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment