diff options
Diffstat (limited to 'TAO/tao/Reply_Dispatcher.h')
-rw-r--r-- | TAO/tao/Reply_Dispatcher.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h index e291148edfe..810e6b9ed39 100644 --- a/TAO/tao/Reply_Dispatcher.h +++ b/TAO/tao/Reply_Dispatcher.h @@ -27,6 +27,14 @@ #include "tao/Basic_Types.h" #include "tao/GIOPC.h" +#include "ace/Atomic_Op.h" +#include "ace/Intrusive_Auto_Ptr.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +class ACE_Allocator; +ACE_END_VERSIONED_NAMESPACE_DECL + + TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Forward Declarations. @@ -52,7 +60,7 @@ class TAO_Export TAO_Reply_Dispatcher public: /// Constructor. - TAO_Reply_Dispatcher (void); + TAO_Reply_Dispatcher (ACE_Allocator *allocator = 0); /// Destructor. virtual ~TAO_Reply_Dispatcher (void); @@ -86,12 +94,23 @@ public: GIOP::ReplyStatusType reply_status (void) const; + static void intrusive_add_ref (TAO_Reply_Dispatcher*); + static void intrusive_remove_ref (TAO_Reply_Dispatcher*); + protected: /// LocateReply status. GIOP::LocateStatusType locate_reply_status_; // RequestReply status GIOP::ReplyStatusType reply_status_; + +private: + /// Support for intrusive reference counting + ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> refcnt_; + + /// Allocator that was used to allocate this reply dispatcher. In case of + /// zero we come from the heap. + ACE_Allocator *allocator_; }; TAO_END_VERSIONED_NAMESPACE_DECL |