Fixed_Array_Argument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Fixed_Array_Argument_T.h
00006  *
00007  *  $Id: Fixed_Array_Argument_T.h 74007 2006-08-14 12:50:21Z elliott_c $
00008  *
00009  *  @authors Jeff Parsons and Carlos O'Ryan
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_FIXED_ARRAY_ARGUMENT_T_H
00015 #define TAO_FIXED_ARRAY_ARGUMENT_T_H
00016 
00017 #include /**/ "ace/pre.h"
00018 #include "tao/Argument.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 namespace TAO
00027 {
00028   /**
00029    * @class In_Fixed_Array_Argument_T
00030    *
00031    * @brief IN stub argument of fixed size element array.
00032    *
00033    */
00034   template<typename S_forany,
00035            class Insert_Policy>
00036   class In_Fixed_Array_Argument_T : public InArgument
00037   {
00038   public:
00039     In_Fixed_Array_Argument_T (const typename S_forany::_slice_type * x);
00040 
00041     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00042 #if TAO_HAS_INTERCEPTORS == 1
00043     virtual void interceptor_value (CORBA::Any *any) const;
00044 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00045     typename S_forany::_slice_type const * arg (void) const;
00046 
00047   protected:
00048     S_forany x_;
00049   };
00050 
00051   /**
00052    * @class In_Fixed_Array_Clonable_Argument_T
00053    *
00054    * @brief IN stub argument of fixed size element array.
00055    *
00056    */
00057   template<typename S_forany,
00058            class Insert_Policy>
00059   class In_Fixed_Array_Clonable_Argument_T :
00060            public In_Fixed_Array_Argument_T<S_forany, Insert_Policy>
00061   {
00062   public:
00063     In_Fixed_Array_Clonable_Argument_T (const typename S_forany::_slice_type * x);
00064     virtual ~In_Fixed_Array_Clonable_Argument_T (void);
00065 
00066     virtual Argument* clone (void);
00067 
00068   private:
00069     bool is_clone_;
00070   };
00071 
00072   /**
00073    * @class Inout_Fixed_Array_Argument_T
00074    *
00075    * @brief INOUT stub argument of fixed size element array.
00076    *
00077    */
00078   template<typename S_forany,
00079            class Insert_Policy>
00080   class Inout_Fixed_Array_Argument_T : public InoutArgument
00081   {
00082   public:
00083     Inout_Fixed_Array_Argument_T (typename S_forany::_slice_type *&x);
00084 
00085     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00086     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00087 #if TAO_HAS_INTERCEPTORS == 1
00088     virtual void interceptor_value (CORBA::Any *any) const;
00089 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00090     typename S_forany::_slice_type * arg (void);
00091 
00092   private:
00093     S_forany x_;
00094   };
00095 
00096   /**
00097    * @class Out_Fixed_Array_Argument_T
00098    *
00099    * @brief OUT stub argument of fixed size element array.
00100    *
00101    */
00102   template<typename S_forany,
00103            class Insert_Policy>
00104   class Out_Fixed_Array_Argument_T : public OutArgument
00105   {
00106   public:
00107     Out_Fixed_Array_Argument_T (typename S_forany::_slice_type *& x);
00108 
00109     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00110 #if TAO_HAS_INTERCEPTORS == 1
00111     virtual void interceptor_value (CORBA::Any *any) const;
00112 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00113     typename S_forany::_slice_type *& arg (void);
00114 
00115   private:
00116     S_forany x_;
00117   };
00118 
00119   /**
00120    * @class Ret_Fixed_Array_Argument_T
00121    *
00122    * @brief Return stub value of fixed size element array.
00123    *
00124    */
00125   template<typename S_var,
00126            typename S_forany,
00127            class Insert_Policy>
00128   class Ret_Fixed_Array_Argument_T : public RetArgument
00129   {
00130   public:
00131     Ret_Fixed_Array_Argument_T (void);
00132 
00133     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00134 #if TAO_HAS_INTERCEPTORS == 1
00135     virtual void interceptor_value (CORBA::Any *any) const;
00136 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00137     typename S_forany::_slice_type *& arg (void);
00138 
00139     typename S_forany::_slice_type * excp (void);
00140     typename S_forany::_slice_type * retn (void);
00141 
00142   private:
00143     S_var x_;
00144   };
00145 
00146   /**
00147    * @struct Fixed_Array_Arg_Traits_T
00148    *
00149    * @brief Argument traits of fixed size element array.
00150    *
00151    */
00152   template<typename T_var,
00153            typename T_forany,
00154            class Insert_Policy>
00155   struct Fixed_Array_Arg_Traits_T
00156   {
00157     typedef typename T_forany::_slice_type *            ret_type;
00158     typedef typename T_forany::_array_type const        in_type;
00159     typedef typename T_forany::_array_type              inout_type;
00160     typedef typename T_forany::_array_type              out_type;
00161 
00162     typedef In_Fixed_Array_Argument_T<T_forany,
00163                                       Insert_Policy>         in_arg_val;
00164     typedef In_Fixed_Array_Clonable_Argument_T<T_forany,
00165                                                Insert_Policy>
00166                                                              in_clonable_arg_val;
00167     typedef Inout_Fixed_Array_Argument_T<T_forany,
00168                                          Insert_Policy>      inout_arg_val;
00169     typedef Out_Fixed_Array_Argument_T<T_forany,
00170                                        Insert_Policy>        out_arg_val;
00171     typedef Ret_Fixed_Array_Argument_T<T_var,
00172                                        T_forany,
00173                                        Insert_Policy>        ret_val;
00174   };
00175 }
00176 
00177 TAO_END_VERSIONED_NAMESPACE_DECL
00178 
00179 #if defined (__ACE_INLINE__)
00180 #include "tao/Fixed_Array_Argument_T.inl"
00181 #endif /* __ACE_INLINE__ */
00182 
00183 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00184 #include "tao/Fixed_Array_Argument_T.cpp"
00185 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00186 
00187 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00188 #pragma implementation ("Fixed_Array_Argument_T.cpp")
00189 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00190 
00191 #include /**/ "ace/post.h"
00192 
00193 #endif /* TAO_FIXED_ARRAY_ARGUMENT_T_H */

Generated on Tue Feb 2 17:37:51 2010 for TAO by  doxygen 1.4.7