blob: bfc7299851231b58d29158e3035fcd919ba51663 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// $Id$
#include "Test_impl.h"
#include "TreeBaseC.h"
ACE_RCSID(Forward, Test_impl, "$Id$")
Test_impl::Test_impl (CORBA::ORB_ptr orb)
: orb_ (CORBA::ORB::_duplicate (orb))
{
}
void
reflect_node (BaseNode_ptr bn)
{
if(bn == 0) return;
reflect_node (bn->left ());
reflect_node (bn->right ());
BaseNode_ptr old_right = bn->right ();
BaseNode_ptr old_left = bn->left ();
CORBA::add_ref (old_right);
CORBA::add_ref (old_left);
bn->right (old_left);
bn->left (old_right);
}
TreeController *
Test_impl::reflect (TreeController * tc
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
if (tc != 0)
{
reflect_node (tc-> root());
tc->_add_ref ();
}
return tc;
}
void
Test_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
}
|