3 #include "ace/OS_NS_string.h"
6 foo_i::foo_op (const char * inarg
)
8 CORBA::String_var retval
= CORBA::string_dup ("bad");
10 if (ACE_OS::strcmp (inarg
, "foo_op") == 0)
12 retval
= CORBA::string_dup ("good");
16 throw BadInput ("expected \"foo_op\"\n");
19 return retval
._retn ();
23 foo_i::base_op (const char * inarg
)
25 CORBA::String_var retval
= CORBA::string_dup ("bad");
27 if (ACE_OS::strcmp (inarg
, "base_op") == 0)
29 retval
= CORBA::string_dup ("good");
33 throw BadInput ("expected \"base_op\"\n");
36 return retval
._retn ();
39 passer_i::passer_i (CORBA::ORB_ptr orb
, PortableServer::POA_ptr poa
)
40 : orb_ (CORBA::ORB::_duplicate (orb
))
41 , poa_ (PortableServer::POA::_duplicate (poa
))
48 this->orb_
->shutdown (false);
52 passer_i::pass_ops (base_out outarg
)
58 PortableServer::ObjectId_var id
=
59 this->poa_
->activate_object (servant
);
61 CORBA::Object_var object
= this->poa_
->id_to_reference (id
.in ());
63 PortableServer::ServantBase_var
safety (servant
);
64 outarg
= foo::_narrow (object
.in ());
68 passer_i::pass_state (base_out outarg
)
70 TreeController_var tc
;
74 // Create the root node.
78 sn
->name ((const char *) "RootNode");
81 // Create the left leaf.
82 StringNode_var l_dummy
;
83 ACE_NEW (l_dummy
.inout (),
85 l_dummy
->name ((const char *) "LeftNode");
86 sn
->left (l_dummy
.in ());
88 // Create the right leaf.
89 StringNode_var r_dummy
;
90 ACE_NEW (r_dummy
.inout (),
92 r_dummy
->name ((const char *) "RightNode");
93 sn
->right (r_dummy
.in ());
99 passer_i::pass_nil (base_out outarg
)
101 outarg
= foo::_nil ();