summaryrefslogtreecommitdiff
path: root/TAO/IIOP/lib/orbobj.i
blob: ca40e34f7600c7e4cc615addd8941b1749f37109 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// $Id$

// Constructor and destructor are accessible to subclasses
ACE_INLINE
CORBA_ORB::CORBA_ORB (void)
{
  _refcount = 1;
}

ACE_INLINE
CORBA_ORB::~CORBA_ORB (void)
{
  assert (_refcount == 0);
}

// CORBA dup/release build on top of COM's (why not).

ACE_INLINE void
CORBA_release (CORBA_ORB_ptr obj)
{
  if (obj)
    obj->Release ();
}

ACE_INLINE CORBA_ORB_ptr
CORBA_ORB::_duplicate (CORBA_ORB_ptr obj)
{
  if (obj)
    obj->AddRef ();
  return obj;
}

// Null pointers represent nil objects.

ACE_INLINE CORBA_ORB_ptr
CORBA_ORB::_nil (void)
{
  return 0;
}

ACE_INLINE CORBA_Boolean
CORBA_is_nil (CORBA_ORB_ptr obj)
{
  return (CORBA_Boolean) (obj == 0);
}

ACE_INLINE ULONG __stdcall
CORBA_ORB::AddRef (void)
{
  ACE_GUARD_RETURN (ACE_Thread_Mutex, guard, lock_, 0);

  return _refcount++;
}

ACE_INLINE
TAO_Client_Factory&
CORBA_ORB::client_factory(void)
{
  return client_factory_;
}

ACE_INLINE
TAO_Server_Factory&
CORBA_ORB::server_factory(void)
{
  return server_factory_;
}

ACE_INLINE
TAO_ORB_Parameters&
CORBA_ORB::params(void)
{
  return params_;
}