Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / OBV / TC_Alignment / test_i.cpp
blobed20848b45993f50ac0e8bc4e2c1657090cef0e1
1 #include "test_i.h"
3 test_i::test_i (CORBA::ORB_ptr orb)
4 : orb_ (orb)
8 CORBA::Any *
9 test_i::get_value (CORBA::Long offset)
11 CORBA::Any_ptr retval_ptr = 0;
12 ACE_NEW_THROW_EX (retval_ptr,
13 CORBA::Any,
14 CORBA::NO_MEMORY ());
15 CORBA::Any_var retval = retval_ptr;
17 switch (offset)
19 case 1:
21 obvmod::tcOffset1 *vt1 = 0;
22 ACE_NEW_RETURN (vt1,
23 tcOffset1_i,
24 0);
25 vt1->mem (offset);
26 retval.inout () <<= &vt1;
27 break;
29 case 3:
31 obvmod::tcOffset003 *vt3 = 0;
32 ACE_NEW_RETURN (vt3,
33 tcOffset3_i,
34 0);
35 vt3->mem (offset);
36 retval.inout () <<= &vt3;
37 break;
39 case 5:
41 obvmod::tcOffset00005 *vt5 = 0;
42 ACE_NEW_RETURN (vt5,
43 tcOffset5_i,
44 0);
45 vt5->mem (offset);
46 retval.inout () <<= &vt5;
47 break;
49 case 7:
51 obvmod::tcOffset0000007 *vt7 = 0;
52 ACE_NEW_RETURN (vt7,
53 tcOffset7_i,
54 0);
55 vt7->mem (offset);
56 retval.inout () <<= &vt7;
57 break;
59 default:
60 return 0;
63 return retval._retn ();
66 void
67 test_i::shutdown (void)
69 this->orb_->shutdown ();