Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / Dynamic / server_interceptor.h
blobb0a99af2ab6ae844b340f8eb20da62e26258a9fd
1 // -*- C++ -*-
2 #ifndef TAO_SERVER_INTERCEPTOR_H
3 #define TAO_SERVER_INTERCEPTOR_H
5 #include "tao/PI_Server/PI_Server.h"
6 #include "tao/PortableInterceptorC.h"
7 #include "tao/LocalObject.h"
9 #if !defined (ACE_LACKS_PRAGMA_ONCE)
10 # pragma once
11 #endif /* ACE_LACKS_PRAGMA_ONCE */
13 #if defined(_MSC_VER)
14 #pragma warning(push)
15 #pragma warning(disable:4250)
16 #endif /* _MSC_VER */
18 /// Server-side echo interceptor. For checking interceptor visually only.
19 class Echo_Server_Request_Interceptor
20 : public PortableInterceptor::ServerRequestInterceptor,
21 public virtual ::CORBA::LocalObject
23 public:
24 Echo_Server_Request_Interceptor (int& result);
26 // Canonical name of the interceptor.
27 char * name () override;
29 void destroy () override;
31 void receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr) override;
33 void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri) override;
35 void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri) override;
37 void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri) override;
39 void send_other (PortableInterceptor::ServerRequestInfo_ptr) override;
41 protected:
42 ~Echo_Server_Request_Interceptor () override = default;
44 private:
45 int& result_;
48 #if defined(_MSC_VER)
49 #pragma warning(pop)
50 #endif /* _MSC_VER */
52 #endif /* TAO_SERVER_INTERCEPTOR_H */