summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-05-18 22:05:11 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-05-18 22:05:11 +0000
commit63a00915cdb8b3c3f1cc809e9b34bcb818386e0e (patch)
tree55d40f78d824a8a6006702ec2a22d3759aad5aaf /cpp/include
parent5db5191bb4efe8c8f0029d770e4f9724c45e136d (diff)
downloadqpid-python-63a00915cdb8b3c3f1cc809e9b34bcb818386e0e.tar.gz
QPID-4005: Eliminate "using" especially "using namespace" from header file
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1340276 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/qpid/Options.h9
-rw-r--r--cpp/include/qpid/client/SessionBase_0_10.h13
-rw-r--r--cpp/include/qpid/client/SubscriptionSettings.h14
3 files changed, 23 insertions, 13 deletions
diff --git a/cpp/include/qpid/Options.h b/cpp/include/qpid/Options.h
index 9860076195..0bbe7b704f 100644
--- a/cpp/include/qpid/Options.h
+++ b/cpp/include/qpid/Options.h
@@ -81,13 +81,12 @@ po::value_semantic* optValue(T& value, const char* name) {
*/
template <class T>
po::value_semantic* optValue(std::vector<T>& value, const char* name) {
- using namespace std;
- ostringstream os;
- copy(value.begin(), value.end(), ostream_iterator<T>(os, " "));
- string val=os.str();
+ std::ostringstream os;
+ std::copy(value.begin(), value.end(), std::ostream_iterator<T>(os, " "));
+ std::string val=os.str();
if (!val.empty())
val.erase(val.end()-1); // Remove trailing " "
- return (new OptionValue<vector<T> >(value, prettyArg(name, val)));
+ return (new OptionValue<std::vector<T> >(value, prettyArg(name, val)));
}
/** Create a boolean switch value. Presence of the option sets the value. */
diff --git a/cpp/include/qpid/client/SessionBase_0_10.h b/cpp/include/qpid/client/SessionBase_0_10.h
index ea50ab32f7..630987c11d 100644
--- a/cpp/include/qpid/client/SessionBase_0_10.h
+++ b/cpp/include/qpid/client/SessionBase_0_10.h
@@ -36,14 +36,13 @@ namespace client {
class Connection;
class SessionImpl;
-using std::string;
-using framing::Content;
-using framing::FieldTable;
-using framing::SequenceNumber;
-using framing::SequenceSet;
-using framing::SequenceNumberSet;
+using qpid::framing::Content;
+using qpid::framing::FieldTable;
+using qpid::framing::SequenceNumber;
+using qpid::framing::SequenceSet;
+using qpid::framing::SequenceNumberSet;
using qpid::SessionId;
-using framing::Xid;
+using qpid::framing::Xid;
/** Unit of message credit: messages or bytes */
enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
diff --git a/cpp/include/qpid/client/SubscriptionSettings.h b/cpp/include/qpid/client/SubscriptionSettings.h
index b4cb302b56..bee39f6816 100644
--- a/cpp/include/qpid/client/SubscriptionSettings.h
+++ b/cpp/include/qpid/client/SubscriptionSettings.h
@@ -28,7 +28,19 @@ namespace qpid {
namespace client {
/** Bring AMQP enum definitions for message class into this namespace. */
-using namespace qpid::framing::message;
+using qpid::framing::message::AcceptMode;
+using qpid::framing::message::AcquireMode;
+using qpid::framing::message::ACCEPT_MODE_EXPLICIT;
+using qpid::framing::message::ACCEPT_MODE_NONE;
+using qpid::framing::message::ACQUIRE_MODE_NOT_ACQUIRED;
+using qpid::framing::message::ACQUIRE_MODE_PRE_ACQUIRED;
+using qpid::framing::message::CREDIT_UNIT_BYTE;
+using qpid::framing::message::CREDIT_UNIT_MESSAGE;
+using qpid::framing::message::DELIVERY_MODE_NON_PERSISTENT;
+using qpid::framing::message::DELIVERY_MODE_PERSISTENT;
+using qpid::framing::message::FLOW_MODE_CREDIT;
+using qpid::framing::message::FLOW_MODE_WINDOW;
+
enum CompletionMode {
MANUAL_COMPLETION = 0,