Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tests / ORT / ObjectReferenceFactory.cpp
blob27e9875a85a21d25184b973c8e1dc4fd33a72959
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 ()
15 ::CORBA::ValueBase *ret_val= 0;
16 ACE_NEW_THROW_EX (
17 ret_val,
18 ObjectReferenceFactory (old_orf_.inout ()),
19 ::CORBA::NO_MEMORY ());
20 return ret_val;
23 ObjectReferenceFactory::~ObjectReferenceFactory ()
25 // No need to call CORBA::remove_ref() on this->old_orf_. It is a
26 // "_var" object, meaning that will be done automatically.
29 CORBA::Object_ptr
30 ObjectReferenceFactory::make_object (
31 const char *repository_id,
32 const PortableInterceptor::ObjectId & id)
34 ACE_ASSERT (repository_id != 0);
36 ACE_DEBUG ((LM_INFO,
37 "Invoked custom ObjectReferenceFactory::make_object()\n"));
39 return this->old_orf_->make_object (repository_id,
40 id);