summaryrefslogtreecommitdiff
path: root/TAO/tao/Principal.inl
blob: bf5e3c6993d7c3848cd9ecbd4ded128b0f82d24b (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
// -*- C++ -*-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_INLINE
unsigned long
CORBA::Principal::_decr_refcount ()
{
  unsigned long const new_count = --this->refcount_;

  if (new_count == 0)
    delete this;

  return new_count;
}

ACE_INLINE
unsigned long
CORBA::Principal::_incr_refcount ()
{
  return ++this->refcount_;
}


ACE_INLINE
CORBA::Principal *
CORBA::Principal::_duplicate (CORBA::Principal * x)
{
  if (x)
    {
      x->_incr_refcount ();
    }

  return x;
}


ACE_INLINE
CORBA::Principal *
CORBA::Principal::_nil ()
{
  return nullptr;
}

TAO_END_VERSIONED_NAMESPACE_DECL