summaryrefslogtreecommitdiff
path: root/TAO/tao/NVList.i
blob: e2f191fd9454bf38090c1255e614724100dda8bc (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// -*- C++ -*-
//
// $Id$

ACE_INLINE CORBA::Boolean
CORBA::is_nil (CORBA::NamedValue_ptr nv)
{
  return nv == 0;
}

ACE_INLINE void
CORBA::release (CORBA::NamedValue_ptr nv)
{
  if (nv)
    nv->_decr_refcnt ();
}

// *************************************************************

ACE_INLINE
CORBA::NamedValue::NamedValue (void)
  : refcount_ (1),
    flags_ (0),
    name_ (0)
{
}

ACE_INLINE 
const char *
CORBA::NamedValue::name (void) const
{
  return this->name_;
}

ACE_INLINE 
CORBA::Any_ptr
CORBA::NamedValue::value (void) const
{
  return ACE_const_cast (CORBA::Any_ptr, &this->any_);
}

ACE_INLINE 
CORBA::Flags
CORBA::NamedValue::flags (void) const
{
  return this->flags_;
}

ACE_INLINE 
CORBA::NamedValue *
CORBA::NamedValue::_duplicate (CORBA::NamedValue * x)
{
  if (x != 0)
    {
      x->_incr_refcnt ();
    }

  return x;
}

ACE_INLINE 
CORBA::NamedValue*
CORBA::NamedValue::_nil (void)
{
  return 0;
}

// *************************************************************

ACE_INLINE 
CORBA::Boolean
CORBA::is_nil (CORBA::NVList_ptr nvl)
{
  return (CORBA::Boolean) (nvl == 0);
}

ACE_INLINE 
void
CORBA::release (CORBA::NVList_ptr nvl)
{
  if (nvl)
    {
      nvl->_decr_refcnt ();
    }
}

// ****************************************************************

ACE_INLINE
CORBA::NVList::NVList (void)
  : max_ (0),
    refcount_ (1),
    incoming_ (0),
    incoming_flag_ (0)
{
}

ACE_INLINE 
CORBA::ULong
CORBA::NVList::count (ACE_ENV_SINGLE_ARG_DECL) const
{
  (ACE_const_cast (CORBA::NVList *,
                   this))->evaluate (ACE_ENV_SINGLE_ARG_PARAMETER);
  ACE_CHECK_RETURN (0);

  return this->max_;
}

ACE_INLINE 
CORBA::NVList *
CORBA::NVList::_duplicate (CORBA::NVList * x)
{
  if (x != 0)
    {
      x->_incr_refcnt ();
    }

  return x;
}

ACE_INLINE 
CORBA::NVList *
CORBA::NVList::_nil (void)
{
  return 0;
}