Upcall_Wrapper.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Upcall_Wrapper.h
00006  *
00007  *  Upcall_Wrapper.h,v 1.12 2006/03/10 07:19:16 jtc Exp
00008  *
00009  *  @author Ossama Othman
00010  *  @author Jeff Parsons
00011  *  @author Carlos O'Ryan
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_UPCALL_WRAPPER_H
00016 #define TAO_UPCALL_WRAPPER_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/PortableServer/portableserver_export.h"
00021 
00022 #ifndef ACE_LACKS_PRAGMA_ONCE
00023 # pragma once
00024 #endif /* !ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "tao/Basic_Types.h"
00027 #include "tao/orbconf.h"
00028 #include "ace/CORBA_macros.h"
00029 
00030 
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032 
00033 class TAO_ServantBase;
00034 class TAO_ServerRequest;
00035 class TAO_InputCDR;
00036 class TAO_OutputCDR;
00037 
00038 namespace PortableServer
00039 {
00040   typedef ::TAO_ServantBase ServantBase;
00041 }
00042 
00043 namespace CORBA
00044 {
00045   class Environment;
00046 }
00047 
00048 namespace TAO
00049 {
00050   class Argument;
00051   class Upcall_Command;
00052 
00053   /**
00054    * @class Upcall_Wrapper
00055    *
00056    * @brief Wraps the activities of the _skel operations.
00057    *
00058    */
00059   class TAO_PortableServer_Export Upcall_Wrapper
00060   {
00061   public:
00062 
00063     /**
00064      * @note The TAO::Argument corresponding to the return value is
00065      *       always the first element in the array, regardless of
00066      *       whether or not the return type is void.
00067      */
00068 
00069     /// Perform the upcall.
00070     /**
00071      * @param server_request Object containing server side messaging
00072      *                       operations (e.g. CDR reply construction, etc).
00073      * @param args           Operation argument list.
00074      * @param nargs          Number of arguments in the operation
00075      *                       argument list.
00076      * @param command        @c Command object that performs the
00077      *                       actual upcall into the servant.
00078      *
00079      * @param servant_upcall Object containing information for POA
00080      *                       that dispatched the servant.
00081      * @param servant        The servant handling the upcall.
00082      * @param exceptions     Array of user exceptions the operation
00083      *                       may raise.
00084      * @param nexceptions    The number of exceptions in the operation
00085      *                       user exception array.
00086      */
00087     void upcall (TAO_ServerRequest & server_request,
00088                  TAO::Argument * const args[],
00089                  size_t nargs,
00090                  TAO::Upcall_Command & command
00091 
00092 #if TAO_HAS_INTERCEPTORS == 1
00093                  , void * servant_upcall
00094                  , CORBA::TypeCode_ptr const * exceptions
00095                  , CORBA::ULong nexceptions
00096 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
00097 
00098                  ACE_ENV_ARG_DECL);
00099 
00100   private:
00101 
00102 
00103     /// Perform pre-upcall operations.
00104     /**
00105      * Perform pre-upcall operations, including operation @c IN and
00106      * @c INOUT argument demarshaling.
00107      */
00108     void pre_upcall (TAO_InputCDR & cdr,
00109                      TAO::Argument * const * args,
00110                      size_t nargs
00111                      ACE_ENV_ARG_DECL);
00112 
00113     /// Perform post-upcall operations.
00114     /**
00115      * Perform post-upcall operations, including operation @c INOUT
00116      * and @c OUT argument marshaling.
00117      */
00118     void post_upcall (TAO_OutputCDR & cdr,
00119                       TAO::Argument * const * args,
00120                       size_t nargs
00121                       ACE_ENV_ARG_DECL);
00122 
00123   };
00124 
00125 }  // End namespace TAO
00126 
00127 TAO_END_VERSIONED_NAMESPACE_DECL
00128 
00129 #include /**/ "ace/post.h"
00130 
00131 #endif /* TAO_UPCALL_WRAPPER_H */

Generated on Thu Nov 9 12:40:45 2006 for TAO_PortableServer by doxygen 1.3.6