summaryrefslogtreecommitdiff
path: root/TAO/tao/Bind_Dispatcher_Guard.i
blob: f0a5747940f69196de0397e0847ea32cde10847e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// This may look like C, but it's really -*- C++ -*-
// $Id$

// ===========================================================================
//
// = LIBRARY
//     TAO
//
// = AUTHOR
//     Carlos O'Ryan <coryan@uci.edu>,
//     Chad Elliott <elliott_c@ociweb.com>
//
// ===========================================================================

#include "tao/Reply_Dispatcher.h"
#include "tao/Transport_Mux_Strategy.h"


ACE_INLINE
TAO_Bind_Dispatcher_Guard::TAO_Bind_Dispatcher_Guard (
                                         CORBA::ULong request_id,
                                         TAO_Reply_Dispatcher* rd,
                                         TAO_Transport_Mux_Strategy* tms)
 : status_(0),
   request_id_(request_id),
   rd_(rd),
   tms_(tms)
{
  this->status_ = this->tms_->bind_dispatcher (this->request_id_,
                                               this->rd_);
}


ACE_INLINE
TAO_Bind_Dispatcher_Guard::~TAO_Bind_Dispatcher_Guard (void)
{
  if (this->status_ == 0) {
    this->tms_->unbind_dispatcher (this->request_id_);
  }
}


ACE_INLINE int &
TAO_Bind_Dispatcher_Guard::status (void)
{
  return status_;
}