summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/TypeCode_Base_Attributes.inl
blob: d94e65040a6b4d813ed4466cbb90a359795df845 (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
// -*- C++ -*-
//
// $Id$

#include "tao/AnyTypeCode/TypeCode_Traits.h"


template <typename STRING_TYPE>
ACE_INLINE
TAO::TypeCode::Base_Attributes<STRING_TYPE>::Base_Attributes (
  char const * id,
  char const * name)
  : id_ (id),
    name_ (name)
{
}

template <typename STRING_TYPE>
ACE_INLINE
TAO::TypeCode::Base_Attributes<STRING_TYPE>::Base_Attributes (
  char const * id)
  : id_ (id),
    name_ ()
{
  // Only used in the dynamic (when STRING_TYPE == CORBA::String_var)
  // recursive TypeCode case.
}

template <typename STRING_TYPE>
ACE_INLINE char const *
TAO::TypeCode::Base_Attributes<STRING_TYPE>::id (void) const
{
  return Traits<STRING_TYPE>::get_string (this->id_);
}

template <typename STRING_TYPE>
ACE_INLINE char const *
TAO::TypeCode::Base_Attributes<STRING_TYPE>::name (void) const
{
  return Traits<STRING_TYPE>::get_string (this->name_);
}

template <typename STRING_TYPE>
ACE_INLINE void
TAO::TypeCode::Base_Attributes<STRING_TYPE>::name (char const * the_name)
{
  // This method will only be instantiated in the dynamic TypeCode
  // case, i.e. when STRING_TYPE is CORBA::String_var.

  this->name_ = the_name;
}