Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / OBV / Any / AnyS_impl.cpp
blobba67d2f06f710538b4aed20ef9948be0b8764518
1 #include "AnyS_impl.h"
3 Test_impl::Test_impl (CORBA::ORB_ptr orb)
4 : orb_ (CORBA::ORB::_duplicate (orb))
8 CORBA::Any*
9 Test_impl::get_something (
10 CORBA::Boolean need_vb)
12 CORBA::Any_ptr ret_val_ptr = 0;
13 ACE_NEW_RETURN (ret_val_ptr, CORBA::Any, 0);
14 CORBA::Any_var ret_val = ret_val_ptr;
16 const CORBA::ULong magic = 3145;
18 if (need_vb)
20 OBV_AnyTest::VB_var vb;
21 ACE_NEW_RETURN (vb.inout (), OBV_OBV_AnyTest::VB, 0);
23 vb->id (magic);
25 ret_val.inout () <<= vb.in ();
27 else
29 OBV_AnyTest::VA_var va;
30 ACE_NEW_RETURN (va.inout (), OBV_OBV_AnyTest::VA, 0);
32 va->id (magic);
34 OBV_AnyTest::VA *va_ptr = va._retn ();
35 ret_val.inout () <<= &va_ptr;
38 return ret_val._retn();
41 OBV_AnyTest::VB *
42 Test_impl::get_vb()
44 const CORBA::ULong magic = 3145;
46 OBV_AnyTest::VB_var vb;
47 ACE_NEW_RETURN (vb.inout (), OBV_OBV_AnyTest::VB, 0);
49 vb->id (magic);
50 return vb._retn();
53 void
54 Test_impl::shutdown ()
56 this->orb_->shutdown (false);