Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / OBV / Forward / Test_impl.cpp
blob9f65ab9bc71d163a4200bdc5447fdaeaeea41170
1 #include "Test_impl.h"
2 #include "TreeBaseC.h"
4 Test_impl::Test_impl (CORBA::ORB_ptr orb)
5 : orb_ (CORBA::ORB::_duplicate (orb))
10 void
11 reflect_node (BaseNode* bn)
13 if(bn == 0) return;
15 reflect_node (bn->left ());
16 reflect_node (bn->right ());
18 BaseNode_var old_right = bn->right ();
19 BaseNode_var old_left = bn->left ();
21 CORBA::add_ref (old_right.in ());
22 CORBA::add_ref (old_left.in ());
24 bn->right (old_left.in ());
25 bn->left (old_right.in ());
28 TreeController *
29 Test_impl::reflect (TreeController * tc)
31 if (tc != 0)
33 reflect_node (tc-> root());
34 tc->_add_ref ();
36 return tc;
39 void
40 Test_impl::shutdown (void)
42 this->orb_->shutdown (0);