diff options
author | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-25 11:47:28 +0000 |
---|---|---|
committer | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-25 11:47:28 +0000 |
commit | df9f285e01379f15610abdb3676ee4b5dfca48c6 (patch) | |
tree | 7271a582690a32fa042e3eaedbea223a14d59281 | |
parent | 7e0df4f80e2e24fdf54b4d446a0a3522a2921e46 (diff) | |
download | ATCD-df9f285e01379f15610abdb3676ee4b5dfca48c6.tar.gz |
ChangeLogTag: Mon Sep 25 11:39:35 UTC 2006 Boris Kolpackov <boris@codesynthesis.com>
-rw-r--r-- | ACE/ChangeLog | 16 | ||||
-rw-r--r-- | ACE/ace/Bound_Ptr.h | 8 | ||||
-rw-r--r-- | ACE/ace/Bound_Ptr.inl | 8 | ||||
-rw-r--r-- | ACE/protocols/ace/TMCast/Messaging.hpp | 4 | ||||
-rw-r--r-- | ACE/protocols/ace/TMCast/TransactionController.hpp | 10 |
5 files changed, 32 insertions, 14 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index ad091760661..a63b483848b 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,9 +1,23 @@ +Mon Sep 25 11:39:35 UTC 2006 Boris Kolpackov <boris@codesynthesis.com> + + * ace/Bound_Ptr.inl: + * ace/Bound_Ptr.h: + + Applied workarounds that should fix compile errors on BCB6. + Thanks to Martin Corino <mcorino at remedy.nl> for providing + the patch. + + * protocols/ace/TMCast/Messaging.hpp: + * protocols/ace/TMCast/TransactionController.hpp: + + Updated to use ACE_Strong_Bound_Ptr. + Fri Sep 22 12:42:37 UTC 2006 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu> * docs/index.html: Added a link to the http://www.acejoy.com ACE developers website in China. Thanks to Winston Zhang <webmaster at acejoy dot com> for creating this website. - + Tue Sep 19 12:27:47 UTC 2006 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu> * tests/Unload_libACE.cpp: Fixed the formatting of this file so it diff --git a/ACE/ace/Bound_Ptr.h b/ACE/ace/Bound_Ptr.h index 619e0c4eb87..07b54f69962 100644 --- a/ACE/ace/Bound_Ptr.h +++ b/ACE/ace/Bound_Ptr.h @@ -131,7 +131,7 @@ public: template <class Y> ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr<Y, ACE_LOCK> &r) : counter_ (r.counter_), - ptr_ (dynamic_cast<X*>(r.ptr_)) + ptr_ (dynamic_cast<X_t*>(r.ptr_)) { // This ctor is temporarily defined here to increase our chances // of being accepted by broken compilers. @@ -161,7 +161,7 @@ public: // This will work if &r == this, by first increasing the ref count COUNTER *new_counter = r.counter_; - X* new_ptr = dynamic_cast<X*> (r.ptr_); + X* new_ptr = dynamic_cast<X_t*> (r.ptr_); COUNTER::attach_strong (new_counter); if (COUNTER::detach_strong (this->counter_) == 0) delete this->ptr_; @@ -229,6 +229,8 @@ public: ACE_ALLOC_HOOK_DECLARE; private: + typedef X X_t; // This indirection is for Borland C++. + friend class ACE_Weak_Bound_Ptr<X, ACE_LOCK>; template <class Y, class L> @@ -363,6 +365,8 @@ public: ACE_ALLOC_HOOK_DECLARE; private: + typedef X X_t; // This indirection is for Borland C++. + friend class ACE_Strong_Bound_Ptr<X, ACE_LOCK>; /// The ACE_Bound_Ptr_Counter type. diff --git a/ACE/ace/Bound_Ptr.inl b/ACE/ace/Bound_Ptr.inl index bcbf6e8890f..c99cf0843f3 100644 --- a/ACE/ace/Bound_Ptr.inl +++ b/ACE/ace/Bound_Ptr.inl @@ -194,7 +194,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Strong_Bound_Ptr<X, ACE // This will work if &r == this, by first increasing the ref count COUNTER *new_counter = rhs.counter_; - X *new_ptr = rhs.ptr_; + X_t *new_ptr = rhs.ptr_; COUNTER::attach_strong (new_counter); if (COUNTER::detach_strong (this->counter_) == 0) delete this->ptr_; @@ -208,7 +208,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Weak_Bound_Ptr<X, ACE_L // This will work if &r == this, by first increasing the ref count COUNTER *new_counter = rhs.counter_; - X *new_ptr = rhs.ptr_; + X_t *new_ptr = rhs.ptr_; // When creating a strong pointer from a weak one we can't assume that the // underlying object still exists. Therefore we must check for a return value @@ -292,7 +292,7 @@ template<class X, class ACE_LOCK> inline void ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (X *p) { COUNTER *old_counter = this->counter_; - X *old_ptr = this->ptr_; + X_t *old_ptr = this->ptr_; this->counter_ = COUNTER::create_strong (); this->ptr_ = p; if (COUNTER::detach_strong (old_counter) == 0) @@ -303,7 +303,7 @@ template<class X, class ACE_LOCK> inline void ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (auto_ptr<X> p) { COUNTER *old_counter = this->counter_; - X *old_ptr = this->ptr_; + X_t *old_ptr = this->ptr_; this->counter_ = COUNTER::create_strong (); this->ptr_ = p.release (); if (COUNTER::detach_strong (old_counter) == 0) diff --git a/ACE/protocols/ace/TMCast/Messaging.hpp b/ACE/protocols/ace/TMCast/Messaging.hpp index 886745d1120..f17dd40b03c 100644 --- a/ACE/protocols/ace/TMCast/Messaging.hpp +++ b/ACE/protocols/ace/TMCast/Messaging.hpp @@ -6,7 +6,7 @@ #define TMCAST_MESSAGING_HPP #include <ace/Synch.h> -#include <ace/Refcounted_Auto_Ptr.h> +#include <ace/Bound_Ptr.h> #include "MTQueue.hpp" @@ -20,7 +20,7 @@ namespace ACE_TMCast }; typedef - ACE_Refcounted_Auto_Ptr<Message, ACE_Null_Mutex> + ACE_Strong_Bound_Ptr<Message, ACE_SYNCH_MUTEX> MessagePtr; typedef diff --git a/ACE/protocols/ace/TMCast/TransactionController.hpp b/ACE/protocols/ace/TMCast/TransactionController.hpp index 6b0d4281655..0ed5002bdf1 100644 --- a/ACE/protocols/ace/TMCast/TransactionController.hpp +++ b/ACE/protocols/ace/TMCast/TransactionController.hpp @@ -5,7 +5,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_stdlib.h" #include "ace/Synch.h" -#include "ace/Refcounted_Auto_Ptr.h" +#include "ace/Bound_Ptr.h" #include "Protocol.hpp" #include "Messaging.hpp" @@ -45,7 +45,7 @@ namespace ACE_TMCast }; typedef - ACE_Refcounted_Auto_Ptr<Send, ACE_Null_Mutex> + ACE_Strong_Bound_Ptr<Send, ACE_SYNCH_MUTEX> SendPtr; @@ -76,7 +76,7 @@ namespace ACE_TMCast }; typedef - ACE_Refcounted_Auto_Ptr<Recv, ACE_Null_Mutex> + ACE_Strong_Bound_Ptr<Recv, ACE_SYNCH_MUTEX> RecvPtr; class Aborted : public virtual Message {}; @@ -129,7 +129,7 @@ namespace ACE_TMCast else // joined transaction { MessageQueueAutoLock lock (recv_out_); - recv_out_.push (MessagePtr (recv_.release ())); + recv_out_.push (MessagePtr (recv_)); recv_ = RecvPtr (); } } @@ -346,7 +346,7 @@ namespace ACE_TMCast if (typeid (*m) == typeid (Send)) { - send_ = SendPtr (dynamic_cast<Send*> (m.release ())); + send_ = SendPtr (m); } else { |