Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Object_Reference_Traits_Base_T.h
blob22be2aea432b8f2ad1f366491f2bea726bd0df06
1 #ifndef object_reference_traits_base_hpp
2 #define object_reference_traits_base_hpp
3 /**
4 * @file
6 * @brief Base class for the object reference traits.
8 * @author Carlos O'Ryan
9 */
11 #include "tao/Objref_VarOut_T.h"
13 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
15 namespace TAO
17 namespace details
19 template<typename object_t, typename object_t_var>
20 struct object_reference_traits_base
22 typedef object_t object_type;
23 typedef object_type * value_type;
24 typedef object_type const * const_value_type;
25 typedef object_t_var object_type_var;
27 inline static void release(object_type * object)
29 TAO::Objref_Traits<object_type>::release(object);
32 inline static object_type * duplicate(object_type * object)
34 return TAO::Objref_Traits<object_type>::duplicate(object);
37 inline static object_type * nil()
39 return TAO::Objref_Traits<object_type>::nil();
42 inline static object_type * default_initializer()
44 return nil();
47 } // namespace details
48 } // namespace TAO
50 TAO_END_VERSIONED_NAMESPACE_DECL
52 #endif // object_reference_traits_base_hpp