Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / PortableServer / Upcall_Wrapper.h
blobd2585c5ba66f2b2daefec8db0e1d12763b11ae82
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Upcall_Wrapper.h
7 * @author Ossama Othman
8 * @author Jeff Parsons
9 * @author Carlos O'Ryan
11 //=============================================================================
13 #ifndef TAO_UPCALL_WRAPPER_H
14 #define TAO_UPCALL_WRAPPER_H
16 #include /**/ "ace/pre.h"
18 #include "tao/PortableServer/portableserver_export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* !ACE_LACKS_PRAGMA_ONCE */
24 #include "tao/Basic_Types.h"
25 #include "tao/orbconf.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 class TAO_ServantBase;
30 class TAO_ServerRequest;
31 class TAO_InputCDR;
32 class TAO_OutputCDR;
34 namespace PortableServer
36 typedef ::TAO_ServantBase ServantBase;
39 namespace TAO
41 class Argument;
42 class Upcall_Command;
44 namespace Portable_Server
46 class Servant_Upcall;
49 /**
50 * @class Upcall_Wrapper
52 * @brief Wraps the activities of the _skel operations.
55 class TAO_PortableServer_Export Upcall_Wrapper
57 public:
58 /**
59 * @note The TAO::Argument corresponding to the return value is
60 * always the first element in the array, regardless of
61 * whether or not the return type is void.
64 /// Perform the upcall.
65 /**
66 * @param server_request Object containing server side messaging
67 * operations (e.g. CDR reply construction, etc).
68 * @param args Operation argument list.
69 * @param nargs Number of arguments in the operation
70 * argument list.
71 * @param command @c Command object that performs the
72 * actual upcall into the servant.
73 * @param servant_upcall Object containing information for POA
74 * that dispatched the servant.
75 * @param exceptions Array of user exceptions the operation
76 * may raise.
77 * @param nexceptions The number of exceptions in the operation
78 * user exception array.
80 void upcall (TAO_ServerRequest & server_request,
81 TAO::Argument * const args[],
82 size_t nargs,
83 TAO::Upcall_Command & command
84 #if TAO_HAS_INTERCEPTORS == 1
85 , TAO::Portable_Server::Servant_Upcall *servant_upcall
86 , CORBA::TypeCode_ptr const * exceptions
87 , CORBA::ULong nexceptions
88 #endif /* TAO_HAS_INTERCEPTORS == 1 */
91 private:
92 /// Perform pre-upcall operations.
93 /**
94 * Perform pre-upcall operations, including operation @c IN and
95 * @c INOUT argument demarshaling.
97 void pre_upcall (TAO_InputCDR & cdr,
98 TAO::Argument * const * args,
99 size_t nargs);
101 /// Perform post-upcall operations.
103 * Perform post-upcall operations, including operation @c INOUT
104 * and @c OUT argument marshaling.
106 void post_upcall (TAO_ServerRequest& server_request,
107 TAO::Argument * const * args,
108 size_t nargs);
110 } // End namespace TAO
112 TAO_END_VERSIONED_NAMESPACE_DECL
114 #include /**/ "ace/post.h"
116 #endif /* TAO_UPCALL_WRAPPER_H */