-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eCAL core v5 compatibility modus (part 1) #1930
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -40,7 +41,7 @@ namespace eCAL | |||
{ | |||
class CServiceClientImpl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: declaration 'CServiceClientImpl' is never referenced, but a declaration with the same name found in another namespace 'eCAL::v6' [bugprone-forward-declaration-namespace]
class CServiceClientImpl;
^
Additional context
ecal/core/include/ecal/ecal_client_instance.h:39: a declaration of 'CServiceClientImpl' is found here
class CServiceClientImpl;
^
@@ -40,7 +41,7 @@ | |||
{ | |||
class CServiceClientImpl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no definition found for 'CServiceClientImpl', but a definition with the same name 'CServiceClientImpl' found in another namespace 'eCAL::v6' [bugprone-forward-declaration-namespace]
class CServiceClientImpl;
^
Additional context
ecal/core/src/service/ecal_service_client_impl.h:46: a definition of 'CServiceClientImpl' is found here
class CServiceClientImpl : public std::enable_shared_from_this<CServiceClientImpl>
^
@@ -401,7 +401,7 @@ namespace eCAL | |||
return(true); | |||
} | |||
|
|||
bool CPublisherImpl::SetEventCallback(const PubEventCallbackT callback_) | |||
bool CPublisherImpl::SetEventCallback(const v6::PubEventCallbackT callback_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the const qualified parameter 'callback_' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
ecal/core/src/pubsub/ecal_publisher_impl.h:89:
- bool SetEventCallback(const v6::PubEventCallbackT callback_);
+ bool SetEventCallback(const v6::PubEventCallbackT& callback_);
bool CPublisherImpl::SetEventCallback(const v6::PubEventCallbackT callback_) | |
bool CPublisherImpl::SetEventCallback(const v6::PubEventCallbackT& callback_) |
if (g_subgate() != nullptr) g_subgate()->Register(topic_name_, m_subscriber_impl); | ||
} | ||
|
||
CSubscriber::CSubscriber(const std::string & topic_name_, const SDataTypeInformation & data_type_info_, const SubEventCallbackT event_callback_, const Subscriber::Configuration & config_) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the const qualified parameter 'event_callback_' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
ecal/core/include/ecal/ecal_subscriber.h:68:
- CSubscriber(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const SubEventCallbackT event_callback_, const Subscriber::Configuration& config_ = GetSubscriberConfiguration());
+ CSubscriber(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const SubEventCallbackT& event_callback_, const Subscriber::Configuration& config_ = GetSubscriberConfiguration());
CSubscriber::CSubscriber(const std::string & topic_name_, const SDataTypeInformation & data_type_info_, const SubEventCallbackT event_callback_, const Subscriber::Configuration & config_) : | |
CSubscriber::CSubscriber(const std::string & topic_name_, const SDataTypeInformation & data_type_info_, const SubEventCallbackT& event_callback_, const Subscriber::Configuration & config_) : |
@@ -232,7 +233,7 @@ namespace eCAL | |||
return(true); | |||
} | |||
|
|||
bool CSubscriberImpl::SetEventIDCallback(const SubEventCallbackT callback_) | |||
bool CSubscriberImpl::SetEventIDCallback(const v6::SubEventCallbackT callback_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the const qualified parameter 'callback_' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
bool CSubscriberImpl::SetEventIDCallback(const v6::SubEventCallbackT callback_) | |
bool CSubscriberImpl::SetEventIDCallback(const v6::SubEventCallbackT& callback_) |
ecal/core/src/pubsub/ecal_subscriber_impl.h:80:
- bool SetEventIDCallback(const v6::SubEventCallbackT callback_);
+ bool SetEventIDCallback(const v6::SubEventCallbackT& callback_);
#include <ecal/v5/ecal_client.h> | ||
#include <ecal/v5/ecal_server.h> | ||
#include <ecal/v5/ecal_publisher.h> | ||
#include <ecal/v5/ecal_subscriber.h> | ||
|
||
using namespace System; | ||
using namespace System::Collections::Generic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use of undeclared identifier 'System' [clang-diagnostic-error]
using namespace System::Collections::Generic;
^
@@ -24,7 +24,7 @@ | |||
|
|||
#pragma once | |||
|
|||
#include <ecal/ecal_publisher_v5.h> | |||
#include <ecal/v5/ecal_publisher.h> | |||
#include <ecal/msg/capnproto/helper.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'ecal/msg/capnproto/helper.h' file not found [clang-diagnostic-error]
#include <ecal/msg/capnproto/helper.h>
^
@@ -25,7 +25,7 @@ | |||
#pragma once | |||
|
|||
#include <ecal/ecal_deprecate.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'ecal/ecal_deprecate.h' file not found [clang-diagnostic-error]
#include <ecal/ecal_deprecate.h>
^
@@ -27,7 +27,7 @@ | |||
#include <cstddef> | |||
#include <ecal/ecal_deprecate.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'ecal/ecal_deprecate.h' file not found [clang-diagnostic-error]
#include <ecal/ecal_deprecate.h>
^
@@ -24,7 +24,7 @@ | |||
|
|||
#pragma once | |||
|
|||
#include <ecal/ecal_server_v5.h> | |||
#include <ecal/v5/ecal_server.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'ecal/v5/ecal_server.h' file not found [clang-diagnostic-error]
#include <ecal/v5/ecal_server.h>
^
194c97e
to
ba861bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANK YOU!
We want to introduce an eCAL 5 compatibility modus, which will make it easier to migrate to eCAL 6.
This PR is the first step for this.
There are now two targets,
ecal_core
andecal_core_v5
.They differentiate on how they define the eCAL namespaces:
ecal_core
:and
ecal_core_v5
:In theory, when users migrate to eCAL 6, and enounter deleted functions, they can first use the compatibility mode.
Later they can switch back to
core
.We will take the liberty to remove
core_v5
during the lifetime of eCAL 6 (e.g. API stability is promised only for thecore
Target and v6 namespace functions.Also, the eCAL will use the namespace macros:
ECAL_CORE_NAMESPACE_V5
andECAL_CORE_NAMESPACE_V6
for opening the namespaces.v5 files / implementations have been moved to v5 include / src folders to allow easier cleanup at a later stage.