3 //=============================================================================
5 * @file Pseudo_VarOut_T.h
7 * @note This header should be included after all types to be passed
8 * as template parameters to the TAO_Pseudo_{Var,Out}_T template
9 * classes have been declared. If the types in question are defined
10 * in another header, include that header before this one.
12 * Including other headers like "tao/CORBA_methods.h" here can cause
13 * circular dependency related problems when using compilers that
14 * lookup and bind non-dependent names in templates at definition time
15 * (i.e. while parsing the code) instead of at instantiation time.
17 * @todo Look into adding a template parameter to each of the
18 * templates in question that would be a trait containing the
19 * means for releasing references managed by the templates.
20 * Doing so should work around the non-dependent name issues in
21 * g++ 3.4, thus easing the requirement that this header be
26 * @author Jeff Parsons
28 //=============================================================================
31 #ifndef TAO_PSEUDO_VAROUT_T_H
32 #define TAO_PSEUDO_VAROUT_T_H
34 #include /**/ "ace/pre.h"
36 #if !defined (ACE_LACKS_PRAGMA_ONCE)
38 #endif /* ACE_LACKS_PRAGMA_ONCE */
40 #include "tao/varbase.h"
42 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
45 * @class TAO_Pseudo_Var_T
47 * @brief Parametrized implementation of _var class for
48 * TypeCode, Object, AbstractBase, NamedValue, NVList,
49 * Principal, Request, Context, ORB, LocalObject,
53 class TAO_Pseudo_Var_T
: private TAO_Base_var
57 TAO_Pseudo_Var_T (typename
T::_ptr_type
);
58 TAO_Pseudo_Var_T (const TAO_Pseudo_Var_T
<T
> &);
62 TAO_Pseudo_Var_T
<T
> & operator= (typename
T::_ptr_type
);
63 TAO_Pseudo_Var_T
<T
> & operator= (const TAO_Pseudo_Var_T
<T
> &);
65 typename
T::_ptr_type
operator-> () const;
67 operator typename
T::_ptr_type
const & () const;
68 operator typename
T::_ptr_type
& ();
70 typedef typename
T::_ptr_type _in_type
;
71 typedef typename
T::_ptr_type
& _inout_type
;
72 typedef typename
T::_ptr_type
& _out_type
;
73 typedef typename
T::_ptr_type _retn_type
;
81 _retn_type
ptr () const;
83 // Unimplemented - prevents widening assignment.
84 TAO_Pseudo_Var_T (const TAO_Base_var
&);
85 void operator= (const TAO_Base_var
&);
88 typename
T::_ptr_type ptr_
;
92 * @class TAO_Pseudo_Out_T
94 * @brief Parametrized implementation of _out class for
95 * TypeCode, Object, AbstractBase, NamedValue, NVList,
96 * Principal, Request, Context, ORB, LocalObject,
100 class TAO_Pseudo_Out_T
103 TAO_Pseudo_Out_T (typename
T::_ptr_type
&);
104 TAO_Pseudo_Out_T (typename
T::_var_type
&);
105 TAO_Pseudo_Out_T (const TAO_Pseudo_Out_T
<T
> &);
107 TAO_Pseudo_Out_T
<T
> & operator= (const TAO_Pseudo_Out_T
<T
> &);
108 TAO_Pseudo_Out_T
<T
> & operator= (typename
T::_ptr_type
);
110 operator typename
T::_ptr_type
& ();
111 typename
T::_ptr_type
& ptr ();
112 typename
T::_ptr_type
operator-> ();
115 typename
T::_ptr_type
& ptr_
;
117 /// Assignment from _var not allowed.
118 TAO_Pseudo_Out_T
<T
> & operator= (const typename
T::_var_type
&);
121 TAO_END_VERSIONED_NAMESPACE_DECL
123 #if defined (__ACE_INLINE__)
124 #include "tao/Pseudo_VarOut_T.inl"
125 #endif /* __ACE_INLINE__ */
127 #include "tao/Pseudo_VarOut_T.cpp"
129 #include /**/ "ace/post.h"
131 #endif /* TAO_PSEUDO_VAROUT_T_H */