qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1340276 - in /qpid/trunk/qpid/cpp: include/qpid/Options.h include/qpid/client/SessionBase_0_10.h include/qpid/client/SubscriptionSettings.h src/tests/ReplicationTest.cpp src/tests/txjob.cpp src/tests/txshift.cpp
Date Fri, 18 May 2012 22:05:12 GMT
Author: astitcher
Date: Fri May 18 22:05:11 2012
New Revision: 1340276

URL: http://svn.apache.org/viewvc?rev=1340276&view=rev
Log:
QPID-4005: Eliminate "using" especially "using namespace" from header file

Modified:
    qpid/trunk/qpid/cpp/include/qpid/Options.h
    qpid/trunk/qpid/cpp/include/qpid/client/SessionBase_0_10.h
    qpid/trunk/qpid/cpp/include/qpid/client/SubscriptionSettings.h
    qpid/trunk/qpid/cpp/src/tests/ReplicationTest.cpp
    qpid/trunk/qpid/cpp/src/tests/txjob.cpp
    qpid/trunk/qpid/cpp/src/tests/txshift.cpp

Modified: qpid/trunk/qpid/cpp/include/qpid/Options.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/Options.h?rev=1340276&r1=1340275&r2=1340276&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qpid/Options.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/Options.h Fri May 18 22:05:11 2012
@@ -81,13 +81,12 @@ po::value_semantic* optValue(T& value, c
  */
 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. */

Modified: qpid/trunk/qpid/cpp/include/qpid/client/SessionBase_0_10.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/client/SessionBase_0_10.h?rev=1340276&r1=1340275&r2=1340276&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qpid/client/SessionBase_0_10.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/client/SessionBase_0_10.h Fri May 18 22:05:11 2012
@@ -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 };

Modified: qpid/trunk/qpid/cpp/include/qpid/client/SubscriptionSettings.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/client/SubscriptionSettings.h?rev=1340276&r1=1340275&r2=1340276&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qpid/client/SubscriptionSettings.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/client/SubscriptionSettings.h Fri May 18 22:05:11 2012
@@ -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,

Modified: qpid/trunk/qpid/cpp/src/tests/ReplicationTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ReplicationTest.cpp?rev=1340276&r1=1340275&r2=1340276&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ReplicationTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ReplicationTest.cpp Fri May 18 22:05:11 2012
@@ -62,7 +62,7 @@ qpid::sys::Shlib plugin(getLibPath("REPL
 qpid::broker::Broker::Options getBrokerOpts(const std::vector<std::string>& args)
 {
     std::vector<const char*> argv(args.size());
-    transform(args.begin(), args.end(), argv.begin(), boost::bind(&string::c_str, _1));
+    transform(args.begin(), args.end(), argv.begin(), boost::bind(&std::string::c_str,
_1));
 
     qpid::broker::Broker::Options opts;
     qpid::Plugin::addOptions(opts);
@@ -72,7 +72,7 @@ qpid::broker::Broker::Options getBrokerO
 
 QPID_AUTO_TEST_CASE(testReplicationExchange)
 {
-    qpid::broker::Broker::Options brokerOpts(getBrokerOpts(list_of<string>("qpidd")
+    qpid::broker::Broker::Options brokerOpts(getBrokerOpts(list_of<std::string>("qpidd")
                                                            ("--replication-exchange-name=qpid.replication")));
     SessionFixture f(brokerOpts);
 

Modified: qpid/trunk/qpid/cpp/src/tests/txjob.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/txjob.cpp?rev=1340276&r1=1340275&r2=1340276&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/txjob.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/txjob.cpp Fri May 18 22:05:11 2012
@@ -38,9 +38,9 @@ namespace tests {
 
 struct Args : public qpid::TestOptions
 {
-    string workQueue;
-    string source;
-    string dest;
+    std::string workQueue;
+    std::string source;
+    std::string dest;
     uint messages;
     uint jobs;
     bool quit;

Modified: qpid/trunk/qpid/cpp/src/tests/txshift.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/txshift.cpp?rev=1340276&r1=1340275&r2=1340276&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/txshift.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/txshift.cpp Fri May 18 22:05:11 2012
@@ -39,7 +39,7 @@ namespace tests {
 
 struct Args : public qpid::TestOptions
 {
-    string workQueue;
+    std::string workQueue;
     size_t workers;
 
     Args() : workQueue("txshift-control"), workers(1)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message