Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / PICurrent / ClientRequestInterceptor.h
blobefac9183c17b2943837c8abd4660493bef20b312
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ClientRequestInterceptor.h
7 * @author Ossama Othman <ossama@uci.edu>
8 */
9 //=============================================================================
11 #ifndef CLIENT_REQUEST_INTERCEPTOR_H
12 #define CLIENT_REQUEST_INTERCEPTOR_H
14 #include "ace/config-all.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "tao/PI/PI.h"
21 #include "tao/PortableInterceptorC.h"
22 #include "tao/LocalObject.h"
24 #if defined(_MSC_VER)
25 #pragma warning(push)
26 #pragma warning(disable:4250)
27 #endif /* _MSC_VER */
29 /**
30 * @class ClientRequestInterceptor
32 * @brief Simple concrete client request interceptor.
34 * This is a test client request interceptor that verifies that the
35 * client side PICurrent semantics are correct. In particular, it
36 * verifies that the request-scope current (RSC) is not modified after
37 * the contents of the thread-scope current (TSC) are copied to it.
38 * This is particularly important for ORBs that initially perform a
39 * logical copy for performance reasons.
41 class ClientRequestInterceptor
42 : public virtual PortableInterceptor::ClientRequestInterceptor,
43 public virtual ::CORBA::LocalObject
45 public:
46 /// Constructor.
47 ClientRequestInterceptor (PortableInterceptor::SlotId slot_id,
48 PortableInterceptor::Current_ptr pi_current);
50 /**
51 * @name Methods Required by the Client Request Interceptor
52 * Interface
54 * These are methods that must be implemented since they are pure
55 * virtual in the abstract base class. They are the canonical
56 * methods required for all client request interceptors.
58 //@{
59 /// Return the name of this ClientRequestInterceptor.
60 virtual char * name ();
62 virtual void destroy ();
64 virtual void send_request (
65 PortableInterceptor::ClientRequestInfo_ptr ri);
67 virtual void send_poll (
68 PortableInterceptor::ClientRequestInfo_ptr ri);
70 virtual void receive_reply (
71 PortableInterceptor::ClientRequestInfo_ptr ri);
73 virtual void receive_exception (
74 PortableInterceptor::ClientRequestInfo_ptr ri);
76 virtual void receive_other (
77 PortableInterceptor::ClientRequestInfo_ptr ri);
78 //@}
80 private:
81 /// The PICurrent slot ID allocated to this application during ORB
82 /// initialization.
83 PortableInterceptor::SlotId slot_id_;
85 /// Reference to the PICurrent object.
86 PortableInterceptor::Current_var pi_current_;
89 #if defined(_MSC_VER)
90 #pragma warning(pop)
91 #endif /* _MSC_VER */
93 #endif /* CLIENT_REQUEST_INTERCEPTOR_H */