summaryrefslogtreecommitdiff
path: root/TAO/tao/varout.cpp
blob: 33340e2ec6b860989957fc4a62586a3f19213a56 (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
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO
//
// = FILENAME
//    varout.cpp
//
// = DESCRIPTION
//     Templates for _var and _out types
//
// = AUTHOR
//
//   Aniruddha Gokhale
//   Carlos O'Ryan
// ============================================================================

#if !defined (TAO_VAROUT_C)
#define TAO_VAROUT_C

#include "tao/varout.h"

#if !defined (__ACE_INLINE__)
#include "tao/varout.i"
#endif /* __ACE_INLINE__ */

ACE_RCSID(tao, varout, "$Id$")

template<class T> void
TAO_Object_Field_T<T>::_downcast (CORBA_Object* base_ptr,
				  CORBA_Environment &env)
{
  CORBA::release (this->ptr_);
  this->ptr_ = 0;
  this->ptr_ = T::_narrow (base_ptr, env);
  if (env.exception () != 0) return;
}

template<class T> CORBA_Object*
TAO_Object_Field_T<T>::_upcast (void)
{
  return this->ptr_;
}

template<class T> void
TAO_Object_Field_T<T>::_release (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = 0;
}

#endif /* TAO_VAROUT_C */