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;
84 // Unimplemented - prevents widening assignment.
85 TAO_Pseudo_Var_T (const TAO_Base_var
&);
86 void operator= (const TAO_Base_var
&);
89 typename
T::_ptr_type ptr_
;
93 * @class TAO_Pseudo_Out_T
95 * @brief Parametrized implementation of _out class for
96 * TypeCode, Object, AbstractBase, NamedValue, NVList,
97 * Principal, Request, Context, ORB, LocalObject,
100 template <typename T
>
101 class TAO_Pseudo_Out_T
104 TAO_Pseudo_Out_T (typename
T::_ptr_type
&);
105 TAO_Pseudo_Out_T (typename
T::_var_type
&);
106 TAO_Pseudo_Out_T (const TAO_Pseudo_Out_T
<T
> &);
108 TAO_Pseudo_Out_T
<T
> & operator= (const TAO_Pseudo_Out_T
<T
> &);
109 TAO_Pseudo_Out_T
<T
> & operator= (typename
T::_ptr_type
);
111 operator typename
T::_ptr_type
& ();
112 typename
T::_ptr_type
& ptr ();
113 typename
T::_ptr_type
operator-> ();
116 typename
T::_ptr_type
& ptr_
;
118 /// Assignment from _var not allowed.
119 TAO_Pseudo_Out_T
<T
> & operator= (const typename
T::_var_type
&);
122 TAO_END_VERSIONED_NAMESPACE_DECL
124 #if defined (__ACE_INLINE__)
125 #include "tao/Pseudo_VarOut_T.inl"
126 #endif /* __ACE_INLINE__ */
128 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
129 #include "tao/Pseudo_VarOut_T.cpp"
130 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
132 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
133 #pragma implementation ("Pseudo_VarOut_T.cpp")
134 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
136 #include /**/ "ace/post.h"
138 #endif /* TAO_PSEUDO_VAROUT_T_H */