blob: a44313f7874f534e70d1e3b66d9c9f0a00c8b757 (
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
48
49
50
51
52
53
54
55
56
|
// -*- C++ -*-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
TAO_ORB_Core_Auto_Ptr::TAO_ORB_Core_Auto_Ptr (TAO_ORB_Core *p)
: p_ (p)
{
}
ACE_INLINE TAO_ORB_Core *
TAO_ORB_Core_Auto_Ptr::get () const
{
return this->p_;
}
ACE_INLINE TAO_ORB_Core *
TAO_ORB_Core_Auto_Ptr::release (void)
{
TAO_ORB_Core *old = this->p_;
this->p_ = 0;
return old;
}
ACE_INLINE TAO_ORB_Core *
TAO_ORB_Core_Auto_Ptr::operator-> () const
{
return this->get ();
}
ACE_INLINE
TAO_ORB_Core_Auto_Ptr::TAO_ORB_Core_Auto_Ptr (TAO_ORB_Core_Auto_Ptr &rhs)
: p_ (rhs.release ())
{
}
ACE_INLINE TAO_ORB_Core_Auto_Ptr &
TAO_ORB_Core_Auto_Ptr::operator= (TAO_ORB_Core_Auto_Ptr &rhs)
{
if (this != &rhs)
{
this->reset (rhs.release ());
}
return *this;
}
// Accessor methods to the underlying ORB_Core Object
ACE_INLINE TAO_ORB_Core &
TAO_ORB_Core_Auto_Ptr::operator *() const
{
// @@ Potential problem if this->p_ is zero!
return *this->get ();
}
TAO_END_VERSIONED_NAMESPACE_DECL
|