Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / Benchmark / Client_ORBInitializer.cpp
blob5a5c04b804cb12167201a92385d3595835fbb761
1 // -*- C++ -*-
2 #include "Client_ORBInitializer.h"
3 #include "client_interceptors.h"
4 #include "Interceptor_Type.h"
6 Client_ORBInitializer::Client_ORBInitializer (int interceptor_type)
7 : interceptor_type_ (interceptor_type)
11 void
12 Client_ORBInitializer::pre_init (
13 PortableInterceptor::ORBInitInfo_ptr)
17 void
18 Client_ORBInitializer::post_init (
19 PortableInterceptor::ORBInitInfo_ptr info)
21 PortableInterceptor::ClientRequestInterceptor_ptr tmp =
22 PortableInterceptor::ClientRequestInterceptor::_nil ();
24 switch (this->interceptor_type_)
26 default:
27 case IT_NONE:
28 return;
30 case IT_NOOP:
32 // Installing the Vault interceptor
33 ACE_NEW_THROW_EX (tmp,
34 Vault_Client_Request_NOOP_Interceptor (),
35 CORBA::NO_MEMORY ());
36 break;
38 case IT_CONTEXT:
40 // Installing the Vault interceptor
41 ACE_NEW_THROW_EX (tmp,
42 Vault_Client_Request_Context_Interceptor (),
43 CORBA::NO_MEMORY ());
44 break;
46 case IT_DYNAMIC:
48 // Installing the Vault interceptor
49 ACE_NEW_THROW_EX (tmp,
50 Vault_Client_Request_Dynamic_Interceptor (),
51 CORBA::NO_MEMORY ());
52 break;
56 PortableInterceptor::ClientRequestInterceptor_var interceptor = tmp;
58 info->add_client_request_interceptor (interceptor.in ());