Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / ORT / ObjectReferenceFactory.cpp
blob7bc1831378c96d0e5520e6767aa742d3154fffa9
1 #include "ObjectReferenceFactory.h"
2 #include "tao/debug.h"
4 ObjectReferenceFactory::ObjectReferenceFactory (
5 PortableInterceptor::ObjectReferenceFactory * old_orf)
6 : old_orf_ (old_orf)
8 // Claim ownership of the old ObjectReferenceFactory.
9 CORBA::add_ref (old_orf);
12 ::CORBA::ValueBase *
13 ObjectReferenceFactory::_copy_value (void)
15 ::CORBA::ValueBase *ret_val= 0;
16 ACE_NEW_THROW_EX (
17 ret_val,
18 ObjectReferenceFactory (old_orf_.inout ()),
19 ::CORBA::NO_MEMORY ()
21 return ret_val;
24 ObjectReferenceFactory::~ObjectReferenceFactory (void)
26 // No need to call CORBA::remove_ref() on this->old_orf_. It is a
27 // "_var" object, meaning that will be done automatically.
30 CORBA::Object_ptr
31 ObjectReferenceFactory::make_object (
32 const char *repository_id,
33 const PortableInterceptor::ObjectId & id)
35 ACE_ASSERT (repository_id != 0);
37 ACE_DEBUG ((LM_INFO,
38 "Invoked custom ObjectReferenceFactory::make_object()\n"));
40 return this->old_orf_->make_object (repository_id,
41 id);