diff --git a/Modules/Core/ComponentInterface/CmakeLists.txt b/Modules/Core/ComponentInterface/CMakeLists.txt similarity index 76% rename from Modules/Core/ComponentInterface/CmakeLists.txt rename to Modules/Core/ComponentInterface/CMakeLists.txt index e55d74a204adbae5c57332adc49f0f3a963b54d2..1eb65d8d0370331e841b5d9372422098f7d696bf 100644 --- a/Modules/Core/ComponentInterface/CmakeLists.txt +++ b/Modules/Core/ComponentInterface/CMakeLists.txt @@ -1,6 +1,10 @@ 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" diff --git a/Modules/Core/ComponentInterface/ComponentBase.h b/Modules/Core/ComponentInterface/ComponentBase.h index 934d9660478526f346e3ac662d3860b69a4bc55c..77571d97e4efa5c3a988015cef84a774c9a39123 100644 --- a/Modules/Core/ComponentInterface/ComponentBase.h +++ b/Modules/Core/ComponentInterface/ComponentBase.h @@ -1,6 +1,8 @@ #ifndef ComponentBase_h #define ComponentBase_h +#include <iostream> +#include <cstring> namespace elx { enum interfaceStatus { success, noaccepter, noprovider }; diff --git a/Modules/Core/ComponentInterface/GDOptimizer4thPartyComponent.cxx b/Modules/Core/ComponentInterface/GDOptimizer4thPartyComponent.cxx index 78a496b18df24fead5ff2ba4382341179366ac75..cd797a94d9c1bb8855885e94c823528639cfacf8 100644 --- a/Modules/Core/ComponentInterface/GDOptimizer4thPartyComponent.cxx +++ b/Modules/Core/ComponentInterface/GDOptimizer4thPartyComponent.cxx @@ -15,7 +15,6 @@ GDOptimizer4thPartyComponent::~GDOptimizer4thPartyComponent() delete this->MetricObject; } - int GDOptimizer4thPartyComponent::Set(MetricValueInterface* component) { this->MetricObject->SetMetricValueComponent(component); diff --git a/Modules/Core/ComponentInterface/Interfaces.hxx b/Modules/Core/ComponentInterface/Interfaces.hxx index b372806dfc0e9124178c985b708204fe57058115..0c26c023b8752f8ee282011ea8801e176212bb88 100644 --- a/Modules/Core/ComponentInterface/Interfaces.hxx +++ b/Modules/Core/ComponentInterface/Interfaces.hxx @@ -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*); }; diff --git a/Modules/Core/ComponentInterface/componenthandshake.cxx b/Modules/Core/ComponentInterface/componenthandshake.cxx index fa665ed990a1e2097051e27fc57eab61f94bb9a0..87492b3421751b307d47297914f09912b6027097 100644 --- a/Modules/Core/ComponentInterface/componenthandshake.cxx +++ b/Modules/Core/ComponentInterface/componenthandshake.cxx @@ -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; }