Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / TransportCurrent / Current_Loader.cpp
blob8a29334892a3fd2ba860fbf40172df61edd7aaf7
1 /* -*- C++ -*- */
3 // =================================================================
4 /**
5 * @file Current_Loader.cpp
7 * @author Iliyan Jeliazkov <iliyan@ociweb.com>
8 */
9 // =================================================================
11 #include "ace/Service_Config.h"
13 #include "tao/ORB_Constants.h"
14 #include "tao/ORBInitializer_Registry.h"
16 #if TAO_HAS_TRANSPORT_CURRENT == 1
18 #include "tao/TransportCurrent/Current_ORBInitializer.h"
19 #include "tao/TransportCurrent/Current_Loader.h"
20 #include "tao/TransportCurrent/Current_Impl.h"
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
24 namespace TAO
26 namespace Transport
28 /// Destructor
29 Current_Loader::~Current_Loader ()
33 /// Initializes object when dynamic linking occurs.
34 int
35 Current_Loader::init (int, ACE_TCHAR *[])
37 PortableInterceptor::ORBInitializer_ptr tmp = 0;
38 ACE_NEW_THROW_EX (tmp,
39 Current_ORBInitializer<Current_Impl>
40 (ACE_TEXT ("TAO::Transport::Current")),
41 CORBA::NO_MEMORY
42 (CORBA::SystemException::_tao_minor_code (TAO::VMCID,
43 ENOMEM),
44 CORBA::COMPLETED_NO));
46 PortableInterceptor::ORBInitializer_var initializer (tmp);
48 PortableInterceptor::register_orb_initializer (initializer.in ());
50 return 0;
53 } /* namespace Transport */
55 } /* namespace TAO */
57 TAO_END_VERSIONED_NAMESPACE_DECL
60 #if defined (TAO_AS_STATIC_LIBS)
62 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
64 ACE_STATIC_SVC_REQUIRE (TAO_Transport_Current_Loader)
66 namespace TAO
68 namespace Transport
70 int current_static_initializer ()
72 ACE_STATIC_SVC_REGISTER (TAO_Transport_Current_Loader);
73 return 0;
79 TAO_END_VERSIONED_NAMESPACE_DECL
82 #endif /* defined (TAO_AS_STATIC_LIBS) */
84 ACE_STATIC_SVC_DEFINE (TAO_Transport_Current_Loader,
85 ACE_TEXT ("TAO_Transport_Current_Loader"),
86 ACE_SVC_OBJ_T,
87 &ACE_SVC_NAME (TAO_Transport_Current_Loader),
88 ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
91 ACE_FACTORY_NAMESPACE_DEFINE (TAO_Transport_Current,
92 TAO_Transport_Current_Loader,
93 TAO::Transport::Current_Loader)
95 #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */