BD_String_Argument_T.cpp

Go to the documentation of this file.
00001 // BD_String_Argument_T.cpp,v 1.15 2006/06/27 06:22:13 jwillemsen Exp
00002 
00003 #ifndef TAO_BD_STRING_ARGUMENT_T_CPP
00004 #define TAO_BD_STRING_ARGUMENT_T_CPP
00005 
00006 #include "tao/BD_String_Argument_T.h"
00007 
00008 #if !defined (__ACE_INLINE__)
00009 #include "tao/BD_String_Argument_T.inl"
00010 #endif /* __ACE_INLINE__ */
00011 
00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00013 
00014 template<typename S_var,
00015          size_t BOUND,
00016          class Insert_Policy>
00017 CORBA::Boolean
00018 TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::marshal (
00019     TAO_OutputCDR & cdr
00020   )
00021 {
00022   typedef typename S_var::s_traits::from_type from_type;
00023   return cdr << from_type (this->x_, BOUND);
00024 }
00025 
00026 #if TAO_HAS_INTERCEPTORS == 1
00027 
00028 template<typename S_var,
00029          size_t BOUND,
00030          class Insert_Policy>
00031 void
00032 TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value (
00033   CORBA::Any *any) const
00034 {
00035   typedef typename S_var::s_traits::from_type from_type;
00036   Insert_Policy::any_insert (
00037       any,
00038       from_type (this->x_, BOUND)
00039     );
00040 }
00041 
00042 #endif /* TAO_HAS_INTERCEPTORS */
00043 
00044 // ===========================================================
00045 
00046 template<typename S_var,
00047          size_t BOUND,
00048          class Insert_Policy>
00049 CORBA::Boolean
00050 TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::marshal (
00051     TAO_OutputCDR & cdr
00052   )
00053 {
00054   typedef typename S_var::s_traits::from_type from_type;
00055   return cdr << from_type (this->x_, BOUND);
00056 }
00057 
00058 template<typename S_var,
00059          size_t BOUND,
00060          class Insert_Policy>
00061 CORBA::Boolean
00062 TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal (
00063     TAO_InputCDR & cdr
00064   )
00065 {
00066   typedef typename S_var::s_traits::to_type to_type;
00067   delete [] this->x_;
00068   return cdr >> to_type (this->x_, BOUND);
00069 }
00070 
00071 #if TAO_HAS_INTERCEPTORS == 1
00072 
00073 template<typename S_var,
00074          size_t BOUND,
00075          class Insert_Policy>
00076 void
00077 TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value (
00078   CORBA::Any *any) const
00079 {
00080   typedef typename S_var::s_traits::from_type from_type;
00081   Insert_Policy::any_insert (
00082       any,
00083       from_type (this->x_, BOUND)
00084     );
00085 }
00086 
00087 #endif /* TAO_HAS_INTERCEPTORS */
00088 
00089 // ==============================================================
00090 
00091 template<typename S_var,
00092          size_t BOUND,
00093          class Insert_Policy>
00094 CORBA::Boolean
00095 TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal (
00096     TAO_InputCDR & cdr
00097   )
00098 {
00099   typedef typename S_var::s_traits::to_type to_type;
00100   return cdr >> to_type (this->x_, BOUND);
00101 }
00102 
00103 #if TAO_HAS_INTERCEPTORS == 1
00104 
00105 template<typename S_var,
00106          size_t BOUND,
00107          class Insert_Policy>
00108 void
00109 TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value (
00110   CORBA::Any *any) const
00111 {
00112   typedef typename S_var::s_traits::from_type from_type;
00113   Insert_Policy::any_insert (
00114       any,
00115       from_type (this->x_, BOUND)
00116     );
00117 }
00118 
00119 #endif /* TAO_HAS_INTERCEPTORS */
00120 
00121 // ============================================================
00122 
00123 template<typename S_var,
00124          size_t BOUND,
00125          class Insert_Policy>
00126 CORBA::Boolean
00127 TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal (
00128     TAO_InputCDR & cdr
00129   )
00130 {
00131   typedef typename S_var::s_traits::to_type to_type;
00132   return cdr >> to_type (this->x_.out (), BOUND);
00133 }
00134 
00135 #if TAO_HAS_INTERCEPTORS == 1
00136 
00137 template<typename S_var,
00138          size_t BOUND,
00139          class Insert_Policy>
00140 void
00141 TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value (
00142   CORBA::Any *any) const
00143 {
00144   typedef typename S_var::s_traits::from_type from_type;
00145   Insert_Policy::any_insert (
00146       any,
00147       from_type (this->x_.in (), BOUND)
00148     );
00149 }
00150 
00151 #endif /* TAO_HAS_INTERCEPTORS */
00152 
00153 TAO_END_VERSIONED_NAMESPACE_DECL
00154 
00155 #endif /* TAO_BD_STRING_ARGUMENT_T_CPP */

Generated on Thu Nov 9 11:54:07 2006 for TAO by doxygen 1.3.6