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

Merge branch 'ELASTIX-24-Component-Interface-Handshake' of...

Merge branch 'ELASTIX-24-Component-Interface-Handshake' of https://github.com/kaspermarstal/SuperElastix into ELASTIX-24-Component-Interface-Handshake

Conflicts:
	Modules/Core/ComponentInterface/GDOptimizer4thPartyComponent.cxx
	Modules/Core/ComponentInterface/Interfaces.hxx
parents 0cfbed64 c4ad123a
PROJECT(componenthandshake)
cmake_minimum_required(VERSION 2.8)
cmake_policy(VERSION 2.8)
ADD_DEFINITIONS(
-std=c++11
)
#set(CMAKE_CXX_STANDARD 11)
file(GLOB componenthandshake_SRC
"*.h"
"*.cxx"
......
#ifndef ComponentBase_h
#define ComponentBase_h
#include <iostream>
#include <cstring>
namespace elx
{
enum interfaceStatus { success, noaccepter, noprovider };
......
......@@ -15,7 +15,6 @@ GDOptimizer4thPartyComponent::~GDOptimizer4thPartyComponent()
delete this->MetricObject;
}
int GDOptimizer4thPartyComponent::Set(MetricValueInterface* component)
{
this->MetricObject->SetMetricValueComponent(component);
......
......@@ -2,6 +2,7 @@
#define Interfaces_hxx
#include "ComponentBase.h"
#include <typeinfo>
namespace elx
{
......@@ -38,9 +39,6 @@ private:
bool isSet;
};
template<typename ... RestInterfaces>
class Accepting
{
......@@ -55,9 +53,6 @@ public:
interfaceStatus ConnectFromImpl(const char *, ComponentBase*);
};
template<typename... Interfaces>
class Providing : public Interfaces...
{
......@@ -67,9 +62,7 @@ template<typename AcceptingInterfaces, typename ProvidingInterfaces>
class Implements : public AcceptingInterfaces, public ProvidingInterfaces, public ComponentBase
{
public:
virtual interfaceStatus ConnectFrom(const char *, ComponentBase*);
//typedef typename AcceptingInterfaces AcceptingInterfacesType;
//typedef typename ProvidingInterfaces ProvidingInterfacesType;
virtual interfaceStatus ConnectFrom(const char *, ComponentBase*);
};
......
......@@ -15,10 +15,10 @@ using namespace elx;
{
std::cout << InterfaceName<MetricValueInterface>::Get() << std::endl;
std::cout << AcceptorInterfaceName<InterfaceAcceptor<MetricValueInterface>>::Get() << std::endl;
std::cout << AcceptorInterfaceName<InterfaceAcceptor<MetricValueInterface> >::Get() << std::endl;
std::cout << InterfaceName<InterfaceAcceptor<MetricValueInterface>>::Get() << std::endl;
std::cout << InterfaceName<InterfaceProvider<MetricValueInterface>>::Get() << std::endl;
std::cout << InterfaceName<InterfaceAcceptor<MetricValueInterface> >::Get() << std::endl;
std::cout << InterfaceName<InterfaceProvider<MetricValueInterface> >::Get() << std::endl;
}
......
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