Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / examples / ORT / Gateway_ObjRef_Factory.cpp
blobd313390481f60c5c7502d847114cb9c83f9e5428
1 #include "Gateway_ObjRef_Factory.h"
3 Gateway_ObjRef_Factory::
4 Gateway_ObjRef_Factory (
5 Gateway::Object_Factory_ptr gateway_object_factory,
6 PortableInterceptor::ObjectReferenceFactory *old_factory)
7 : gateway_object_factory_ (gateway_object_factory),
8 old_factory_ (old_factory)
10 CORBA::add_ref (old_factory);
13 ::CORBA::ValueBase *
14 Gateway_ObjRef_Factory::_copy_value (void)
16 Gateway_ObjRef_Factory *ret_val= 0;
17 ACE_NEW_THROW_EX (
18 ret_val,
19 Gateway_ObjRef_Factory (
20 gateway_object_factory_.in (),
21 old_factory_
23 ::CORBA::NO_MEMORY ()
26 return ret_val;
29 CORBA::Object_ptr
30 Gateway_ObjRef_Factory::
31 make_object (const char *interface_repository_id,
32 const PortableInterceptor::ObjectId & id)
34 CORBA::Object_var object =
35 this->old_factory_->make_object (interface_repository_id,
36 id);
38 CORBA::Object_ptr object_ptr =
39 this->gateway_object_factory_->create_object (interface_repository_id,
40 object.in ());
42 return object_ptr;