summaryrefslogtreecommitdiff
path: root/TAO/tests/Sequence_Unit_Tests/object_reference_traits_base.hpp
blob: a05b224f327f10f862754c23d7f943cb39ed9483 (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
#ifndef guard_string_traits_base_hpp
#define guard_string_traits_base_hpp
/**
 * @file
 *
 * @brief Base class for the object reference traits.
 *
 * $Id$
 *
 * @author Carlos O'Ryan
 */

namespace TAO
{
namespace details
{

template<typename object_t>
struct object_reference_traits_base
{
  typedef object_t object_type;
  typedef object_type * value_type;
  typedef object_type const * const_value_type;

  typedef typename object_type::_var_type object_type_var;

  inline static void release(object_type * object)
  {
    object_type::_tao_release(object);
  }

  inline static object_type * duplicate(object_type * object)
  {
    return object_type::_duplicate(object);
  }

  inline static object_type * nil()
  {
    return object_type::_nil();
  }

  inline static object_type * default_initializer()
  {
    return nil();
  }
};

} // namespace details
} // namespace TAO

#endif // guard_string_traits_base_hpp