celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [3/3] celix git commit: CELIX-370: Refactors some naming issues for the C++ dep man
Date Thu, 21 Jul 2016 09:55:53 GMT
CELIX-370: Refactors some naming issues for the C++ dep man


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/0757a7a6
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/0757a7a6
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/0757a7a6

Branch: refs/heads/develop
Commit: 0757a7a62b43e76b3415e51c2b4fb4de10c5fdfa
Parents: 24fd5b4
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Thu Jul 21 11:55:08 2016 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Thu Jul 21 11:55:08 2016 +0200

----------------------------------------------------------------------
 dependency_manager_cxx/include/celix/dm/Component.h       |  2 +-
 .../include/celix/dm/ServiceDependency.h                  | 10 +++++-----
 .../include/celix/dm/ServiceDependency_Impl.h             | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/0757a7a6/dependency_manager_cxx/include/celix/dm/Component.h
----------------------------------------------------------------------
diff --git a/dependency_manager_cxx/include/celix/dm/Component.h b/dependency_manager_cxx/include/celix/dm/Component.h
index b5324ec..e6e8d15 100644
--- a/dependency_manager_cxx/include/celix/dm/Component.h
+++ b/dependency_manager_cxx/include/celix/dm/Component.h
@@ -156,7 +156,7 @@ namespace celix { namespace dm {
         Component<T>& remove(ServiceDependency<T,I>& dep);
 
         /**
-         * Removes a C service dependency to the component
+         * Adds a C service dependency to the component
          *
          * @return the DM Component reference for chaining (fluent API)
          */

http://git-wip-us.apache.org/repos/asf/celix/blob/0757a7a6/dependency_manager_cxx/include/celix/dm/ServiceDependency.h
----------------------------------------------------------------------
diff --git a/dependency_manager_cxx/include/celix/dm/ServiceDependency.h b/dependency_manager_cxx/include/celix/dm/ServiceDependency.h
index f3d6476..7b635c3 100644
--- a/dependency_manager_cxx/include/celix/dm/ServiceDependency.h
+++ b/dependency_manager_cxx/include/celix/dm/ServiceDependency.h
@@ -78,11 +78,11 @@ namespace celix { namespace dm {
          * Sets the service name, version and filter for the C service dependency.
          *
          * @param serviceName The service name. Must have a value
-         * @param serviceVersion The service vesrion, can be an empty string
+         * @param serviceVersionRange The service version range, can be an empty string
          * @param filter The (additional) filter to use (e.g. "(location=front)")
          * @return the C service dependency reference for chaining (fluent API)
          */
-        CServiceDependency<T>& setCService(const std::string serviceName, const
std::string serviceVersion, const std::string filter);
+        CServiceDependency<T>& setCService(const std::string serviceName, const
std::string serviceVersionRange, const std::string filter);
 
         /**
          * Specify if the service dependency is required. Default is false
@@ -104,7 +104,7 @@ namespace celix { namespace dm {
     protected:
         std::string name {};
         std::string filter {};
-        std::string version {};
+        std::string versionRange {};
         std::string modifiedFilter {};
 
         void (T::*setFp)(I* service) {nullptr};
@@ -139,11 +139,11 @@ namespace celix { namespace dm {
         ServiceDependency<T,I>& setFilter(std::string filter);
 
         /**
-         * Set the service version of the service dependency.
+         * Set the service version range of the service dependency.
          *
          * @return the C++ service dependency reference for chaining (fluent API)
          */
-        ServiceDependency<T,I>& setVersion(std::string version);
+        ServiceDependency<T,I>& setVersion(std::string versionRange);
 
         /**
          * Set the set callback for when the service dependency becomes available

http://git-wip-us.apache.org/repos/asf/celix/blob/0757a7a6/dependency_manager_cxx/include/celix/dm/ServiceDependency_Impl.h
----------------------------------------------------------------------
diff --git a/dependency_manager_cxx/include/celix/dm/ServiceDependency_Impl.h b/dependency_manager_cxx/include/celix/dm/ServiceDependency_Impl.h
index 7bb812f..4f23b61 100644
--- a/dependency_manager_cxx/include/celix/dm/ServiceDependency_Impl.h
+++ b/dependency_manager_cxx/include/celix/dm/ServiceDependency_Impl.h
@@ -23,8 +23,8 @@
 using namespace celix::dm;
 
 template<class T>
-CServiceDependency<T>& CServiceDependency<T>::setCService(const std::string
serviceName, const std::string serviceVersion, const std::string filter) {
-    const char* cversion = serviceVersion.empty() ? nullptr : serviceVersion.c_str();
+CServiceDependency<T>& CServiceDependency<T>::setCService(const std::string
serviceName, const std::string serviceVersionRange, const std::string filter) {
+    const char* cversion = serviceVersionRange.empty() ? nullptr : serviceVersionRange.c_str();
     const char* cfilter = filter.empty() ? nullptr : filter.c_str();
     serviceDependency_setService(this->cServiceDependency(), serviceName.c_str(), cversion,
cfilter);
     return *this;
@@ -50,7 +50,7 @@ ServiceDependency<T,I>::ServiceDependency() : TypedServiceDependency<T>()
{
 template<class T, class I>
 void ServiceDependency<T,I>::setupService() {
     std::string n = name.empty() ? typeName<I>() : name;
-    const char* v =  version.empty() ? nullptr : version.c_str();
+    const char* v =  versionRange.empty() ? nullptr : versionRange.c_str();
 
     //setting modified filter. which is in a filter including a lang=c++
     modifiedFilter = std::string("(lang=c++)");
@@ -86,8 +86,8 @@ ServiceDependency<T,I>& ServiceDependency<T,I>::setFilter(std::string
filter) {
 };
 
 template<class T, class I>
-ServiceDependency<T,I>& ServiceDependency<T,I>::setVersion(std::string version)
{
-    this->version = version;
+ServiceDependency<T,I>& ServiceDependency<T,I>::setVersion(std::string versionRange)
{
+    this->versionRange = versionRange;
     setupService();
     return *this;
 };


Mime
View raw message