diff options
author | Andrew Stitcher <astitcher@apache.org> | 2009-05-03 03:52:37 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2009-05-03 03:52:37 +0000 |
commit | bf882447f4c476fb790c2214a07ed82fe355d422 (patch) | |
tree | b7144bacc110598116d726359fe56f6ef0ec201c /qpid/cpp | |
parent | 9b4c3318ef66f9628cd5d9b0473030874b4b8acf (diff) | |
download | qpid-python-bf882447f4c476fb790c2214a07ed82fe355d422.tar.gz |
Some more fixes to build under Visual Studio 2008
Remove some simple Visual Studio 2008 warnings
Fix qmfconsole build under Windows and CMake
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@771020 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r-- | qpid/cpp/src/qpid/Plugin.h | 2 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/acl/Acl.cpp | 3 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/DeliveryRecord.h | 23 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/Exchange.h | 16 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/ExchangeRegistry.h | 8 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/Message.h | 2 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.h | 6 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp | 7 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/client/Connector.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/console/ConsoleImportExport.h | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/FieldTable.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/header_test.cpp | 2 |
12 files changed, 39 insertions, 36 deletions
diff --git a/qpid/cpp/src/qpid/Plugin.h b/qpid/cpp/src/qpid/Plugin.h index 913152f9e1..88214babb8 100644 --- a/qpid/cpp/src/qpid/Plugin.h +++ b/qpid/cpp/src/qpid/Plugin.h @@ -53,7 +53,7 @@ class Plugin : private boost::noncopyable { QPID_COMMON_EXTERN void finalize(); /** Add a function to run when finalize() is called */ - void addFinalizer(const boost::function<void()>&); + QPID_COMMON_EXTERN void addFinalizer(const boost::function<void()>&); private: std::vector<boost::function<void()> > finalizers; diff --git a/qpid/cpp/src/qpid/acl/Acl.cpp b/qpid/cpp/src/qpid/acl/Acl.cpp index 238ab9df6c..12a7ba4634 100644 --- a/qpid/cpp/src/qpid/acl/Acl.cpp +++ b/qpid/cpp/src/qpid/acl/Acl.cpp @@ -36,13 +36,14 @@ using namespace std; using namespace qpid::acl; +using qpid::broker::Broker; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; namespace _qmf = qmf::org::apache::qpid::acl; -Acl::Acl (AclValues& av, broker::Broker& b): aclValues(av), broker(&b), transferAcl(false) +Acl::Acl (AclValues& av, Broker& b): aclValues(av), broker(&b), transferAcl(false) { agent = ManagementAgent::Singleton::getInstance(); diff --git a/qpid/cpp/src/qpid/broker/DeliveryRecord.h b/qpid/cpp/src/qpid/broker/DeliveryRecord.h index 9985e3f7a2..26516f8a3a 100644 --- a/qpid/cpp/src/qpid/broker/DeliveryRecord.h +++ b/qpid/cpp/src/qpid/broker/DeliveryRecord.h @@ -35,17 +35,7 @@ namespace qpid { namespace broker { class SemanticState; -class DeliveryRecord; - -typedef std::deque<DeliveryRecord> DeliveryRecords; - -struct AckRange -{ - DeliveryRecords::iterator start; - DeliveryRecords::iterator end; - AckRange(DeliveryRecords::iterator _start, DeliveryRecords::iterator _end) : start(_start), end(_end) {} -}; - +struct AckRange; /** * Record of a delivery for which an ack is outstanding. @@ -113,6 +103,7 @@ class DeliveryRecord { void deliver(framing::FrameHandler& h, DeliveryId deliveryId, uint16_t framesize); void setId(DeliveryId _id) { id = _id; } + typedef std::deque<DeliveryRecord> DeliveryRecords; static AckRange findRange(DeliveryRecords& records, DeliveryId first, DeliveryId last); const QueuedMessage& getMessage() const { return msg; } framing::SequenceNumber getId() const { return id; } @@ -132,6 +123,16 @@ struct AcquireFunctor record.acquire(results); } }; + +typedef DeliveryRecord::DeliveryRecords DeliveryRecords; + +struct AckRange +{ + DeliveryRecords::iterator start; + DeliveryRecords::iterator end; + AckRange(DeliveryRecords::iterator _start, DeliveryRecords::iterator _end) : start(_start), end(_end) {} +}; + } } diff --git a/qpid/cpp/src/qpid/broker/Exchange.h b/qpid/cpp/src/qpid/broker/Exchange.h index 9260222342..47c0bdb3af 100644 --- a/qpid/cpp/src/qpid/broker/Exchange.h +++ b/qpid/cpp/src/qpid/broker/Exchange.h @@ -121,9 +121,9 @@ protected: public: typedef boost::shared_ptr<Exchange> shared_ptr; - explicit Exchange(const std::string& name, management::Manageable* parent = 0); - Exchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, - management::Manageable* parent = 0); + QPID_BROKER_EXTERN explicit Exchange(const std::string& name, management::Manageable* parent = 0); + QPID_BROKER_EXTERN Exchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, + management::Manageable* parent = 0); QPID_BROKER_EXTERN virtual ~Exchange(); const std::string& getName() const { return name; } @@ -140,19 +140,19 @@ public: virtual bool bind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0; virtual bool unbind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0; virtual bool isBound(Queue::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args) = 0; - virtual void setProperties(const boost::intrusive_ptr<Message>&); + QPID_BROKER_EXTERN virtual void setProperties(const boost::intrusive_ptr<Message>&); virtual void route(Deliverable& msg, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0; //PersistableExchange: - void setPersistenceId(uint64_t id) const; + QPID_BROKER_EXTERN void setPersistenceId(uint64_t id) const; uint64_t getPersistenceId() const { return persistenceId; } - uint32_t encodedSize() const; + QPID_BROKER_EXTERN uint32_t encodedSize() const; QPID_BROKER_EXTERN virtual void encode(framing::Buffer& buffer) const; static QPID_BROKER_EXTERN Exchange::shared_ptr decode(ExchangeRegistry& exchanges, framing::Buffer& buffer); // Manageable entry points - management::ManagementObject* GetManagementObject(void) const; + QPID_BROKER_EXTERN management::ManagementObject* GetManagementObject(void) const; // Federation hooks class DynamicBridge { @@ -172,7 +172,7 @@ protected: qpid::sys::Mutex bridgeLock; std::vector<DynamicBridge*> bridgeVector; - virtual void handleHelloRequest(); + QPID_BROKER_EXTERN virtual void handleHelloRequest(); void propagateFedOp(const std::string& routingKey, const std::string& tags, const std::string& op, const std::string& origin); }; diff --git a/qpid/cpp/src/qpid/broker/ExchangeRegistry.h b/qpid/cpp/src/qpid/broker/ExchangeRegistry.h index 9ca432e41c..9edd54f025 100644 --- a/qpid/cpp/src/qpid/broker/ExchangeRegistry.h +++ b/qpid/cpp/src/qpid/broker/ExchangeRegistry.h @@ -47,14 +47,12 @@ class ExchangeRegistry{ ExchangeRegistry () : parent(0) {} QPID_BROKER_EXTERN std::pair<Exchange::shared_ptr, bool> declare - (const std::string& name, const std::string& type) - throw(UnknownExchangeTypeException); + (const std::string& name, const std::string& type); QPID_BROKER_EXTERN std::pair<Exchange::shared_ptr, bool> declare (const std::string& name, const std::string& type, bool durable, - const qpid::framing::FieldTable& args = framing::FieldTable()) - throw(UnknownExchangeTypeException); + const qpid::framing::FieldTable& args = framing::FieldTable()); QPID_BROKER_EXTERN void destroy(const std::string& name); QPID_BROKER_EXTERN Exchange::shared_ptr get(const std::string& name); Exchange::shared_ptr getDefault(); @@ -69,7 +67,7 @@ class ExchangeRegistry{ */ bool registerExchange(const Exchange::shared_ptr&); - void registerType(const std::string& type, FactoryFunction); + QPID_BROKER_EXTERN void registerType(const std::string& type, FactoryFunction); /** Call f for each exchange in the registry. */ template <class F> void eachExchange(F f) const { diff --git a/qpid/cpp/src/qpid/broker/Message.h b/qpid/cpp/src/qpid/broker/Message.h index 458c6c7d1a..96eff453c0 100644 --- a/qpid/cpp/src/qpid/broker/Message.h +++ b/qpid/cpp/src/qpid/broker/Message.h @@ -138,7 +138,7 @@ public: void destroy(); bool getContentFrame(const Queue& queue, framing::AMQFrame& frame, uint16_t maxContentSize, uint64_t offset) const; - void sendContent(const Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize) const; + QPID_BROKER_EXTERN void sendContent(const Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize) const; void sendHeader(framing::FrameHandler& out, uint16_t maxFrameSize) const; QPID_BROKER_EXTERN bool isContentLoaded() const; diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h index d1f71581d6..c5ef9a9307 100644 --- a/qpid/cpp/src/qpid/broker/Queue.h +++ b/qpid/cpp/src/qpid/broker/Queue.h @@ -183,7 +183,7 @@ namespace qpid { Queue::shared_ptr shared_ref); QPID_BROKER_EXTERN bool acquire(const QueuedMessage& msg); - bool acquireMessageAt(const qpid::framing::SequenceNumber& position, QueuedMessage& message); + QPID_BROKER_EXTERN bool acquireMessageAt(const qpid::framing::SequenceNumber& position, QueuedMessage& message); /** * Delivers a message to the queue. Will record it as @@ -241,7 +241,7 @@ namespace qpid { /** * dequeue from store (only done once messages is acknowledged) */ - bool dequeue(TransactionContext* ctxt, const QueuedMessage &msg); + QPID_BROKER_EXTERN bool dequeue(TransactionContext* ctxt, const QueuedMessage &msg); /** * Inform the queue that a previous transactional dequeue * committed. @@ -301,7 +301,7 @@ namespace qpid { void setPosition(framing::SequenceNumber pos); int getEventMode(); void setQueueEventManager(QueueEvents&); - void insertSequenceNumbers(const std::string& key); + QPID_BROKER_EXTERN void insertSequenceNumbers(const std::string& key); /** * Notify queue that recovery has completed. */ diff --git a/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp b/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp index 5f8b57fa0b..fa891f84bf 100644 --- a/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp +++ b/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp @@ -28,11 +28,12 @@ #include "RecoveredDequeue.h" #include "qpid/framing/reply_exceptions.h" -using namespace qpid; -using namespace qpid::broker; using boost::dynamic_pointer_cast; using boost::intrusive_ptr; +namespace qpid { +namespace broker { + RecoveryManagerImpl::RecoveryManagerImpl(QueueRegistry& _queues, ExchangeRegistry& _exchanges, LinkRegistry& _links, DtxManager& _dtxMgr, uint64_t _stagingThreshold) : queues(_queues), exchanges(_exchanges), links(_links), dtxMgr(_dtxMgr), stagingThreshold(_stagingThreshold) {} @@ -252,3 +253,5 @@ void RecoverableTransactionImpl::enqueue(RecoverableQueue::shared_ptr queue, Rec { dynamic_pointer_cast<RecoverableQueueImpl>(queue)->enqueue(buffer, message); } + +}} diff --git a/qpid/cpp/src/qpid/client/Connector.cpp b/qpid/cpp/src/qpid/client/Connector.cpp index fa2c75429f..8cca36c571 100644 --- a/qpid/cpp/src/qpid/client/Connector.cpp +++ b/qpid/cpp/src/qpid/client/Connector.cpp @@ -397,7 +397,7 @@ void TCPConnector::run() { } try { socket.close(); - } catch (const std::exception& e) {} + } catch (const std::exception&) {} } void TCPConnector::activateSecurityLayer(std::auto_ptr<qpid::sys::SecurityLayer> sl) diff --git a/qpid/cpp/src/qpid/console/ConsoleImportExport.h b/qpid/cpp/src/qpid/console/ConsoleImportExport.h index e2d0af9db3..5ef8a892b1 100644 --- a/qpid/cpp/src/qpid/console/ConsoleImportExport.h +++ b/qpid/cpp/src/qpid/console/ConsoleImportExport.h @@ -21,7 +21,7 @@ */ #if defined(WIN32) && !defined(QPID_DECLARE_STATIC) -#if defined(CONSOLE_EXPORT) +#if defined(CONSOLE_EXPORT) || defined (qmfconsole_EXPORTS) #define QPID_CONSOLE_EXTERN __declspec(dllexport) #else #define QPID_CONSOLE_EXTERN __declspec(dllimport) diff --git a/qpid/cpp/src/tests/FieldTable.cpp b/qpid/cpp/src/tests/FieldTable.cpp index 9f2fd45b73..a02bbd5194 100644 --- a/qpid/cpp/src/tests/FieldTable.cpp +++ b/qpid/cpp/src/tests/FieldTable.cpp @@ -125,7 +125,7 @@ QPID_AUTO_TEST_CASE(testNestedValues) QPID_AUTO_TEST_CASE(testFloatAndDouble) { char buff[100]; - float f = 5.672; + float f = 5.672f; double d = 56.720001; { FieldTable a; diff --git a/qpid/cpp/src/tests/header_test.cpp b/qpid/cpp/src/tests/header_test.cpp index ba9ffacc9b..c36b4f3bc3 100644 --- a/qpid/cpp/src/tests/header_test.cpp +++ b/qpid/cpp/src/tests/header_test.cpp @@ -42,7 +42,7 @@ int main(int argc, char** argv) std::string q("header_interop_test_queue"); session.queueDeclare(arg::queue=q); double pi = 3.14159265; - float e = 2.71828; + float e = 2.71828f; Message msg("", q); msg.getMessageProperties().getApplicationHeaders().setDouble("pi", pi); msg.getMessageProperties().getApplicationHeaders().setFloat("e", e); |