Commit b7570fef authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: more cleaning up of deprecated code

parent 35c05d55
...@@ -26,8 +26,11 @@ ...@@ -26,8 +26,11 @@
namespace selx namespace selx
{ {
// Define the accepting interfaces as templated by the providing interface
// All SuperElastix Components inherit from their interfaces classes. The interface classes as defined in
// "selxInterfaces.h" are by default Providing. The InterfaceAcceptor class turns a Providing interface
// into an Accepting interface. For a SuperElastixComponent this differentiation is done by grouping the
// interfaces either in Providing<Interfaces...> or in Accepting<Interfaces...>
template< class InterfaceT > template< class InterfaceT >
class InterfaceAcceptor class InterfaceAcceptor
{ {
...@@ -62,7 +65,6 @@ public: ...@@ -62,7 +65,6 @@ public:
protected: protected:
bool HasInterface(const char *) { return false; }
}; };
...@@ -77,7 +79,6 @@ public: ...@@ -77,7 +79,6 @@ public:
protected: protected:
bool HasInterface( const char * );
}; };
template <typename ... Interfaces> template <typename ... Interfaces>
...@@ -89,8 +90,6 @@ class Providing<> ...@@ -89,8 +90,6 @@ class Providing<>
public: public:
static unsigned int CountMeetsCriteria(const ComponentBase::InterfaceCriteriaType) { return 0; } static unsigned int CountMeetsCriteria(const ComponentBase::InterfaceCriteriaType) { return 0; }
protected: protected:
bool HasInterface( const char * ) { return false; }
}; };
template< typename FirstInterface, typename ... RestInterfaces > template< typename FirstInterface, typename ... RestInterfaces >
...@@ -99,8 +98,6 @@ class Providing< FirstInterface, RestInterfaces ... > : public FirstInterface, p ...@@ -99,8 +98,6 @@ class Providing< FirstInterface, RestInterfaces ... > : public FirstInterface, p
public: public:
static unsigned int CountMeetsCriteria(const ComponentBase::InterfaceCriteriaType); static unsigned int CountMeetsCriteria(const ComponentBase::InterfaceCriteriaType);
protected: protected:
bool HasInterface( const char * );
}; };
//template<typename... Interfaces> //template<typename... Interfaces>
......
...@@ -111,20 +111,6 @@ Accepting< FirstInterface, RestInterfaces ... >::ConnectFromImpl( ComponentBase ...@@ -111,20 +111,6 @@ Accepting< FirstInterface, RestInterfaces ... >::ConnectFromImpl( ComponentBase
} }
template< typename FirstInterface, typename ... RestInterfaces >
bool
Accepting< FirstInterface, RestInterfaces ... >::HasInterface( const char * interfacename )
{
//TODO: check on interface template arguments as well
auto interfaceProperies = Properties< FirstInterface >::Get();
if (interfaceProperies["Name"] == std::string(interfacename))
{
return true;
}
return Accepting< RestInterfaces ... >::HasInterface( interfacename );
}
template< typename FirstInterface, typename ... RestInterfaces > template< typename FirstInterface, typename ... RestInterfaces >
InterfaceStatus InterfaceStatus
Accepting< FirstInterface, RestInterfaces ... >::CanAcceptConnectionFrom(ComponentBase* other, const ComponentBase::InterfaceCriteriaType interfaceCriteria) Accepting< FirstInterface, RestInterfaces ... >::CanAcceptConnectionFrom(ComponentBase* other, const ComponentBase::InterfaceCriteriaType interfaceCriteria)
...@@ -165,21 +151,6 @@ Accepting< FirstInterface, RestInterfaces ... >::CanAcceptConnectionFrom(Compone ...@@ -165,21 +151,6 @@ Accepting< FirstInterface, RestInterfaces ... >::CanAcceptConnectionFrom(Compone
return InterfaceStatus::noaccepter; return InterfaceStatus::noaccepter;
} }
template< typename FirstInterface, typename ... RestInterfaces >
bool
Providing< FirstInterface, RestInterfaces ... >::HasInterface( const char * interfacename )
{
//TODO: check on interface template arguments as well
auto interfaceProperies = Properties< FirstInterface >::Get();
if (interfaceProperies["Name"] == std::string(interfacename))
{
return true;
}
return Providing< RestInterfaces ... >::HasInterface( interfacename );
}
template< typename FirstInterface, typename ... RestInterfaces > template< typename FirstInterface, typename ... RestInterfaces >
unsigned int unsigned int
......
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