00001 // $Id: Current_ORBInitializer.cpp 76995 2007-02-11 12:51:42Z johnnyw $ 00002 00003 #ifndef CURRENT_ORBINITIALIZER_CPP 00004 #define CURRENT_ORBINITIALIZER_CPP 00005 00006 #include "tao/ORB_Constants.h" 00007 #include "tao/TransportCurrent/Current_ORBInitializer.h" 00008 00009 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00010 # pragma once 00011 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00012 00013 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00014 00015 namespace TAO 00016 { 00017 namespace Transport 00018 { 00019 00020 template <typename Impl> 00021 Current_ORBInitializer<Impl>::Current_ORBInitializer(const ACE_TCHAR* id) 00022 : Current_ORBInitializer_Base (id) 00023 { 00024 } 00025 00026 00027 template <typename Impl> 00028 TAO::Transport::Current_ptr 00029 Current_ORBInitializer<Impl>::make_current_instance (TAO_ORB_Core* core, 00030 size_t tss_slot_id) 00031 { 00032 // Create the Current 00033 Current_ptr tmp = 0; 00034 ACE_NEW_THROW_EX (tmp, 00035 Impl (core, tss_slot_id), 00036 CORBA::NO_MEMORY 00037 (CORBA::SystemException::_tao_minor_code (TAO::VMCID, 00038 ENOMEM), 00039 CORBA::COMPLETED_NO)); 00040 00041 return tmp; 00042 } 00043 00044 } 00045 00046 } 00047 00048 TAO_END_VERSIONED_NAMESPACE_DECL 00049 00050 #endif /* CURRENT_ORBINITIALIZER_CPP */