You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/10/19 12:40:20 UTC
[34/50] qpid-proton git commit: PROTON-1481: [C++ binding] Move work
API internals into internal namespace
PROTON-1481: [C++ binding] Move work API internals into internal namespace
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/463aaf2b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/463aaf2b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/463aaf2b
Branch: refs/heads/go1
Commit: 463aaf2b4143ac5e23d550d275468d14ea4e1b93
Parents: b4e0edd
Author: Andrew Stitcher <as...@apache.org>
Authored: Mon Oct 16 14:23:29 2017 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Mon Oct 16 15:32:40 2017 -0400
----------------------------------------------------------------------
.../bindings/cpp/include/proton/container.hpp | 2 +-
proton-c/bindings/cpp/include/proton/fwd.hpp | 8 ++++----
.../bindings/cpp/include/proton/work_queue.hpp | 20 ++++++++++----------
proton-c/bindings/cpp/src/container.cpp | 4 ++--
proton-c/bindings/cpp/src/work_queue.cpp | 8 ++++----
5 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/463aaf2b/proton-c/bindings/cpp/include/proton/container.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/container.hpp b/proton-c/bindings/cpp/include/proton/container.hpp
index 897f8e0..7f4ed21 100644
--- a/proton-c/bindings/cpp/include/proton/container.hpp
+++ b/proton-c/bindings/cpp/include/proton/container.hpp
@@ -316,7 +316,7 @@ class PN_CPP_CLASS_EXTERN container {
// This is a hack to ensure that the C++03 version is declared
// only during the compilation of the library
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES && defined(qpid_proton_cpp_EXPORTS)
- PN_CPP_EXTERN void schedule(duration dur, v03::work fn);
+ PN_CPP_EXTERN void schedule(duration dur, internal::v03::work fn);
#endif
/// @endcond
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/463aaf2b/proton-c/bindings/cpp/include/proton/fwd.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/fwd.hpp b/proton-c/bindings/cpp/include/proton/fwd.hpp
index bbbec74..5ae1d8a 100644
--- a/proton-c/bindings/cpp/include/proton/fwd.hpp
+++ b/proton-c/bindings/cpp/include/proton/fwd.hpp
@@ -61,13 +61,13 @@ class url;
class void_function0;
class work_queue;
-namespace v03 { class work; }
+namespace internal { namespace v03 { class work; } }
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
-namespace v11 { class work; }
-using v11::work;
+namespace internal { namespace v11 { class work; } }
+using internal::v11::work;
#else
-using v03::work;
+using internal::v03::work;
#endif
namespace io {
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/463aaf2b/proton-c/bindings/cpp/include/proton/work_queue.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/work_queue.hpp b/proton-c/bindings/cpp/include/proton/work_queue.hpp
index 2576193..8d5e6ce 100644
--- a/proton-c/bindings/cpp/include/proton/work_queue.hpp
+++ b/proton-c/bindings/cpp/include/proton/work_queue.hpp
@@ -46,7 +46,7 @@ namespace proton {
/// @cond INTERNAL
-namespace v03 {
+namespace internal { namespace v03 {
struct invocable {
invocable() {}
@@ -253,11 +253,11 @@ work make_work(R (*f)(A, B, C), A a, B b, C c) {
return work3<R, A, B, C>(f, a, b, c);
}
-} // v03
+} } // internal::v03
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
-namespace v11 {
+namespace internal { namespace v11 {
class work {
public:
@@ -298,15 +298,15 @@ work make_work(Rest&&... r) {
return std::bind(std::forward<Rest>(r)...);
}
-} // v11
+} } // internal::v11
-using v11::work;
-using v11::make_work;
+using internal::v11::work;
+using internal::v11::make_work;
#else
-using v03::work;
-using v03::make_work;
+using internal::v03::work;
+using internal::v03::make_work;
#endif
@@ -360,7 +360,7 @@ class PN_CPP_CLASS_EXTERN work_queue {
// This is a hack to ensure that the C++03 version is declared
// only during the compilation of the library
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES && defined(qpid_proton_cpp_EXPORTS)
- PN_CPP_EXTERN bool add(v03::work fn);
+ PN_CPP_EXTERN bool add(internal::v03::work fn);
#endif
/// @endcond
@@ -381,7 +381,7 @@ class PN_CPP_CLASS_EXTERN work_queue {
// This is a hack to ensure that the C++03 version is declared
// only during the compilation of the library
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES && defined(qpid_proton_cpp_EXPORTS)
- PN_CPP_EXTERN void schedule(duration, v03::work fn);
+ PN_CPP_EXTERN void schedule(duration, internal::v03::work fn);
#endif
/// @endcond
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/463aaf2b/proton-c/bindings/cpp/src/container.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/container.cpp b/proton-c/bindings/cpp/src/container.cpp
index c67f338..cfc0196 100644
--- a/proton-c/bindings/cpp/src/container.cpp
+++ b/proton-c/bindings/cpp/src/container.cpp
@@ -111,9 +111,9 @@ returned<receiver> container::open_receiver(
std::string container::id() const { return impl_->id(); }
-void container::schedule(duration d, v03::work f) { return impl_->schedule(d, f); }
+void container::schedule(duration d, internal::v03::work f) { return impl_->schedule(d, f); }
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
-void container::schedule(duration d, v11::work f) { return impl_->schedule(d, f); }
+void container::schedule(duration d, internal::v11::work f) { return impl_->schedule(d, f); }
#endif
void container::schedule(duration d, void_function0& f) { return impl_->schedule(d, make_work(&void_function0::operator(), &f)); }
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/463aaf2b/proton-c/bindings/cpp/src/work_queue.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/work_queue.cpp b/proton-c/bindings/cpp/src/work_queue.cpp
index f689214..bb6f4f1 100644
--- a/proton-c/bindings/cpp/src/work_queue.cpp
+++ b/proton-c/bindings/cpp/src/work_queue.cpp
@@ -37,14 +37,14 @@ work_queue::~work_queue() {}
work_queue& work_queue::operator=(impl* i) { impl_.reset(i); return *this; }
-bool work_queue::add(v03::work f) {
+bool work_queue::add(internal::v03::work f) {
// If we have no actual work queue, then can't defer
if (!impl_) return false;
return impl_->add(f);
}
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
-bool work_queue::add(v11::work f) {
+bool work_queue::add(internal::v11::work f) {
// If we have no actual work queue, then can't defer
if (!impl_) return false;
return impl_->add(f);
@@ -55,14 +55,14 @@ bool work_queue::add(void_function0& f) {
return add(make_work(&void_function0::operator(), &f));
}
-void work_queue::schedule(duration d, v03::work f) {
+void work_queue::schedule(duration d, internal::v03::work f) {
// If we have no actual work queue, then can't defer
if (!impl_) return;
return impl_->schedule(d, f);
}
#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
-void work_queue::schedule(duration d, v11::work f) {
+void work_queue::schedule(duration d, internal::v11::work f) {
// If we have no actual work queue, then can't defer
if (!impl_) return;
return impl_->schedule(d, f);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org