summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-11-22 16:18:06 +0000
committerGordon Sim <gsim@apache.org>2006-11-22 16:18:06 +0000
commitf6b81bf19f1e9c5a6299516f030623bd41a73e56 (patch)
tree50ad4b3e91738c87d18a5e28eebf40e249f5f8df /cpp/src/qpid/broker
parent6e1582a62b461e389a7b65ca0053e3cc52f3dc27 (diff)
downloadqpid-python-f6b81bf19f1e9c5a6299516f030623bd41a73e56.tar.gz
Enclose any 'using std::string' statements within qpid namespaces to avoid pollution of global namespaces.
Explicit use of std::string in many places, especially for client APIs where not already done. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@478212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
-rw-r--r--cpp/src/qpid/broker/Channel.h2
-rw-r--r--cpp/src/qpid/broker/DeliveryRecord.cpp1
-rw-r--r--cpp/src/qpid/broker/DeliveryRecord.h4
-rw-r--r--cpp/src/qpid/broker/Exchange.h10
-rw-r--r--cpp/src/qpid/broker/ExchangeRegistry.h8
-rw-r--r--cpp/src/qpid/broker/Message.h3
-rw-r--r--cpp/src/qpid/broker/MessageStore.h8
-rw-r--r--cpp/src/qpid/broker/Queue.h1
-rw-r--r--cpp/src/qpid/broker/RecoveryManager.h4
-rw-r--r--cpp/src/qpid/broker/TxPublish.h4
10 files changed, 26 insertions, 19 deletions
diff --git a/cpp/src/qpid/broker/Channel.h b/cpp/src/qpid/broker/Channel.h
index 0baf90edbb..6ed867284c 100644
--- a/cpp/src/qpid/broker/Channel.h
+++ b/cpp/src/qpid/broker/Channel.h
@@ -48,6 +48,8 @@
namespace qpid {
namespace broker {
+ using qpid::framing::string;
+
/**
* Maintains state for an AMQP channel. Handles incoming and
* outgoing messages for that channel.
diff --git a/cpp/src/qpid/broker/DeliveryRecord.cpp b/cpp/src/qpid/broker/DeliveryRecord.cpp
index a1efc17d19..0e4e8c4336 100644
--- a/cpp/src/qpid/broker/DeliveryRecord.cpp
+++ b/cpp/src/qpid/broker/DeliveryRecord.cpp
@@ -22,6 +22,7 @@
#include <qpid/broker/Channel.h>
using namespace qpid::broker;
+using std::string;
DeliveryRecord::DeliveryRecord(Message::shared_ptr _msg,
Queue::shared_ptr _queue,
diff --git a/cpp/src/qpid/broker/DeliveryRecord.h b/cpp/src/qpid/broker/DeliveryRecord.h
index a7fe53cee5..4c4e4f0224 100644
--- a/cpp/src/qpid/broker/DeliveryRecord.h
+++ b/cpp/src/qpid/broker/DeliveryRecord.h
@@ -38,12 +38,12 @@ namespace qpid {
class DeliveryRecord{
mutable Message::shared_ptr msg;
mutable Queue::shared_ptr queue;
- string consumerTag;
+ std::string consumerTag;
u_int64_t deliveryTag;
bool pull;
public:
- DeliveryRecord(Message::shared_ptr msg, Queue::shared_ptr queue, const string consumerTag, const u_int64_t deliveryTag);
+ DeliveryRecord(Message::shared_ptr msg, Queue::shared_ptr queue, const std::string consumerTag, const u_int64_t deliveryTag);
DeliveryRecord(Message::shared_ptr msg, Queue::shared_ptr queue, const u_int64_t deliveryTag);
void discard(TransactionContext* ctxt = 0) const;
diff --git a/cpp/src/qpid/broker/Exchange.h b/cpp/src/qpid/broker/Exchange.h
index a89ea25daa..2cca942290 100644
--- a/cpp/src/qpid/broker/Exchange.h
+++ b/cpp/src/qpid/broker/Exchange.h
@@ -28,15 +28,17 @@
namespace qpid {
namespace broker {
+ using std::string;
+
class Exchange{
- const std::string name;
+ const string name;
public:
typedef boost::shared_ptr<Exchange> shared_ptr;
- explicit Exchange(const std::string& _name) : name(_name){}
+ explicit Exchange(const string& _name) : name(_name){}
virtual ~Exchange(){}
- std::string getName() { return name; }
- virtual std::string getType() = 0;
+ string getName() { return name; }
+ virtual string getType() = 0;
virtual void bind(Queue::shared_ptr queue, const string& routingKey, qpid::framing::FieldTable* args) = 0;
virtual void unbind(Queue::shared_ptr queue, const string& routingKey, qpid::framing::FieldTable* args) = 0;
virtual void route(Deliverable& msg, const string& routingKey, qpid::framing::FieldTable* args) = 0;
diff --git a/cpp/src/qpid/broker/ExchangeRegistry.h b/cpp/src/qpid/broker/ExchangeRegistry.h
index 7090f66ebd..5c4da7c917 100644
--- a/cpp/src/qpid/broker/ExchangeRegistry.h
+++ b/cpp/src/qpid/broker/ExchangeRegistry.h
@@ -30,13 +30,13 @@ namespace broker {
struct UnknownExchangeTypeException{};
class ExchangeRegistry{
- typedef std::map<string, Exchange::shared_ptr> ExchangeMap;
+ typedef std::map<std::string, Exchange::shared_ptr> ExchangeMap;
ExchangeMap exchanges;
qpid::sys::Mutex lock;
public:
- std::pair<Exchange::shared_ptr, bool> declare(const string& name, const string& type) throw(UnknownExchangeTypeException);
- void destroy(const string& name);
- Exchange::shared_ptr get(const string& name);
+ std::pair<Exchange::shared_ptr, bool> declare(const std::string& name, const std::string& type) throw(UnknownExchangeTypeException);
+ void destroy(const std::string& name);
+ Exchange::shared_ptr get(const std::string& name);
Exchange::shared_ptr getDefault();
};
}
diff --git a/cpp/src/qpid/broker/Message.h b/cpp/src/qpid/broker/Message.h
index bfdfcf69d5..f6b9e19209 100644
--- a/cpp/src/qpid/broker/Message.h
+++ b/cpp/src/qpid/broker/Message.h
@@ -32,7 +32,8 @@
namespace qpid {
namespace broker {
-
+
+ using qpid::framing::string;
/**
* Represents an AMQP message, i.e. a header body, a list of
* content bodies and some details about the publication
diff --git a/cpp/src/qpid/broker/MessageStore.h b/cpp/src/qpid/broker/MessageStore.h
index 3acada0f82..13b5ba1152 100644
--- a/cpp/src/qpid/broker/MessageStore.h
+++ b/cpp/src/qpid/broker/MessageStore.h
@@ -57,7 +57,7 @@ namespace qpid {
* distributed transaction in which the operation takes
* place or null for 'local' transactions
*/
- virtual void enqueue(TransactionContext* ctxt, Message::shared_ptr& msg, const Queue& queue, const string * const xid) = 0;
+ virtual void enqueue(TransactionContext* ctxt, Message::shared_ptr& msg, const Queue& queue, const std::string * const xid) = 0;
/**
* Dequeues a message, recording that the given message is
* no longer on the given queue and deleting the message
@@ -69,15 +69,15 @@ namespace qpid {
* distributed transaction in which the operation takes
* place or null for 'local' transactions
*/
- virtual void dequeue(TransactionContext* ctxt, Message::shared_ptr& msg, const Queue& queue, const string * const xid) = 0;
+ virtual void dequeue(TransactionContext* ctxt, Message::shared_ptr& msg, const Queue& queue, const std::string * const xid) = 0;
/**
* Treat all enqueue/dequeues where this xid was specified as being committed.
*/
- virtual void committed(const string * const xid) = 0;
+ virtual void committed(const std::string * const xid) = 0;
/**
* Treat all enqueue/dequeues where this xid was specified as being aborted.
*/
- virtual void aborted(const string * const xid) = 0;
+ virtual void aborted(const std::string * const xid) = 0;
virtual ~MessageStore(){}
};
diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h
index 7c90ccdbad..0c67540dac 100644
--- a/cpp/src/qpid/broker/Queue.h
+++ b/cpp/src/qpid/broker/Queue.h
@@ -40,6 +40,7 @@ namespace qpid {
*/
struct ExclusiveAccessException{};
+ using std::string;
/**
* The brokers representation of an amqp queue. Messages are
* delivered to a queue from where they can be dispatched to
diff --git a/cpp/src/qpid/broker/RecoveryManager.h b/cpp/src/qpid/broker/RecoveryManager.h
index 64fb11fe11..6df5af687c 100644
--- a/cpp/src/qpid/broker/RecoveryManager.h
+++ b/cpp/src/qpid/broker/RecoveryManager.h
@@ -33,8 +33,8 @@ namespace broker {
public:
RecoveryManager(QueueRegistry& queues, ExchangeRegistry& exchanges);
~RecoveryManager();
- Queue::shared_ptr recoverQueue(const string& name);
- Exchange::shared_ptr recoverExchange(const string& name, const string& type);
+ Queue::shared_ptr recoverQueue(const std::string& name);
+ Exchange::shared_ptr recoverExchange(const std::string& name, const std::string& type);
};
diff --git a/cpp/src/qpid/broker/TxPublish.h b/cpp/src/qpid/broker/TxPublish.h
index dd2a9be7e7..c375bd0f94 100644
--- a/cpp/src/qpid/broker/TxPublish.h
+++ b/cpp/src/qpid/broker/TxPublish.h
@@ -46,9 +46,9 @@ namespace qpid {
class Prepare{
TransactionContext* ctxt;
Message::shared_ptr& msg;
- const string* const xid;
+ const std::string* const xid;
public:
- Prepare(TransactionContext* ctxt, Message::shared_ptr& msg, const string* const xid);
+ Prepare(TransactionContext* ctxt, Message::shared_ptr& msg, const std::string* const xid);
void operator()(Queue::shared_ptr& queue);
};