Argument.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Argument.h
00006  *
00007  *  Argument.h,v 1.8 2006/06/20 05:38:39 jwillemsen Exp
00008  *
00009  *  @author Jeff Parsons
00010  *  @author Carlos O'Ryan
00011  */
00012 //=============================================================================
00013 
00014 
00015 #ifndef TAO_ARGUMENT_H
00016 #define TAO_ARGUMENT_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/Basic_Types.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "tao/orbconf.h"
00027 #include "tao/TAO_Export.h"
00028 #include "tao/ParameterModeC.h"
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 namespace CORBA
00033 {
00034   class Any;
00035 }
00036 
00037 class TAO_OutputCDR;
00038 class TAO_InputCDR;
00039 
00040 namespace TAO
00041 {
00042   /**
00043    * @class Argument
00044    *
00045    * @brief Base class for argument class templates.
00046    *
00047    * @c Argument subclasses override the virtual methods
00048    *    appropriately.  For example, a stub "IN" argument class
00049    *    template would override the @c marshal() method, but wouldn't
00050    *    need to override the @c demarshal() method.
00051    */
00052   class TAO_Export Argument
00053   {
00054   public:
00055 
00056     /// Destructor.
00057     virtual ~Argument (void);
00058 
00059     /// Marshal the argument into the given CDR output stream.
00060     /**
00061      * @note The default implementation simply returns @c true.
00062      */
00063     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00064 
00065     /// Demarshal the argument from the given CDR input stream.
00066     /**
00067      * @note The default implementation simply returns @c true.
00068      */
00069     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00070 
00071 #if TAO_HAS_INTERCEPTORS == 1
00072 
00073     /**
00074      * @name Portable Interceptor Related Methods
00075      *
00076      * These methods are only used when setting up
00077      * @c PortableInterceptor::RequestInfo instances with the
00078      * appropriate operation-specific parameter list and return
00079      * value, if either or both exist.
00080      */
00081     //@{
00082     /// Populate the given @a CORBA::Any result argument.
00083     /**
00084      * @note The default implementation is a no-op.
00085      */
00086     virtual void interceptor_value (CORBA::Any *) const;
00087 
00088     /// Get the parameter mode of this argument
00089     virtual CORBA::ParameterMode mode (void) const = 0;
00090     //@}
00091 
00092 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00093 
00094   };
00095 
00096 #if TAO_HAS_INTERCEPTORS == 1
00097   class TAO_Export InArgument : public Argument
00098   {
00099   public:
00100     virtual CORBA::ParameterMode mode (void) const;
00101   };
00102 #else
00103   typedef Argument InArgument;
00104 #endif
00105 
00106 #if TAO_HAS_INTERCEPTORS == 1
00107   class TAO_Export InoutArgument : public Argument
00108   {
00109   public:
00110     virtual CORBA::ParameterMode mode (void) const;
00111   };
00112 #else
00113   typedef Argument InoutArgument;
00114 #endif
00115 
00116 #if TAO_HAS_INTERCEPTORS == 1
00117   class TAO_Export OutArgument : public Argument
00118   {
00119   public:
00120     virtual CORBA::ParameterMode mode (void) const;
00121   };
00122 #else
00123   typedef Argument OutArgument;
00124 #endif
00125 
00126 #if TAO_HAS_INTERCEPTORS == 1
00127   class TAO_Export RetArgument : public Argument
00128   {
00129   public:
00130     virtual CORBA::ParameterMode mode (void) const;
00131   };
00132 #else
00133   typedef Argument RetArgument;
00134 #endif
00135 }
00136 
00137 TAO_END_VERSIONED_NAMESPACE_DECL
00138 
00139 #include /**/ "ace/post.h"
00140 
00141 #endif /* TAO_ARGUMENT_H */

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