Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / PICurrent / ServerRequestInterceptor.h
blob314cdc195241e936300cabf36890558e5815571b
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ServerRequestInterceptor.h
7 * Implementation header for the server request interceptor for the
8 * PortableInterceptor::Current test.
10 * @author Ossama Othman <ossama@uci.edu>
12 //=============================================================================
14 #ifndef SERVER_REQUEST_INTERCEPTOR_H
15 #define SERVER_REQUEST_INTERCEPTOR_H
17 #include "ace/config-all.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/PI_Server/PI_Server.h"
24 #include "tao/PI/PI.h"
25 #include "tao/PortableInterceptorC.h"
26 #include "tao/LocalObject.h"
28 #if defined(_MSC_VER)
29 #pragma warning(push)
30 #pragma warning(disable:4250)
31 #endif /* _MSC_VER */
33 /**
34 * @class ServerRequestInterceptor
36 * @brief Simple concrete server request interceptor.
38 * This server request interceptor
40 class ServerRequestInterceptor
41 : public virtual PortableInterceptor::ServerRequestInterceptor,
42 public virtual ::CORBA::LocalObject
44 public:
45 /// Constructor.
46 ServerRequestInterceptor (PortableInterceptor::SlotId id,
47 PortableInterceptor::Current_ptr pi_current);
49 /**
50 * @name Methods Required by the Server Request Interceptor
51 * Interface
53 * These are methods that must be implemented since they are pure
54 * virtual in the abstract base class. They are the canonical
55 * methods required for all server request interceptors.
57 //@{
58 /// Return the name of this ServerRequestinterceptor.
59 virtual char * name ();
61 virtual void destroy ();
63 virtual void receive_request_service_contexts (
64 PortableInterceptor::ServerRequestInfo_ptr ri);
66 virtual void receive_request (
67 PortableInterceptor::ServerRequestInfo_ptr ri);
69 virtual void send_reply (
70 PortableInterceptor::ServerRequestInfo_ptr ri);
72 virtual void send_exception (
73 PortableInterceptor::ServerRequestInfo_ptr ri);
75 virtual void send_other (
76 PortableInterceptor::ServerRequestInfo_ptr ri);
77 //@}
79 private:
80 /// The PICurrent slot ID allocated to this application during ORB
81 /// initialization.
82 PortableInterceptor::SlotId slot_id_;
84 /// Reference to the PICurrent object.
85 PortableInterceptor::Current_var pi_current_;
88 #if defined(_MSC_VER)
89 #pragma warning(pop)
90 #endif /* _MSC_VER */
92 #endif /* SERVER_REQUEST_INTERCEPTOR_H */