From dba98eb0b4908eee8ed688b4480b4ba4b7f6a3c1 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Thu, 10 Jul 2014 11:15:03 +0000 Subject: QPID-5886: Get windows to export the Handle methods. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1609444 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/CMakeLists.txt | 1 + qpid/cpp/src/qpid/client/Completion.cpp | 3 +++ qpid/cpp/src/qpid/client/CompletionImpl.cpp | 34 +++++++++++++++++++++++++++++ qpid/cpp/src/qpid/client/CompletionImpl.h | 13 ++++++----- 4 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 qpid/cpp/src/qpid/client/CompletionImpl.cpp (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index f003a34ff7..fe6d14074e 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -890,6 +890,7 @@ set (qpidclient_SOURCES ${sslconnector_SOURCES} qpid/client/Bounds.cpp qpid/client/Completion.cpp + qpid/client/CompletionImpl.cpp qpid/client/Connection.cpp qpid/client/ConnectionHandler.cpp qpid/client/ConnectionImpl.cpp diff --git a/qpid/cpp/src/qpid/client/Completion.cpp b/qpid/cpp/src/qpid/client/Completion.cpp index a97c8c3534..fc6737d96f 100644 --- a/qpid/cpp/src/qpid/client/Completion.cpp +++ b/qpid/cpp/src/qpid/client/Completion.cpp @@ -26,6 +26,9 @@ namespace qpid { namespace client { +// Explicitly instantiate Handle superclass +template class Handle; + typedef PrivateImplRef PI; Completion::Completion(CompletionImpl* p) { PI::ctor(*this, p); } Completion::Completion(const Completion& c) : Handle() { PI::copy(*this, c); } diff --git a/qpid/cpp/src/qpid/client/CompletionImpl.cpp b/qpid/cpp/src/qpid/client/CompletionImpl.cpp new file mode 100644 index 0000000000..cf2cfc6138 --- /dev/null +++ b/qpid/cpp/src/qpid/client/CompletionImpl.cpp @@ -0,0 +1,34 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +#include "qpid/client/CompletionImpl.h" +#include "qpid/client/Handle.h" +#include "qpid/client/PrivateImplRef.h" + +namespace qpid { +namespace client { + +CompletionImpl::CompletionImpl() {} + +CompletionImpl::CompletionImpl(Future f, boost::shared_ptr s) : + future(f), session(s) {} + +}} // namespace qpid::client diff --git a/qpid/cpp/src/qpid/client/CompletionImpl.h b/qpid/cpp/src/qpid/client/CompletionImpl.h index f180708316..b8243511ef 100644 --- a/qpid/cpp/src/qpid/client/CompletionImpl.h +++ b/qpid/cpp/src/qpid/client/CompletionImpl.h @@ -24,21 +24,22 @@ #include "qpid/RefCounted.h" #include "qpid/client/Future.h" +#include "qpid/client/ClientImportExport.h" #include namespace qpid { namespace client { ///@internal -class CompletionImpl : public RefCounted +class QPID_CLIENT_CLASS_EXTERN CompletionImpl : public RefCounted { public: - CompletionImpl() {} - CompletionImpl(Future f, boost::shared_ptr s) : future(f), session(s) {} + QPID_CLIENT_EXTERN CompletionImpl(); + QPID_CLIENT_EXTERN CompletionImpl(Future f, boost::shared_ptr s); - bool isComplete() { return future.isComplete(*session); } - void wait() { future.wait(*session); } - std::string getResult() { return future.getResult(*session); } + QPID_CLIENT_EXTERN bool isComplete() { return future.isComplete(*session); } + QPID_CLIENT_EXTERN void wait() { future.wait(*session); } + QPID_CLIENT_EXTERN std::string getResult() { return future.getResult(*session); } protected: Future future; -- cgit v1.2.1