Fixed_Size_SArgument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Fixed_Size_SArgument_T.h
00006  *
00007  *  $Id: Fixed_Size_SArgument_T.h 73268 2006-06-27 06:23:42Z jwillemsen $
00008  *
00009  *  @author Jeff Parsons
00010  *  @author Carlos O'Ryan
00011  *  @author Ossama Othman
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_FIXED_SIZE_SARGUMENT_T_H
00016 #define TAO_FIXED_SIZE_SARGUMENT_T_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/Argument.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 namespace TAO
00029 {
00030   /**
00031    * @class In_Fixed_Size_SArgument_T
00032    *
00033    * @brief Skeleton class template for operation "IN" arguments of
00034    *        fixed size IDL types.
00035    *
00036    * Skeleton class template for operation "IN" arguments of fixed
00037    * size IDL types.
00038    */
00039   template<typename S, class Insert_Policy>
00040   class In_Fixed_Size_SArgument_T : public InArgument
00041   {
00042   public:
00043 
00044     /**
00045      * @name @c TAO::Argument Method Overrides
00046      *
00047      * @c TAO::Argument method overrides specific to the type of
00048      * operation argument represented by this class.
00049      *
00050      * @see @c TAO::Argument.
00051      */
00052     //@{
00053     virtual CORBA::Boolean demarshal (TAO_InputCDR & cdr);
00054 
00055 #if TAO_HAS_INTERCEPTORS == 1
00056     virtual void interceptor_value (CORBA::Any *any) const;
00057 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00058     //@}
00059 
00060     /// Retrieve underlying argument.
00061     S const & arg (void) const;
00062 
00063   private:
00064 
00065     /// Reference to the "IN" argument.
00066     S x_;
00067 
00068   };
00069 
00070   // ------------------------------------------------------------
00071 
00072   /**
00073    * @class Inout_Fixed_Size_SArgument_T
00074    *
00075    * @brief Template class for INOUT skeleton arg of fixed size IDL types.
00076    *
00077    */
00078   template<typename S, class Insert_Policy>
00079   class Inout_Fixed_Size_SArgument_T : public InoutArgument
00080   {
00081   public:
00082 
00083     /// Constructor.
00084     Inout_Fixed_Size_SArgument_T (void);
00085 
00086     /**
00087      * @name @c TAO::Argument Method Overrides
00088      *
00089      * @c TAO::Argument method overrides specific to the type of
00090      * operation argument represented by this class.
00091      *
00092      * @see @c TAO::Argument.
00093      */
00094     //@{
00095     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00096     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00097 #if TAO_HAS_INTERCEPTORS == 1
00098     virtual void interceptor_value (CORBA::Any *any) const;
00099 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00100     //@}
00101 
00102     S & arg (void);
00103 
00104   private:
00105 
00106     S x_;
00107   };
00108 
00109   // ------------------------------------------------------------
00110 
00111   /**
00112    * @class Out_Fixed_Size_SArgument_T
00113    *
00114    * @brief Template class for OUT skeleton argument of fixed size IDL types.
00115    *
00116    */
00117   template<typename S, class Insert_Policy>
00118   class Out_Fixed_Size_SArgument_T : public OutArgument
00119   {
00120   public:
00121 
00122     /// Constructor.
00123     Out_Fixed_Size_SArgument_T (void);
00124 
00125     /**
00126      * @name @c TAO::Argument Method Overrides
00127      *
00128      * @c TAO::Argument method overrides specific to the type of
00129      * operation argument represented by this class.
00130      *
00131      * @see @c TAO::Argument.
00132      */
00133     //@{
00134     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00135 #if TAO_HAS_INTERCEPTORS == 1
00136     virtual void interceptor_value (CORBA::Any *any) const;
00137 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00138     //@}
00139 
00140     S & arg (void);
00141 
00142   private:
00143 
00144     S x_;
00145 
00146   };
00147 
00148   // ------------------------------------------------------------
00149 
00150   /**
00151    * @class Ret_Fixed_Size_SArgument_T
00152    *
00153    * @brief Template class for return skeleton value of fixed size IDL types.
00154    *
00155    */
00156   template<typename S, class Insert_Policy>
00157   class Ret_Fixed_Size_SArgument_T : public RetArgument
00158   {
00159   public:
00160 
00161     /// Constructor.
00162     Ret_Fixed_Size_SArgument_T (void);
00163 
00164     /**
00165      * @name @c TAO::Argument Method Overrides
00166      *
00167      * @c TAO::Argument method overrides specific to the type of
00168      * operation argument represented by this class.
00169      *
00170      * @see @c TAO::Argument.
00171      */
00172     //@{
00173     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00174 #if TAO_HAS_INTERCEPTORS == 1
00175     virtual void interceptor_value (CORBA::Any *any) const;
00176 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00177     //@}
00178 
00179     S & arg (void);
00180 
00181   private:
00182 
00183     S x_;
00184 
00185   };
00186 
00187   // ------------------------------------------------------------
00188 
00189   /**
00190    * @struct Fixed_Size_SArg_Traits_T
00191    *
00192    * @brief Template class for argument traits of fixed size IDL types.
00193    *
00194    */
00195   template<typename T,
00196            class Insert_Policy>
00197   struct Fixed_Size_SArg_Traits_T
00198   {
00199     typedef T                                               ret_type;
00200     typedef T const &                                       in_type;
00201     typedef T &                                             inout_type;
00202     typedef T &                                             out_type;
00203 
00204     typedef In_Fixed_Size_SArgument_T<T,Insert_Policy>      in_arg_val;
00205     typedef Inout_Fixed_Size_SArgument_T<T,Insert_Policy>   inout_arg_val;
00206     typedef Out_Fixed_Size_SArgument_T<T,Insert_Policy>     out_arg_val;
00207     typedef Ret_Fixed_Size_SArgument_T<T,Insert_Policy>     ret_val;
00208 
00209     // Typedefs corresponding to return value of arg() method in both
00210     // the client and server side argument class templates.
00211     typedef in_type                                         in_arg_type;
00212     typedef inout_type                                      inout_arg_type;
00213     typedef out_type                                        out_arg_type;
00214     typedef out_type                                        ret_arg_type;
00215   };
00216 }
00217 
00218 TAO_END_VERSIONED_NAMESPACE_DECL
00219 
00220 #if defined (__ACE_INLINE__)
00221 #include "tao/PortableServer/Fixed_Size_SArgument_T.inl"
00222 #endif /* __ACE_INLINE__ */
00223 
00224 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00225 #include "tao/PortableServer/Fixed_Size_SArgument_T.cpp"
00226 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00227 
00228 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00229 #pragma implementation ("Fixed_Size_SArgument_T.cpp")
00230 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00231 
00232 #include /**/ "ace/post.h"
00233 
00234 #endif /* TAO_FIXED_SIZE_SARGUMENT_T_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7