Argument.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Argument.h
00006  *
00007  *  $Id: Argument.h 74014 2006-08-14 13:52:22Z johnnyw $
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     /// Template method to clone a TAO Argument
00072     virtual Argument* clone (void);
00073 
00074 #if TAO_HAS_INTERCEPTORS == 1
00075 
00076     /**
00077      * @name Portable Interceptor Related Methods
00078      *
00079      * These methods are only used when setting up
00080      * @c PortableInterceptor::RequestInfo instances with the
00081      * appropriate operation-specific parameter list and return
00082      * value, if either or both exist.
00083      */
00084     //@{
00085     /// Populate the given @a CORBA::Any result argument.
00086     /**
00087      * @note The default implementation is a no-op.
00088      */
00089     virtual void interceptor_value (CORBA::Any *) const;
00090 
00091     /// Get the parameter mode of this argument
00092     virtual CORBA::ParameterMode mode (void) const = 0;
00093     //@}
00094 
00095 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00096 
00097   };
00098 
00099 #if TAO_HAS_INTERCEPTORS == 1
00100   class TAO_Export InArgument : public Argument
00101   {
00102   public:
00103     virtual CORBA::ParameterMode mode (void) const;
00104   };
00105 #else
00106   typedef Argument InArgument;
00107 #endif
00108 
00109 #if TAO_HAS_INTERCEPTORS == 1
00110   class TAO_Export InoutArgument : public Argument
00111   {
00112   public:
00113     virtual CORBA::ParameterMode mode (void) const;
00114   };
00115 #else
00116   typedef Argument InoutArgument;
00117 #endif
00118 
00119 #if TAO_HAS_INTERCEPTORS == 1
00120   class TAO_Export OutArgument : public Argument
00121   {
00122   public:
00123     virtual CORBA::ParameterMode mode (void) const;
00124   };
00125 #else
00126   typedef Argument OutArgument;
00127 #endif
00128 
00129 #if TAO_HAS_INTERCEPTORS == 1
00130   class TAO_Export RetArgument : public Argument
00131   {
00132   public:
00133     virtual CORBA::ParameterMode mode (void) const;
00134   };
00135 #else
00136   typedef Argument RetArgument;
00137 #endif
00138 
00139   class TAO_Export Void_Return_Argument : public RetArgument
00140   {
00141   public:
00142     virtual Argument* clone (void);
00143   };
00144 }
00145 
00146 TAO_END_VERSIONED_NAMESPACE_DECL
00147 
00148 #include /**/ "ace/post.h"
00149 
00150 #endif /* TAO_ARGUMENT_H */

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